2

This is a shipping route from 'Portland to Busan' and I want to check the route against land_polygons like how much distance is traveled by a route through land. And the problem is while checking the land intersection it considers the route as passing through North America, Europe etc. when it is not passing through any land region in reality.

enter image description here

PostGIS version:

POSTGIS="2.1.7 r13414" GEOS="3.4.2-CAPI-1.8.2 r3921" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.10.1, released 2013/08/26" LIBXML="2.9.1" LIBJSON="UNKNOWN" TOPOLOGY RASTER
  • It's a problem with 180 degree longitude crossing. You may split your route into two segments and calculate distance over land_polygons separately. – dmitry.v.kiselev Aug 11 '15 at 10:04
  • @dmitry.v.kiselev you are correct, but problem is I have millions of routes like this, some crosses dateline and some don't. how can i differentiate between them? is there any specific criteria which i could use ? or is there any inbuilt postgis function for checking it? – Dhruvil Thaker Aug 11 '15 at 10:13
  • Maybe this question may helps you gis.stackexchange.com/questions/14212/… – dmitry.v.kiselev Aug 11 '15 at 10:19

Your Answer

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

Browse other questions tagged or ask your own question.