[Gdal-dev] ogr2ogr srs

Jaime Mejía jaime at maintask.com
Thu Jun 3 17:37:22 EDT 2004


Hi all,

We have converted an Arc/Info coverage in BOGOTA DATUM to SHP in WGS84
DATUM through OGR with the following command:
ogr2ogr  -s_srs merc_bogota -t_srs wgs84  vias_cobertura  /BIN/vias
where the file merc_bogota contains the following line with the required
parameters to perform the transformation from BOGOTA DATUM to WGS84 DATUM:
+proj=tmerc +lat_0=4.599047222 +lon_0=-74.080916667 +k=1.000000
+x_0=1000000.000 +y_0=1000000.000 +ellps=intl +towgs84=307,304,-318,0,0,0,0
and the file wgs84 contains the line:
+proj=latlong +datum=WGS84
We have made a sampling using a GPS with WGS84 DATUM and we generated a
shape called "vias_gps".
When we overlaps vias_cobertura and vias_gps we found a difference of
±500m.
On the other hand, we converted the Arc/Info coverage to shape with the
same DATUM (BOGOTA), then we loaded it into PostGIS using shp2psql with
SRID=2 and from PostGis we transformated from BOGOTA DATUM to WGS84
DATUM with the function: transform(vias,1).
When we overlaps this with vias_gps, everything is fine.
In the PostGIS table spatial_ref_sys, we can find BOGOTA and WGS84 DATUM
as follows:

 srid | auth_name | auth_srid | srtext | proj4text

       2 | EPSG      |     21892 | PROJCS["Bogota / Colombia Bogota
zone",GEOGCS["Bogota",DATUM["Bogota",SPhemosROID["International
1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",4.59904722222222],PARAMETER["central_meridian",-74.0809166666667],PARAMETER["scale_factor",1],PARAMETER["false_easting",1000000],PARAMETER["false_northing",1000000],UNIT["metre",1]] 

| proj=tmerc +ellps=intl +k=1 +x_0=1000000 +y_0=1000000
+lon_0=-74.0809166666667 +lat_0=4.59904722222222
+towgs84=307,304,-318,0,0,0,0 +units=m

   1 | EPSG      |      4326 | GEOGCS["WGS
84",DATUM["WGS_1984",SPhemosROID["WGS
84",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]] 


It seems like ogr2ogr does not recognize the last parameters' part:
"+towgs84=307,304,-318,0,0,0,0"

There is something wrong with the command or with the projection's
parameters?

Thanks a lot,
-- 

Cordial saludo,

Jaime Mejía Molina
*MAIN TASK*
Teléfono: 	218 46 08
Dirección: 	Diagonal 85 # 28-39

	Bogota D. C., Colombia
e-mail: 	jaime at main-task.com <mailto:jaime at main-task.com>
website: 	www.main-task.com <http://www.main-task.com/>





More information about the Gdal-dev mailing list