[gdal-dev] ogr2ogr vector central meridian change, vector offset issue.

Even Rouault even.rouault at mines-paris.org
Sun Mar 6 17:47:11 EST 2011


Ilia,

Try adding -wrapdateline to your command line. The wrapdateline option 
instructs ogr2ogr to split geometries crossing the dateline meridian. I've 
just tested it successfully on one of those datasets.

> Hello,
>      We are trying to re-project the coral reef dataset via ogr2ogr for
> the dataset to fit the bluemarble projection. The coral reef is a vector
> shape dataset and it is using the Lambert Cylindrical Equal Area at -160
> central meridian. Once we re-project we are getting lines connecting the
> shapes that are cutoff at the edges from -180 to 180. Is that a bug ?
> or  are we doing something wrong?
> 
> You can see the offset issue here
> http://dukodestudio.com/client_room/coralreefs/coralReefData-offsetlineissu
> e.png
> 
> 
> Here is the location of the dataset
> http://www.wri.org/publication/reefs-at-risk-revisited#datasets
> 
> Our command is as follows:
> ogr2ogr  -s_srs '+proj=cea +lon_0=-160 +lat_ts=0 +x_0=0 +y_0=0' -t_srs
> EPSG:4326 reefPoly28.shp reef_500_poly.shp
> 
> We did try to use the "-spat -180 -90 180 90" flag with the above commnd
> but without success.
> 
> Thanks, ik.
> 
> 
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev


More information about the gdal-dev mailing list