[gdal-dev] Geocentric 9603

Luca Sigfrido Percich sigfrido at tiscali.it
Fri May 6 09:48:01 EDT 2011


Hi Mario,

Il giorno ven, 06/05/2011 alle 12.56 +0000, mario santos serrano ha
scritto:


> I converted a DXF file to a shapefile using 'ogr2ogr' command. When I
> use the "-t_srs" parameter the system tells me: "Can't transform
> coordinates, source layer has no coordinate system. Use -s_srs to set
> one."

-a_srs should be used to translate a source file which has no SRS
definition (like DXF or SHP with no .prj file) into a georeferenced
format: the original coordinates are not transformed, and an srs
definition is associated to the target dataset.

> The command '-s_srs' override source SRS.  What is the difference
> between '-s_srs' and '-a_srs' command? What is the exact meaning of
> "Assign an output SRS"? I don't understand that.

-s_srs can be used when to replace (override) the source file SRS
definition, or to set it if a transformation with -t_srs is needed. You
can only transform from one SRS to another one, that's why -t_srs will
not work with DXF if you don't declare the DXF srs with -s_srs.

> I use the '-s_srs' command and when I overlay the shapefile over a
> map,the adjustment isn´t very good with the map, so I must make a
> geographic transformation. I get that transformation thanks to
> 'ProjectionUtility' (ArcView). Its name is Geocentric[9603],
> ED_1950_TO_WGS_1984_13, POSC Code:8045.
> 
> I need to make this transformation automatically. How can I make this
> transformation using 'ogr2ogr'? Is it possible?

I'm just guessing 'cause I've never tried this. Check if ProjectUtility
writes a .prj file; it should contain a WKT definition of the resulting
dataset SRS. According to ogr2ogr doc, this WKT (or the name of the file
containing it) can be passed to -t_srs or -a_srs.

Try and let us know.

Hope this helps

Sig

> 
> Thank you very much
> 
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev




More information about the gdal-dev mailing list