1

New to using PostGIS and have two situations that I'm working with.

In the one case, I have a polygon that crossed the antemeridian and was detecting whether a two separate points located within that polygon one on the west and one on the east side of the antimeridian intersects with the polygon (data types used are geometries). I found I had to use the st_shift_longitude on the geometries passed to the st_intersects function.

The other situation is a polygon crossing the equator with points above and below the equator within the polygon. st_intersects doesn't detect both points intersect the polygon. Do the latitudes need to be shifted in this case? I didn't see a shift latitude function available.

I'm using the following points and polygon at the equator: st_point(170.0,45.0) st_point(170.0,-45.0)
and the polygon 'POLYGON((165 40,175 40,175 -50,165 -50,165 40))'

I'd expect that the st_intersect function return true for both points, however, it's only returning true for st_point(170.0,-45.0)

  • Can you add the points and the polygons? – Ian Turton Feb 26 '16 at 18:45
  • FYI, "anti" = opposite versus "ante" = before. – mkennedy Feb 26 '16 at 19:33
0

The maximum latitude of your polygon is 40. The latitude of your missing point is 45. I think you just have a typo in your test.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.