[Gdal-dev] srtm warping question

Frank Warmerdam warmerdam at pobox.com
Fri Apr 7 19:13:43 EDT 2006


Michael Heins wrote:
> ***** 
> WHAT I'VE DISCOVERED SO FAR 
> ***** 
> 
> Assume c:\downloads\geo\srtmtest\outdef.prj has projection WKT is the following: 
> PROJCS["WGS_1984_UTM_Zone_11N",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_84",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]] 
> 
> I have attempted to use the gdalwarp utility with the following line: 
> gdalwarp -t_srs c:\downloads\geo\srtmtest\outdef.prj -wt Int16 -of EHdr c:\downloads\geo\srtmtest\N43W071.bil c:\downloads\geo\srtmtest\out.bil 
> 
> and got the following output: 
> Creating output file that is 1617P x 1697L. 
> Processing input file c:\downloads\geo\srtmtest\N43W071.bil. 
> :0...10...20...30...40...50...60...70...80...90...Open GDAL Datasets: 
>   1 N DriverIsNULL 512x512x0 
> 
> I noted the 'DriverIsNull' seems to be a problem maybe??  Anyways, the output created is full of nulls (the entire file is the correct size however).  And the associated .prj and .hdr files for ESRI BIL format are also written, and they appear to be correctly translated into UTM definitions. 
> 
> So following this mess, I also wrote some c++ code canabilizing the sample code on gdals website.  This resulted in the same output as was generated with the gdalwarp util. 

Mike,

By way of debugging, I would encourage you to output to GeoTIFF to see if
the problem is related to the EHdr driver.

The next thing I would try is to specify the input coordinate system in case
it is not being picked up from the source data.

eg.
gdalwarp -s_srs WGS84 -t_srs \
    c:\downloads\geo\srtmtest\outdef.prj -wt Int16 -of EHdr \
    c:\downloads\geo\srtmtest\N43W071.bil c:\downloads\geo\srtmtest\out.bil

If you still have no joy, please bundle up an example for me and I'll see
what I can figure out.

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 OSGF, http://osgeo.org




More information about the Gdal-dev mailing list