3

I have a line shapefile with a local transverse mercator projection ("+proj=tmerc +lat_0=50 +lon_0=172.5 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs") and I want to reproject it into EPSG:4326 with ogr2ogr. The line feature is crossing the international date meridian, as you can see in the image. Input line This particular situation seems to be a problem for ogr2ogr. In fact, the reprojected output line is crossing the entire world, and this is clearly wrong. Output line

This is the command I used for the reprojection:

ogr2ogr -f "ESRI Shapefile" track_linedate_pr.shp track_linedate.shp -t_srs EPSG:4326

0

There is no other way to display the shape properly than to cut it between 179.9°E and -179.9° (W). I described a workflow for the cutting here:

QGIS display world country shape files centered on pacific ocean using Robinson, Miller Cylindrical or other projection

0

You can use the -wrapdateline flag with ogr2ogr to split the geometry automatically at the dateline

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.