spacer.png, 0 kB

 

Dewire is a partner of java.net

 
spacer.png, 0 kB spacer.png, 0 kB
Terracopter User Questions and Answers Print E-mail

Mapping data import

Why is my orthofoto not visible after import?

The following situations have been identified when it may occur that the image is not visible after import:

Data mis-match

I imported a dataset using Terraformer, but the image data did not show up in Terracopter, only the height structure with default colors. The reason was that I had used two different datasets, i.e. one dataset för the DTM and another for the orthofoto. So in fact, there was no orthophoto located on the DTM patch.

Make sure that you use overlapping datasets, i.e. DTM coordinates and image coordinates overlap.

In later versions of Terraformer, we'll consider issuing warnings for similar situations or making the data source selection more fail-proof.

Image does not have square pixels

If the image does not have square pixels (e.g. 1000 by 1000 pixels covering an area of 1000 by 1200 meters) you might get the above result. The image resolution need to be such that there are the same number of pixels per unit in both dimensions.

Image resolution not possible to express as a fixpoint number

The resolution may be either provided or implicit (based on the extent of the image as provided in the index file). If the resolution is implicit, it must be an integer or a fixed point number.

Examples of valid implicit resolutions (fixpoint)4, 2.5, 1.0, 0.5, 0.3 and 0.125 (Example: index files sais 600 by 600 metres and the image is 1000 by 1000 pixels, i.e. resolution is 0.6 metres) Examples of invalid implicit resolutions (rational numbers)Rational numbers such as 1/3 or 2/7. (Example: index file sais 1000 by 1000 metres and the image is 300 by 300 pixels, i.e. resolution is 10/3 metres)

Data formats

Where do I get information regarding the formats supported

Go to the fileformats section in the documentation section.

Importing BT (vterrain.org) data

Procedure: Convert BT format data to the Planet format, then import the converted data.

Background

Terraformer is the tool you normally use to import your map data for 3D viewing in Terracopter. Ideally, Terraformer would support all conceivable formats. Unfortunately, it doesn't, at least not yet. In fact, the first release of Terraformer supports ONLY the Planet file format. Faced with the task of bundling some sample data with our distribution, we decided to use the public domain data available from the http://vterrain.org web site. This data is in a format called "BT". In order to do this, without having to implement full BT support in Terraformer, a small C++ utility was written for a one-shot conversion from BT format to PLAnet format. The following is a step-by-step description of how this was done, for the benefit of those of you who need to do something similar.

NOTE: The code included is intended to be an illustration ONLY, and it is NOT supported or vouched for in any way whatsoever! You may, therefore, use it in any way you see fit, including redistribution and modification.

Step 1 - Download the data from vterrain.org

Located alongside this README file are the original elevation data files that are available as a zipfile, and the matching satellite photo, available as a jpg file. The zip file contains two files. The first one is a .bt file that contains the elevation data. The second one is a .prj file that contains additional information on the projection used to create the data. This file is not used at all in the conversion described below.

Step 2 - Write the code

See the BT format documentation for a description of the BT file format. Essentially, it consists of a binary header followed by the actual elevation samples. The samples can be 16- or 32-bit integers, or 32-bit floats. In this case, we are dealing with 16-bit data. The Planet format consists of a text file called index.txt that corresponds to the BT header. The elevation data is put in a separate binary file that is referenced from the index file. The transformation of the data is very straightforward, and easiest understood by consulting the source code in bt2planet.cpp , in the same directory as this README.

Step 3 - Run the conversion utility on the source data

The bt2planet utility accepts the name of the BT file to convert as a command-line parameter, and creates a Planet index file (named index.txt) and binary data file (named binarydem.dat) in the current directory. These two files should be moved to a separate directory (referred to below as the "heights" directory), since this is what Terraformer later expects.

Step 4 - Convert and add the JPEG satellite photo

Terraformer doesn't support JPEG images, so we need to convert the satellite photo to TIFF. Any application that is capable of opening JPEG and saving as TIFF can be used. We used the Windows Imaging application included in Windows 2000 (Start Menu | Programs | Accessories | Imaging). Create a new directory (referred to below as the "images" directory) and put the TIFF file there. This file now has to be referenced from a second index file, in the same way that the elevation data is set up. Copy the index file from the "heights" directory to the "images" directory. Edit this new index file copy and change the name of the referenced binary file to that of your new TIFF file. Now you are set to launch Terraformer to attempt a conversion of this data. It will fail, so read on!

Step 5 – Run Terraformer on the Planet data

Launch Terraformer. Create a new project, giving it a suitable name, for example "coiba". In the "Source data format" drop-down list, select "imex_tems". (This name refers to Ericsson TEMS Cellplanner, which for the purpose of this discussion is equivalent to Planet.) Press the button to the right of the "Source height data" field, and select the "heights" directory. Check the "Use image data" box. Select "image" from the drop-down list. Press the button to the right of the "Source image data", and select the "images" directory. Click the "Analyse input data" button. At this point, Terraformer will complain that the dimensions of the image file do not match the dimensions in its index file. Dismiss the error message, but leave Terraformer running.

