[Gdal-dev] problem abotu reprojection with ogr2ogr

Lijian Shi lijian.shi at und.nodak.edu
Wed May 9 11:07:19 EDT 2007


Hi, Frank,

Thank you very much for your information. I tried the command you suggested
but there is still a 25 meter shift.

I transformed the projection with ArcGIS and got good result without shift. 

Best regards,

Lijian

-----Original Message-----
From: Frank Warmerdam [mailto:warmerdam at pobox.com] 
Sent: Tuesday, May 08, 2007 7:53 PM
To: Lijian Shi
Cc: gdal-dev at lists.maptools.org
Subject: Re: [Gdal-dev] problem abotu reprojection with ogr2ogr

Lijian Shi wrote:
> Hi, everyone,
> 
>  
> 
> I have a shp file and landsat data of the same field, but these data's 
> projections are different. The projection information of shp file is
below:
> 
>  
> 
>
GEOGCS["GCS_Assumed_Geographic_1",DATUM["D_North_American_1927",SPHEROID["Cl
arke_1866",6378206.4,294.9786982]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0
174532925199433]]
...
> ogr2ogr -s_srs input.prj -t_srs landsat.prj output.shp input.shp
> 
> When I put the output.shp and input.shp into ArcGIS together, there a 
> shift between two file. Dose anyone know the reason? Is there any 
> problem with my command?

Lijian,

I think the first question is to determine whether ogr2ogr is applying
the expected NAD27 to WGS84 datum correction or not.  What is the apparent
offset?  1m?  100m?  1000's of meters?

If it is 1m it might just be some sort of precision issue.  If it is
10's of meters or 100's of meters then it is likely that the NAD27 to
NAD83 datum shift isn't being applied.  If it is thousands of meters or
more than it is likely some other issue.

One technique to test if datum shift files are being applied is to
set the PROJ_DEBUG environment variable to some value. Then PROJ.4
should report each file it opens.  If it doesn't reporting opening a
file with a name like "conus" then or ntv1.gsb then it isn't even
trying to do the datum shifting.

The input NAD27 geographic coordinate system looks odd.  You might try
altering your command to use:

   ogr2ogr -s_srs NAD27 -t_srs landsat.prj output.shp input.shp

This will provide a less ambiguous declaration that the input
coordinate system in NAD27.

Best regards,
-- 
---------------------------------------+------------------------------------
--
I set the clouds in motion - turn up   | Frank Warmerdam,
warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org




More information about the Gdal-dev mailing list