ogr2ogr works on Linux, does not on Windows
Xin
crazygecko at GMAIL.COM
Tue Jan 10 04:48:37 PST 2006
Keeping you guys up to date, this problem has now been solved.
We created a VRT file for the shapefile. Convert VRT to TAB with the
following command:
ogr2ogr -f "MapInfo File" address.tab address.vrt -s_srs
"+proj=longlat+ellps=WGS84 +datum=WGS84 +no_defs" -s_srs "+proj=longlat
+ellps=WGS84 +datum=WGS84 +no_defs"
Notice duplicate -s_srs's. This is needed. Not sure why, but doesn't work
without it.
Cheers,
Xin
On 09/01/06, Xin <crazygecko at gmail.com> wrote:
>
> I appreciate it might look a bit strange the way I've got the command
> written. The idea is to convert from TAB to SHP and have WGS84 projection.
>
> Converting with projection tags would result in non-earth projection, as
> MapInfo would see it. The command seems to work with identical target and
> source projections.
>
> My problem is why does it work on Linux, but not on Windows. I'd love to
> get your views on it Frank.
>
> Cheers,
> Xin
>
> On 09/01/06, Frank Warmerdam <warmerdam at pobox.com> wrote:
> >
> > 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<http://pobox.com/%7Ewarmerdam>
> > and watch the world go round - Rush | Geospatial Programmer for Rent
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20060110/411d0a4c/attachment.htm>
More information about the MapServer-users
mailing list