Region of Interest with Geodetic Coordinates

Hi there,

I need to build a ROI given some geodetic coordinates (instead of the spherical ones). But if I use GeodeticPoint and then EllipsoidTessellator.buildSimpleZone I get the same result as if I use S2Points and SphericalPolygonsSet:

point1 = S2Point(float(radians(lon[0])),float(radians(90-lat[0])))
point2 = S2Point(float(radians(lon[1])),float(radians(90-lat[1])))
point3 = S2Point(float(radians(lon[2])),float(radians(90-lat[2])))
point4 = S2Point(float(radians(lon[3])),float(radians(90-lat[3])))
ROI = SphericalPolygonsSet(1e-10,[point4,point3,point2,point1])

point1 = GeodeticPoint(float(radians(lat[0])),float(radians(lon[0])),float(0.0))
point2 = GeodeticPoint(float(radians(lat[1])),float(radians(lon[1])),float(0.0))
point3 = GeodeticPoint(float(radians(lat[2])),float(radians(lon[2])),float(0.0))
point4 = GeodeticPoint(float(radians(lat[3])),float(radians(lon[3])),float(0.0))
ROI = EllipsoidTessellator.buildSimpleZone(1.0e-10,[point4,point3,point2,point1])

Shouldn’t they be different?

Hi Federica,
It seems normal, the buildSimpleZone method builds a SphericalPolygonSet the same way you do.
What did you expect?

I expected a different result (small difference of course) because in the second example I’m using geodetic coordinates instead of spherical coordinates so they should lead to different results using for example a geographiczonedetector I think…

At this level, there is no difference between the 2 pieces of code.
The underlying body, on which the geographical (geodetic) coordinates are actually defined, will later be taken into account directly by the geographiczonedetector.

1 Like

Sorry I’m still having troubles with this.
Basically I need to find a Region of Interest with GEODETIC coordinates, not spherical ones. Is there a way to do that?

Thanks in advance.