The TIFF file is 2048x2048 pixels, and the corresponding value calculated from the information in the index file is 2049x2049. The format of the single line in the index file is:

<file> <xmin> <xmax> <ymin> <ymax> <resolution>

To reduce the perceived size of the grid by one pixel, we need to reduce the max values by one resolution unit, i.e. we need to subtract the resolution value 20 from the third and fifth fields, yielding:

coiba_ls7_2048.tif 400777 441737 808217 849177 20

Open the index file in a text editor, make the change and save the file. If you left Terraformer running, just click the "Analyse input data" button again. This time, after processing that may take several minutes, it should work fine.

From now on, no more hacking or data massaging is necessary, so for the final steps through the Terraformer workflow we refer you to the Terraformer User's Guide.

Acknowledgements

We would like to extend our sincere thanks to the people at vterrain.org

 

User's questions:

A small note about bt2planet. It appears that there is a bug in how the elevations are converted; either rows/columns are swapped or the data is flipped.

I believe this is the case, because in the Coiba example, in Terracopter, the elevation does not match the imagery. There is significant elevation in the ocean areas.

For more info, email me direct at This e-mail address is being protected from spam bots, you need JavaScript enabled to view it

Reply:

Yes. There was a bug in the conversion utility, which flipped the terrain upside down. I have attached a better version to the original post. This also means that the Coiba data that is included in the download package is incorrect, both the raw Planet and the pre-converted data. We will publish a new version within a couple of hours. Terribly sorry about this.

/Mathias

Importing corrupt data (byteswapped and height offset)

I had a problem with importing a Planet format dataset. The result was that the height formations where totally screwed up. I noticed that the data was bytespapped and that the heights were 27 meters too high. Tha latter was eventually determined by noticing that the shoreline of the data was not attached to the sea. I knew the area, and there is no 27 meter dropdown along the beach.

The attached script (see end of post) does the byteswapping and height adjustment. Please feel free to use it (on your own risk). You'll need to change the line:

for $n (1 .. 5 ) {
and

$filename="dtm_DTM$n";
 
as well as adjusting the height offset:

$h -=27; # Take away offset of (probably) 24 metres
..before using it.

Obviously I also had to update the index-file afterwards.

Original index file:

 dtm_DTM1             686100 688100 7460400 7462400 1
dtm_DTM2 688100 689700 7460400 7462400 1
dtm_DTM3 686100 688100 7458400 7460400 1
dtm_DTM4 688100 689700 7458400 7460400 1
dtm_DTM5 686100 688100 7458135 7458400 1

Updated index file:

 new_dtm_DTM1             686100 688100 7460400 7462400 1
new_dtm_DTM2 688100 689700 7460400 7462400 1
new_dtm_DTM3 686100 688100 7458400 7460400 1
new_dtm_DTM4 688100 689700 7458400 7460400 1
new_dtm_DTM5 686100 688100 7458135 7458400 1

After that, I user the Data import tool and had no problems.

Installation issues 

Installation problem (Windows 98)

One user reported getting the attached screen when launching Terracopter after installing on Windows 98.

We do not support Windows 98 installations, but since we have had reports that Terracopter actually works on upgraded and powerful machines, we have not configured the installer to reject installation on Windows 98 entirely.
This problem has not been further analyzed, but it is not likely that it would have negative effects on Terracopter or associated software.

Update: The problem has been identified and resolved. From build 574 and on, you should not see this message.

Performance issues 

Which chips are supported and non-supported?

We do not have the complete list of compatible graphics chipsets - yet. Most of the development has been done on machines with nVidia GeForce cards. Terracopter has occasionally been tested also on other cards with OpenGL support. News about other cards where Terracopter has been working well will be supplied below. Feel free to post information about your card. This post will be updated

Positive results

Chip type

Results

First report from

ATI FireGL 8800 (128 MB)

:)

maho

Intel 82845G (64 MB)

:)

d99marob

nVidia GeForce2 Go (32 MB)

:)

fredarin

nVidia GeForce4 Go (64 MB)

:)

maho

nVidia Quadro2 Pro (64 MB)

:)

mhedelius

 

Negative results

Chip type

Results

First report from

TBA

TBA

TBA

 

How do I know which chip I have?

Use Start -> Run -> dxdiag and go to the Display tab once tha data has been collected. Look for "Chip Type".

If dxdiag is not installed you most likely do not have any 3D hardware installed.

Change Requests

Transparent height indication.

I'd like to see a feature where a (or several) colored transparent layer is displayed on a certain height over sea level. It'd make it easier to study height variations over a dataset. For example regarding flooding. See here

It should be possible to set and get the height and color of the transparent layer. 

3D Ruler

I'd like to see a 3D ruler in Terracopter. I.e. something making it posssible to determine the 3D distance as well as delta-X, delta-Y and delta-Z between two points of the dataset.

See this image and you'll get the idea about the visual part. 

 
 
< Prev   Next >
spacer.png, 0 kB

Client Login

Authorized clients may log in to activate additional features, including documents, downloads and software licenses.





Lost Password?
spacer.png, 0 kB
spacer.png, 0 kB
spacer.png, 0 kB
  spacer.png, 0 kB