[gdal-dev] Reprojection troubles

fork forkandwait at gmail.com
Fri May 13 00:04:37 EDT 2011


Hi all,

I am trying to get a reprojected image to jive with a geometry stored
in PostGIS, but
they won't overlay correctly, probably because I have done something
either newbie-ish
or just plain dumb.  So now I am asking for help...

Basically, I want the tif with the corresponding .tfw here

$ cat foo.tfw
10.7549933722
0.0000000000
0.0000000000
-10.7549933722
358128.5398801235
272675.6998673787

to more or less match the bbox here:

tiger2010=# select getbbox (the_geom) from annexpoly;
                      getbbox
----------------------------------------------------
 BOX(1206737.375 866782.5625,1234465.5 882399.875)
 BOX(1204461.875 864485.6875,1234562.5 882414.6875)

But it doesnt, at all.

More background:

I started with a NAIP image, cut a tiff out with GeoViewer, and ran
gdalwarp like so:

$ gdalwarp -s_srs ortho_imagery/ortho_1-1_1n_s_wa033_2009_1.prj -t_srs
ESRI::spwasth.prj -co "TFW=YES"
ortho_imagery/ortho_1-1_1n_s_wa033_2009_1.tif foo.tif


Here is the .prj for target projection:
$ cat spwasth.prj (from spatialreference.org)
PROJCS["NAD_1983_HARN_StatePlane_Washington_South_FIPS_4602",GEOGCS["GCS_North_American_1983_HARN",DATUM["D_North_American_1983_HARN",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["False_Easting",500000],PARAMETER["False_Northing",0],PARAMETER["Central_Meridian",-120.5],PARAMETER["Standard_Parallel_1",45.83333333333334],PARAMETER["Standard_Parallel_2",47.33333333333334],PARAMETER["Latitude_Of_Origin",45.33333333333334],UNIT["Meter",1]]


and here is the prj for the source projection (from USDA in their zip bundle):
$ cat ortho_imagery/ortho_1-1_1n_s_wa033_2009_1.prj
PROJCS["NAD_1983_UTM_Zone_10N",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000],PARAMETER["False_Northing",0],PARAMETER["Central_Meridian",-123],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0],UNIT["Meter",1]]


Here is some stuff in the postgis db of possible interest:

tiger2010=# select f_table_name, srid from geometry_columns where
f_table_name = 'annexpoly';
 f_table_name |  srid
--------------+---------
 foopoly    | 9102349
(1 row)

tiger2010=# select * from spatial_ref_sys where srid = 9102349;

srid | 9102349 auth_name | esri auth_srid | 102349 srtext |
PROJCS["NAD_1983_HARN_StatePlane_Washington_South_FIPS_4602",GEOGCS["GCS_North_American_1983_HARN",DATUM["NAD
83_High_Accuracy_Regional_Network",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.0174
53292519943295]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["False_Easting",500000],PARAMETER["False_Northing",0],PARAMETER["Central_Meridian",-120.5],PARAMETER["Standard_Parallel_1",45.83333333333334],PARAMETER["Standard_Parallel_2"
,47.33333333333334],PARAMETER["Latitude_Of_Origin",45.33333333333334],UNIT["Meter",1],AUTHORITY["EPSG","102349"]]
proj4text | +proj=lcc +lat_1=45.83333333333334 +lat_2=47.33333333333334
+lat_0=45.33333333333334 +lon_0=-120.5 +x_0=50000 0 +y_0=0 +ellps=GRS80 +units=m
+no_defs


Could anyone debug my problem for me (*wink*)?  I have looked at the
overlay in both QGIS and ESRI, and can't get it to jive and can't
figure out how or why....

Thanks in advance for any pointers!
-- 
Asking a question on a newsgroup?  Read this first:
http://www.catb.org/~esr/faqs/smart-questions.html


More information about the gdal-dev mailing list