[Gdal-dev] Needs help for reprojecting a shapefile with ogr2ogr

Jean-Claude Repetto jean-claude.repetto at worldonline.fr
Fri Dec 8 10:47:32 EST 2006


Hello,

I have downloaded a shapefile of France (freely available from the IGN 
website at 
<http://www.ign.fr/telechargement/MPro/produit/GEOFLA_Dep/GEOFLA-dep-L2-SF.ZIP> 
).
The shapefile contains data in tangent Lambert Conic Conformal 
projection, but I need geographical coordinates (longitudes, latitudes).

I am trying to convert the shapefile with ogr2ogr, but the result is wrong.

Since the projection and CS informations are not included in the 
original files, I have used the s_srs option to specify them (the 
tangent Lambert Conic Conformal projection (lcc1) and the NTF system).

ogr2ogr -f "ESRI Shapefile" -s_srs "+proj=lcc +no_defs +lat_1=46.8 
+lon_0=0 +k_0=0.99987742 +x_0=600000 +y_0=2200000 +ellps=clrk80 
+pm=paris"  -t_srs "+proj=longlat +nodefs +datum=WGS84 
+towgs84=168,60,-320" wgs dep_france_dom.shp


The coordinates of the first point of the original file are :
X=801150 Y=2092615

The result of the ogr2ogr command gives :
long = 6.468923293704749,   lat = -0.979340169729739, which is obviously 
wrong.

cs2cs gives the correct result :
echo "801150 2092615" | cs2cs -f "%15.10f" +proj=lcc +no_defs 
+lat_1=46.8000 +lon_0=0 +k_0=0.99987742 +x_0=600000 +y_0=2200000 
+ellps=clrk80 +pm=paris +to +proj=longlat +datum=WGS84 +towgs84=168,60,-320
    4.9245201351   45.8040401819   41.9436330358


Am I doing something wrong, or is there a bug in GDAL 1.3.2 ?


For more information about the projection parameters, you can look at :
<http://www.remotesensing.org/geotiff/proj_list/lambert_conic_conformal_1sp.html> 
and <http://www.ign.fr/telechargement/MPro/geodesie/CIRCE/transfo.pdf>, 
page 12.

Thanks for your help,
Jean-Claude








More information about the Gdal-dev mailing list