Re: [Flightgear-devel] Scenery file formats: SRTM elevation data source

2007-09-21 Thread Ralf Gerlich
Hi David,

TerraGear is really an issue for itself and I up to now have only been
successful building it on Unix systems. AFAIK it is completely missing a
build environment for MS Visual Studio.

David Pérez-Piñar López wrote:
 I've been able to successfully build FlightGear without much pain - just
 a couple of tweaks, as I'm working on a Windows XP / Visual Studio 2005
 Express environment, and everything runs fine.

Great!

 However, I've tried also the TerraGear package, a completely different
 story. My interest is not just to compile it, but to update my
 FlightGear scenery with more accurate data.

I don't think anybody expected you to try compiling TerraGear just for
the fun of it - let alone on a currently unsupported platform. ;-)

 I've got elevation data from SRTM Data
 (http://srtm.csi.cgiar.org/SELECTION/inputCoord.asp), which gives
 you data for a relatively large area into one unique file. It's a very
 convenient source, as they have already done the hard work for filling
 voids with interpolated elevations. As this is not the same source
 TerraGear is programmed for, I was planning to reprogram the file
 interface section in order to adapt it to my source.

For importing GeoTIFF'd data I have created a gdalchop utility which
uses GDAL to import elevation data from any format supported by GDAL,
including GeoTIFF. A patch is available from
http://svn.qmx-systems.com/fgfsbuilder/trunk/products/TerraGear/patches/gdal-03gdalchop.patch

It's not yet perfect as it produces artifacts for reasons I do not
understand currently and it's pretty slow due to me doing things a bit
more complicated than necessary (as I found out just recently). I
currently don't have the time and motivation to continue working on it,
but you might find this a good starting point, as an alternative to
Jon's conversion tips.

One of the problems is that the HGT files include data for all the
borders while the CGIAR files only contain data e.g. from 10 deg east to
19 deg 59 min 57 sec east, i.e. the east and north borders are typically
missing. TerraGear, however, requires the tiled elevation files (the
.arr.gz stuff) to include the border data. So merging adjacent CGIAR
tiles might be necessary before conversion.

 After several attempts and many hours trying to compile TerraGear,
 I have finally made it for the chop utility. However, as the data file
 is different from the one used in the original implementation
 of hgtchop, I will need to modify the code. For that reason, I ask you
 some specific information I'm not able to infere from the code: What is
 the size (lat-long) of elevation files generated by the original code?

The elevation files cover exactly one tile. The height of a tile is
always 1/8 degree of latitude and the width in degrees longitude varies
with latitude so that a tile is always about the same width in miles.
See SimGear/simgear/bucket/newbucket.hxx for a definition of
SG_BUCKET_SPAN (height in degrees latitude) and sg_bucket_span() (width
in degrees longitude).

This size must be maintained and the distance of points can be chosen to
be a constant and integral number of arcseconds which is written in the
header of the .arr.gz-file. The code for parsing and writing these files
is in TerraGear/src/Lib/Array/array.{hxx,cxx}

There is no proper documentation that I know of, but the parser and
writer code for the .btg.gz-files can be found in
SimGear/simgear/io/sg_binobj.{hxx,cxx}. However, I suspect that if
you're going for the .btg.gz files directly just because of CGIAR-files,
you might be going a bit over the top.

Cheers,
Ralf

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


[Flightgear-devel] Scenery file formats: SRTM elevation data source

2007-09-20 Thread David Pérez-Piñar López
Hi all,
 
This is my first submission to the list, but I've been around for a while.
Not sure if this is the correct list to post about this; if not, please, let
me know and accept my apologies.
 
I've been able to successfully build FlightGear without much pain - just a
couple of tweaks, as I'm working on a Windows XP / Visual Studio 2005
Express environment, and everything runs fine.
 
However, I've tried also the TerraGear package, a completely different
story. My interest is not just to compile it, but to update my FlightGear
scenery with more accurate data. Specifically, I'm trying to improve the
terrain elevation data and the surface textures to make them more realistic
around my area of interest (north-west of Spain). I've got elevation data
from SRTM Data (http://srtm.csi.cgiar.org/SELECTION/inputCoord.asp), which
gives you data for a relatively large area into one unique file. It's a very
convenient source, as they have already done the hard work for filling voids
with interpolated elevations. As this is not the same source TerraGear is
programmed for, I was planning to reprogram the file interface section in
order to adapt it to my source.
 
After several attempts and many hours trying to compile TerraGear, I have
finally made it for the chop utility. However, as the data file is different
from the one used in the original implementation of hgtchop, I will need to
modify the code. For that reason, I ask you some specific information I'm
not able to infere from the code: What is the size (lat-long) of elevation
files generated by the original code? Is it important to maintain the exact
same size for the rest of the scripts/utilities to run properly? If the size
is important, should it be an exact number of data points or an exact
physical coverage of earth? And, finally, is there any document/readme with
the intermediate and the final scenery file formats? This would help me a
lot, although I know I could get this info from the code itself.
 
By the way, I have also tried the FGSD (Scenery Designer), but I'm not able
to make it work; it does start, but no way to import FG scenery data without
a crash.
 
Thanks a lot in advance,
 
David
 
--
David Pérez-Piñar López
[EMAIL PROTECTED]
Grupo de Tecnología de la Señal
Universidad de Vigo
http://www.tsc.uvigo.es http://www.tsc.uvigo.es/ 
986 812683
 
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Scenery file formats: SRTM elevation data source

2007-09-20 Thread Jon Stockill
David Pérez-Piñar López wrote:
 Hi all,
  
 This is my first submission to the list, but I've been around for a 
 while. Not sure if this ichs the correct list to post about this; if not, 
 please, let me know and accept my apologies.
  
 I've been able to successfully build FlightGear without much pain - just 
 a couple of tweaks, as I'm working on a Windows XP / Visual Studio 2005 
 Express environment, and everything runs fine.
  
 However, I've tried also the TerraGear package, a completely different 
 story. My interest is not just to compile it, but to update my 
 FlightGear scenery with more accurate data. Specifically, I'm trying to 
 improve the terrain elevation data and the surface textures to make 
 them more realistic around my area of interest (north-west of Spain). 
 I've got elevation data from SRTM Data 
 (http://srtm.csi.cgiar.org/SELECTION/inputCoord.asp), which gives 
 you data for a relatively large area into one unique file. It's a very 
 convenient source, as they have already done the hard work for filling 
 voids with interpolated elevations. As this is not the same source 
 TerraGear is programmed for, I was planning to reprogram the file 
 interface section in order to adapt it to my source.

This page:

http://topofusion.com/3d.php

Has details on converting GeoTIFF files to USGS ASCII DEM files.

Once converted you should be able to use demchop to process the 
resulting file.

Jon

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel