[gdal-dev] Offset shapefile to start from prime meridian

Hare, Trent thare at usgs.gov
Sun Jun 16 16:57:20 PDT 2013


Zetah,
   Oops - I skipped passed the fact you were working with vectors. I read
"Natural Earth" and assumed the nice hillshade images they support.

Converting from 180 -> 360 -> 180 is a something we often have to do for
planetary data. My colleague Jay (CC'd) has written an OGR script to
convert from 360 -> 180 but it requires OGR and Shapely. Shapely is used
for line and polygon intersections (to split the boundary cases before
shifting). Converting it to 180 -> 360 should be simple. Hopefully Jay can
post it for the group.

Other options:
(1) As you can see here, you might have luck using OGR if you have no
features that cross 0:
http://lists.osgeo.org/pipermail/gdal-dev/2006-June/009293.html

(2) ArcMap - This tool by Jeff Jeneness has a wrap boundary script:
http://www.jennessent.com/arcgis/shapes_graphics.htm

(3) For simple points, here is an older OGR example script:
https://isis.astrogeology.usgs.gov/IsisSupport/index.php/topic,3722.0.html

-Trent



On Sun, Jun 16, 2013 at 1:21 PM, zetah <otrov at hush.ai> wrote:

> Trent Hare wrote:
> >
> >There is a great method to do this virtually using GDAL's VRT format.
> >Unfortunately it looks like this site has died but the wayback machine has
> >a snapshot of it. Definitely a good tutorial to keep around -- I use this
> >trick all the time.
> >
> >http://web.archive.org/web/20110406210056/http://www1.eonfusion.com
> >/manual/index.php/Manipulate_rasters_with_GDAL_VRT
>
> Hi Trent,
>
> that's nice trick indeed, thanks. However shapefile as vector can't be
> converted
> to virtual raster.
>
> I thought that it's my lack of understanding ogr2org switches, as I didn't
> expected
> that this is more then trivial task, like it must be possible to represent
> global map
> starting from prime meridian other way then cropping the map on half?
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20130616/7b1b2a31/attachment.html>


More information about the gdal-dev mailing list