[Gdal-dev] Question about reprojecting a Shapefile

Luke Roth roth.luke at gmail.com
Mon May 7 15:08:02 EDT 2007


Frank,

Thanks - that did the job.  I completely missed the +datum option in
the documentation.

Luke

On 5/4/07, Frank Warmerdam <warmerdam at pobox.com> wrote:
> On 5/4/07, Luke Roth <roth.luke at gmail.com> wrote:
> > Hello all,
> >
> > I've been using GDAL for some time, but am fairly new at using OGR.
> > I've started by trying to reproject a shapefile from geographic
> > coordinates into another coordinate system (LCC) using ogr2ogr and
> > when I look at the output it looks like the .prj file is incomplete
> > (missing datum) and the features are in the wrong locations.  What am
> > I missing?  I've read through the archives, but I didn't see anything
> > like this mentioned.
> >
> > My command line looks like:
> > ogr2ogr -overwrite -f  "ESRI Shapefile" -t_srs "+ellps=WGS84 +proj=lcc
> > +lon_0=-82.85w +lat_0=40.39n +lat_1=39.39n +lat_2=41.39n"
> > "c:\images\output.shp" "c:\images\input.shp"
>
>
> Luke,
>
> Try this with +datum=WGS84 instead of +ellps=WGS84 for
> the target srs.  I believe this will fix the problem.  Stating
> the ellipse is a lot less specific than stating the datum.
>
> 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 Gdal-dev mailing list