Re: SRTM1 data only avail. from Seamless, not in tiles; how to process in TG?

Hamish <[email protected]> Mon, 20 Mar 2006 13:28:25 +1200
Newsgroups gmane.games.flightgear.terragear.devel
Message-ID <[email protected]>
> I took a look and one of the tools you could use it hgtchop.
> >From what I've read hgt and bil are the same format (unless there was
> an endian swap). They're both raw binary files.
> So theoretically what you could do is :
> 
> 1. Download from Seamless in BIL format.
> 2. Change the extension from .bil file to .hgt
> 3. Rename the file so that it conforms to the hgt file name format.
> This is because the geographical origin/location of the dem file is
> determined  from the file name in TerraGear/src/Lib/HGT/hgt.cxx (line
> 118)
> 
> I haven't tested it but it should work.


Yes, this is how GRASS imports HGT for its r.in.srtm module, note the
auto-creation of the needed BIL .hdr file.

http://freegis.org/cgi-bin/viewcvs.cgi/grass6/scripts/r.in.srtm/

http://freegis.org/cgi-bin/viewcvs.cgi/*checkout*/grass6/scripts/r.in.srtm/r.in.srtm?rev=HEAD&content-type=text/plain


Markus's notes in the header:
#########################
#Derived from:
# ftp://e0dps01u.ecs.nasa.gov/srtm/Documentation/Notes_for_ARCInfo_users.txt
#     (bugfix: the USGS document was updated silently end of 2003)
#
# ftp://e0dps01u.ecs.nasa.gov/srtm/Documentation/SRTM_Topo.txt
#  "3.0 Data Formats
#  [...]
#  To be more exact, these coordinates refer to the geometric center of 
#  the lower left pixel, which in the case of SRTM-1 data will be about
#  30 meters in extent."
#
#- SRTM 90 Tiles are 1 degree by 1 degree
#- SRTM filename coordinates are said to be the *center* of the LL
#pixel.
#       N51E10 -> lower left cell center
#
#- BIL uses *center* of the UL (!) pixel:
#      http://downloads.esri.com/support/whitepapers/other_/eximgav.pdf
#  
#- GDAL uses *corners* of pixels for its coordinates.
#
# NOTE: Even, if small difference: SRTM is referenced to EGM96, not
# WGS84 ellps http://earth-info.nga.mil/GandG/wgsegm/egm96.html
#
#########################


work backwards from that script....


Hamish

_______________________________________________
Terragear-devel mailing list
[email protected]
http://mail.flightgear.org/mailman/listinfo/terragear-devel
2f585eeea02e2c79d7b1d8c4963bae2d