[gdal-dev] ogr2og / forcing a +-180 system

Robb K. Wright robbkwright at gmail.com
Mon Nov 18 11:29:07 PST 2013


I haven't been able to get either -wrapdateline or -datelineoffset to 
alter the coords.  As far as I can figure out, the -wrapdateline option 
only operates on features that actually intersect the 180 line, so using 
it doesn't alter my coords since mine are only on either side.  I'm just 
trying to shift any polys <-180 to be have long +360.  Here's a sample 
shape if anybody wants to take a swing:  
http://branewright.org/test/test_file.zip

Robb

On 11/18/13 12:50 PM, Frank Warmerdam wrote:
> Robb,
>
> Have you tried the -wrapdateline switch?  I do not believe geometries 
> that cross the dateline will be handled ideally (they aren't split as 
> one might hope), but if you don't have them then the rest of the 
> geometries should be wrapped.  I see there is even now a 
> -datelineoffset switch if someone needed 0 to 360.
>
> Best regards,
> Frank
>
>
> On Mon, Nov 18, 2013 at 8:36 AM, Robb K. Wright <robbkwright at gmail.com 
> <mailto:robbkwright at gmail.com>> wrote:
>
>
>     I need to use ogr2ogr (or any other command line) to convert a
>     shapefile with longitudes spanning from -220 to -60, forcing it
>     into a +-180 scheme, so the -220 coordinate would come out as +140
>     and the -60 stays as -60.  I don't need to worry about the polys
>     that actually cross the 180 line.
>
>     Any thoughts?  I was thinking that running it through EPSG:4326
>     would reshape it (as it does in Esri-land), but no luck.
>
>     Robb
>
>
>
>     _______________________________________________
>     gdal-dev mailing list
>     gdal-dev at lists.osgeo.org <mailto:gdal-dev at lists.osgeo.org>
>     http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
>
>
>
> -- 
> ---------------------------------------+--------------------------------------
> I set the clouds in motion - turn up   | Frank Warmerdam, 
> warmerdam at pobox.com <mailto:warmerdam at pobox.com>
> light and sound - activate the windows | http://pobox.com/~warmerdam 
> <http://pobox.com/%7Ewarmerdam>
> and watch the world go round - Rush    | Geospatial Software Developer


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20131118/8a35b5ff/attachment.html>


More information about the gdal-dev mailing list