[Proj] SRS ogr2ogr - cs2cs - postgis

Jaime Mejía jaime at maintask.com
Sat Jun 5 17:52:14 EDT 2004


Hello.

I've simplified my problem, in order to get some help:
I have a shape file (attached) containing a single point (994097.623824 
1003980.4918) in DATUM BOGOTA, called punto_prueba.shp.

When I try to transform it to WGS84 DATUM using ogr2ogr:
----------------------
ogr2ogr -s_srs EPSG:21892 -t_srs EPSG:4326 /home/jaime/resultado_wgs84 
/home/jaime/punto_prueba.shp
----------------------
The point now have the following coordinates: -74.1341093150,4.6350408295

If I take the shape into postgis, and try to transform it, I get the 
following:

----------------------
 SELECT num_radicacion,the_geom,transform(the_geom,1) AS wgs84 FROM 
expedientes WHERE num_radicacion=199931011;
 num_radicacion |                 the_geom                 
|                      wgs84
----------------+------------------------------------------+--------------------------------------------------
      199931011 | SRID=2;POINT(994097.623824 1003980.4918) | 
SRID=1;POINT(-74.1306989066892 4.63219422246886)
----------------------

Finally, using cs2cs:
----------------------
jaime at fileserver[/maintask/clientes/creg]# cs2cs -v +proj=tmerc 
+lat_0=4.599047222 +lon_0=-74.080916667 +k=1.000000 +x_0=1000000.000 
+y_0=1tl +towgs84=307,304,-318,0,0,0,0 +to +proj=latlong +datum=WGS84
# ---- From Coordinate System ----
#Transverse Mercator
#       Cyl, Sph&Ell
# +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
#--- following specified but NOT used
# +ellps=clrk66
# ---- To Coordinate System ----
#Lat/long (Geodetic)
#
# +proj=latlong +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0
994097.623824 1003980.4918
74d7'50.516"W   4d37'55.899"N 16.920
----------------------
74d7'50.516"W   4d37'55.899"N => -74.13069888888 4.63219416666

As you can see, the results are different (+/- 500 m):
With ogr2ogr: -74.1341093150,4.6350408295
With postgis: -74.1306989066892 4.63219422246886
With cs2cs:-74.13069888888 4.63219416666

So, I assume there is an error in the ogr2ogr command, or in ogr2ogr itself.

Somebody can help?




-------------- next part --------------
A non-text attachment was scrubbed...
Name: punto_prueba.dbf
Type: application/octet-stream
Size: 153 bytes
Desc: not available
Url : http://lists.maptools.org/pipermail/proj/attachments/20040605/d3e84bd6/punto_prueba.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: punto_prueba.shp
Type: application/octet-stream
Size: 128 bytes
Desc: not available
Url : http://lists.maptools.org/pipermail/proj/attachments/20040605/d3e84bd6/punto_prueba-0001.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: punto_prueba.shx
Type: application/octet-stream
Size: 108 bytes
Desc: not available
Url : http://lists.maptools.org/pipermail/proj/attachments/20040605/d3e84bd6/punto_prueba-0002.obj


More information about the Proj mailing list