[Gdal-dev] projection with ogr2ogr
mateusz at loskot.net
Tue Mar 6 11:55:18 EST 2007
Lijian Shi wrote:
> Now I want to use ogr2ogr to project the shp file in order that the
> shp file has the same geoinformation(same projection, same datum)
> with the geotiff file. I use the command like:
> ogr2ogr -s_srs WGS84 -t_srs EPSG:code utm2.shp point.shp
If I understand you correctly, you have georeferenced GeoTIFF and
you have a Shapefile *without* any referencing.
Now, you have read SRS details from GeoTIFF - it is WGS84 with
EPSG code 4326 - and you want to *assign* the same
one to your Shapefile.
If that's what you want to do, then the command should look as follows:
ogr2ogr -a_srs EPSG:4326 out.shp point.shp
where -a_srs means you want to *assign* SRS to output Shapefile (out.shp).
> Am I right? If right, how can I get the code?
Here is the code, in the GeoTIFF details:
More information about the Gdal-dev