[gdal-dev] Sphere projection definition problem with ogr2ogr

Limei Ran lran at unc.edu
Wed Nov 28 15:54:25 EST 2007


Hi:

I can not define the earth sphere as +a=6370000.0 +es=0.0 when I use 
ogr2ogr command.  For instance,
./ogr2ogr -f "ESRI Shapefile" -a_srs "+proj=lcc +a=6370000.0 +es=0.0 
+lat_1=33 +lat_2=45 +lat_0=40 +lon_0=-97" out.shp in.shp
will fail.  But,

./ogr2ogr -f "ESRI Shapefile" -a_srs "+proj=lcc +a=6370000.0 
+b=6370000.0 +lat_1=33 +lat_2=45 +lat_0=40 +lon_0=-97" out.shp in.shp
will work.

cs2cs in PROJ.4 will allow you to define the sphere as +a=6370000.0 +es=0.0.

A sphere in OGR can only be defined as +a=6370000.0 +b=6370000.0, 
right?  Also, do I always need +no_defs in projection definition?  What 
is it for?

Thanks,

Limei


More information about the gdal-dev mailing list