<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span>I suggest loading it into Postgis & use the ST_ShiftLongitude() function - this was written specifically to enable 0-360 & +-180 conversions.</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><br><span></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><span>It may be that your data with longitudes <-180 fails with this too, but it is the closest I know of...</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><br><span></span></div><div style="color: rgb(0, 0, 0);
 font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><span>Otherwise you could perhaps script something up with GMT v5, which works in mod360 for longitudes?<br></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><br><span></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><span>Brent Wood<br></span></div><div><br></div>  <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div dir="ltr"> <hr size="1">  <font size="2" face="Arial"> <b><span style="font-weight:bold;">From:</span></b> Robb K. Wright <robbkwright@gmail.com><br> <b><span
 style="font-weight: bold;">To:</span></b> Frank Warmerdam <warmerdam@pobox.com> <br><b><span style="font-weight: bold;">Cc:</span></b> gdal dev <gdal-dev@lists.osgeo.org> <br> <b><span style="font-weight: bold;">Sent:</span></b> Tuesday, November 19, 2013 8:29 AM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [gdal-dev] ogr2og / forcing a +-180 system<br> </font> </div> <div class="y_msg_container"><br><div id="yiv9677886311"><div>
    <div class="yiv9677886311moz-cite-prefix"><br clear="none">
      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:  <a rel="nofollow" shape="rect" class="yiv9677886311moz-txt-link-freetext" target="_blank" href="http://branewright.org/test/test_file.zip">http://branewright.org/test/test_file.zip</a><br clear="none">
      <br clear="none">
      Robb<br clear="none">
      <br clear="none">
      On 11/18/13 12:50 PM, Frank Warmerdam wrote:<br clear="none">
    </div>
    <div class="yiv9677886311yqt6677528397" id="yiv9677886311yqt64401"><blockquote type="cite">
      <div dir="ltr">Robb,
        <div><br clear="none">
        </div>
        <div>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.</div>
        <div><br clear="none">
        </div>
        <div>Best regards,</div>
        <div>Frank</div>
      </div>
      <div class="yiv9677886311gmail_extra"><br clear="none">
        <br clear="none">
        <div class="yiv9677886311gmail_quote">On Mon, Nov 18, 2013 at 8:36 AM, Robb
          K. Wright <span dir="ltr"><<a rel="nofollow" shape="rect" ymailto="mailto:robbkwright@gmail.com" target="_blank" href="mailto:robbkwright@gmail.com">robbkwright@gmail.com</a>></span>
          wrote:<br clear="none">
          <blockquote class="yiv9677886311gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br clear="none">
            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.<br clear="none">
            <br clear="none">
            Any thoughts?  I was thinking that running it through
            EPSG:4326 would reshape it (as it does in Esri-land), but no
            luck.<br clear="none">
            <br clear="none">
            Robb<br clear="none">
            <br clear="none">
            <br clear="none">
            <br clear="none">
            _______________________________________________<br clear="none">
            gdal-dev mailing list<br clear="none">
            <a rel="nofollow" shape="rect" ymailto="mailto:gdal-dev@lists.osgeo.org" target="_blank" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br clear="none">
            <a rel="nofollow" shape="rect" target="_blank" href="http://lists.osgeo.org/mailman/listinfo/gdal-dev">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br clear="none">
          </blockquote>
        </div>
        <br clear="none">
        <br clear="all">
        <div><br clear="none">
        </div>
        -- <br clear="none">
---------------------------------------+--------------------------------------<br clear="none">
        I set the clouds in motion - turn up   | Frank Warmerdam, <a rel="nofollow" shape="rect" ymailto="mailto:warmerdam@pobox.com" target="_blank" href="mailto:warmerdam@pobox.com">warmerdam@pobox.com</a><br clear="none">
        light and sound - activate the windows | <a rel="nofollow" shape="rect" target="_blank" href="http://pobox.com/%7Ewarmerdam">http://pobox.com/~warmerdam</a><br clear="none">
        and watch the world go round - Rush    | Geospatial Software
        Developer<br clear="none">
      </div>
    </blockquote></div>
    <br clear="none">
    <br clear="none">
  </div></div><br><div class="yqt6677528397" id="yqt42889">_______________________________________________<br clear="none">gdal-dev mailing list<br clear="none"><a shape="rect" ymailto="mailto:gdal-dev@lists.osgeo.org" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br clear="none"><a shape="rect" href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a></div><br><br></div> </div> </div>  </div></body></html>