ogr2ogr works on Linux, does not on Windows

Frank Warmerdam warmerdam at POBOX.COM
Mon Jan 9 05:43:12 PST 2006


On 1/9/06, Xin <crazygecko at gmail.com> wrote:
> Hi list,
>
> I am trying to convert a shapefile to tabfile whilst reprojecting it to
> LatLong WGS84.  This works great on Linux, but doesn't on Windows.
>
> The command used is:
> ogr2ogr -f "MapInfo File" address.tab address.shp -t_srs "+proj=longlat
> +ellps=WGS84 +datum=WGS84 +no_defs" -s_srs "+proj=longlat +ellps=WGS84
> +datum=WGS84 +no_defs"
>
> I did initially use EPSG codes, but that didn't work on Windows so I thought
> I'd try the actual datum codes.  No luck.
>
> There are no error produced on Windows.  On opening the TAB file it is not
> projected.

Xin,

You have told ogr2ogr that the source and target SRS are both WGS84
so there is no reprojection to do.  If the source is not already in WGS84
degrees then you should either use a different -s_srs or omit this option
and let ogr2ogr pick up the coordinate system from the source file.

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the MapServer-users mailing list