[Gdal-dev] srtm warping question
Michael Heins
mike_alias at heins.ca
Fri Apr 7 14:24:44 EDT 2006
New to list and trying to deal with SRTM data:
I am having a problem warping the NASA SRTM hdr format from the lat/long GEO coord system with WGS84 to a UTM projection in NAD83.
*****
THE REAL QUESTION:
*****
I am interested in knowing how to map SRTM binarys into some other projection system. I do not want a visual reference of the SRTM data. I would like the 16bit elevation data interpolated for the given projection system. How can I accomplish this??
If easier to explain with c++ code, I am well adapt at figuring out things by-example.
*****
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.
Thanks in advance
-mike
________________________________________________________________
Sent via Aserty Enhanced Internet Services, Visit us at http://WWW.ASERTY.COM
More information about the Gdal-dev
mailing list