[Gdal-dev] Question about reprojecting a Shapefile

Luke Roth roth.luke at gmail.com
Fri May 4 16:54:53 EDT 2007


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"

The original .prj:
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.017453292519943295]]

The resulting .prj:
PROJCS["Lambert_Conformal_Conic",GEOGCS["GCS_WGS_1984",DATUM["D_unknown",SPHEROID["WGS84",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["standard_parallel_1",39.39],PARAMETER["standard_parallel_2",41.39],PARAMETER["latitude_of_origin",40.39],PARAMETER["central_meridian",-82.85],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["Meter",1]]

Thanks,
Luke



More information about the Gdal-dev mailing list