[gdal-dev] GDAL_GRID Dateline Issue

Andrew Smith apsmith2367 at gmail.com
Thu Dec 27 11:14:40 PST 2012


Hi,

I am trying to use gdal_grid to interpolate some data and I am having
trouble making gdal_grid treat spatial data (WGS84 lat/lon coordinates) as
points on a continuous plane.  It seems to be ignoring the dateline so for
example values at 45, 179 are not properly interacting with values at 45,
-179 and so on.  I'm using the following gdal_grid command:

gdal_grid -l bath bath.vrt bath.tif -outsize 4000 4000 -txe -180 180 -tye
-90 90

bath.vrt contents are as follows:

<OGRVRTDataSource>
    <OGRVRTLayer name="bath">
    <SrcDataSource>bath.csv</SrcDataSource>
    <GeometryType>wkbPoint</GeometryType>
    <GeometryField encoding="PointFromColumns" x="LON" y="LAT" z="DEPTH"/>
    <LayerSRS>WGS84</LayerSRS>
    </OGRVRTLayer>
</OGRVRTDataSource>

bath.csv contents are:
LAT, LON, DEPTH
0, 0, 3100
-25, -120, 4200
35, 150, 5000
37, 152, 5900
38, 158, 6900
-60, 30, 2500
-62, 29, 2300
-60, 20, 1200
-80, -150, 500
80, 140, 700


I can see when I plot these values using mapserver that the points near the
dateline don't seem to be "wrapping" properly.  Here's the image that I'm
creating:

http://i1025.photobucket.com/albums/y315/deuce2367/bath_zps7434f8d2.png

Embedded link:  <a href="
http://s1025.beta.photobucket.com/user/deuce2367/media/bath_zps7434f8d2.png.html"
target="_blank"><img src="
http://i1025.photobucket.com/albums/y315/deuce2367/bath_zps7434f8d2.png"
border="0" alt="Photobucket"/></a>

Any help with this issue is greatly appreciated!!

Thanks,

-Andy Smith
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20121227/262678d5/attachment.html>


More information about the gdal-dev mailing list