I’m having an issue with gmtspatial
when calculating area and centroid.
To generate the problem:
gmt grdcut -RNO @earth_relief_10m -Gno.nc
gmt grdcontour -D%c_cont.gmt -C100 no.nc
gmt gmtspatial C_cont.gmt -Q+h+c10 > C_cont_red.gmt
csplit --elide-empty-files --quiet --prefix=split_ C_cont_red.gmt "/>/0" "{*}"
If we take a look at the 24th split-file, we have inf
in the header, for both area and centroid :
cat split_24
> 700 contour -Z700 -Znan (area) -inf/-inf (centroid) CW
12.0833333333 79.4166667461 700
12.0833336 79.4166666667 700
12.0833333333 79.4166666368 700
12.0833332522 79.4166666667 700
12.0833333333 79.4166667461 700
The area is very small. Any idea what is causing this?