I suggest loading it into Postgis & use the ST_ShiftLongitude() function - this
was written specifically to enable 0-360 & +-180 conversions.
It may be that your data with longitudes <-180 fails with this too, but it is
the closest I know of...
Otherwise you could perhaps script something up with GMT v5, which works in
mod360 for longitudes?
Brent Wood
________________________________
From: Robb K. Wright <[email protected]>
To: Frank Warmerdam <[email protected]>
Cc: gdal dev <[email protected]>
Sent: Tuesday, November 19, 2013 8:29 AM
Subject: Re: [gdal-dev] ogr2og / forcing a +-180 system
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 <[email protected]> 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
>>[email protected]
>>http://lists.osgeo.org/mailman/listinfo/gdal-dev
>>
>
>
>
>
--
>---------------------------------------+--------------------------------------
>I set the clouds in motion - turn up | Frank Warmerdam, [email protected]
>light and sound - activate the windows | http://pobox.com/~warmerdam
>and watch the world go round - Rush | Geospatial Software
Developer
>
_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev