projection in meter

Started by drongo, February 07, 2011, 12:41:38 PM

Previous topic - Next topic

drongo

Hello,

I would like to know what kind of projection Terragen is using to calculate the meter-values for Image-Shaders and so on. If I download SRTM-Data of 5 by 5 degree and a map of the same area, both in WGS84, I have problems to find a width-value for the Shader-Image-Size.
In the image you see an area around Kirghizia. I converted the SRTM-Data to .ter using VTBuilder. The map is from ArcMap, using a Web-Service. I georeference the .ter in Terragen, the center of the planet becomes the center of the SRTM-part. With GoogleEarth and with the measure-tool (using Loxodrome) in ArcMap, I got this meter-value of the upper part: 394km. But of course, the southern part is larger: 426km. If I take the northern value, I got the result you can see in the first image.
If I take a transverse mercator projection like UTM and alter the central meridian to the center of my SRTM-part (77.5 degree, in my case), I get the second image. The map ist distorted correctly but doesn't fit in north and south. I guess the center has to be shifted to the north a few kilometers, because the distorsion is bigger in the north. But how much?
Not easy to bring an georeferenced image from ArcMap to Terragen... How about a reading georeferencing information from Geotiff or WorldFiles?
My problems so far:
- which projection exactly?
- how to easily measure the size of the map (not using the measure-tool, zoom, click...)?
- how to calculate the center point?

>> edit: "calculated" the center point by zooming in very far in arcmap... works now... but still very workaroundish.

Greetings,
Drongo

RArcher

Hi Drongo,

If you can provide download locations for the data you are working with, I will try to write up a workable method for you to get the data imported and positioned correctly.


drongo

Thanks, but I don't need it for one specific location. I will have many locations from time to time. The method descript above is working, but very complicated. I would like to have it more easy to use my georeferenced data in Terragen.
At first, it would be helpful to get the definition of the internal projection.

Greetings,
Drongo

RArcher

Alright, not using the data you are currently it makes it a little harder to tailor instruction directly for you but here is my general process for working with the SRTM data and overlay maps:

1. Open SRTM file in GlobalMapper (or whatever GIS program you happen to like)
2. SRTM files are typically in Geographic (lat/long) projection with a WGS84 datum.  This is my preferred projection as it gives you a rectilinear image (straight sides) unless you are working with either very Southerly or Northern Latitudes where geographic does not work as well.
3. Export the data as either a 32 bit geotiff or Terragen Terrain file.  If you want to be working with accurate GIS data, the geotiff file would likely be the preferred method.
4. Export your overlay maps with the same projection and size as your dem data.
5. Determine the size in meters of the dem data either using your GIS tools, or by loading the .ter heightfield into TG 0.9x which will give you the size in meters of the terrain.  I am sure that this measurement will be available in TG2 at some point in the future.
6.  Load the Geotiff or .ter file into TG2 (If you loaded the Geotiff file, you will need to adjust the Lat/Long at apex values in the planet node to be somewhere in relation to the geographic area you loaded.  (for example:  If I loaded a heightfield that covered 20 Degrees N to 25 Degrees N and 105 Degrees W to 100 Degrees W - I would enter something such as 22.5, -102.5 into the apex fields.  What this will do is adjust the heightfield to be visible in the preview window.  If you do not do this then your heightfield may be tough to find on the planet as it could be on the opposite side from where the preview window is pointing.)
7.  Load your overlay map as an image map shader.  Choose the Projection type as Plan Y and adjust the size to be what you determined earlier from the size of the DEM.

Using other projections such as UTM is fine but you will either need to crop the dem within the boundaries into a rectangular format or deal with having extra "white space" outside of your data area.

Here is a tutorial that is somewhat out of date (was written prior to being able to load geotiff files etc.) but it at least shows some pictures of much of the above:  http://www.archer-designs.com/tutorials/terragen2/working-with-gis-data/index.html

drongo

Hello,

that is exactly what I did in first place. You find the result in the left part of my image. The problem is: there can't be ONE width in meter of an area which is using geographic coordinates or atleast not for larger areas. The more you go to the north the less meter I have in an area of one degree. That is why I need to know the projection Terragen 2 is using to project my image with a size of x*y meters to the earth...

But thanks for the text,
Drongo

RArcher

Using your particular example of SRTM 5 deg X 5 deg file (#52_04) - 40 degrees North - 45 degrees North and 75 degrees East - 80 degrees East.

In your example case the SRTM file covers an exact area of 487573.6 meters x 487573.6 metres.

Loading via my previous instructions both the map and the dem line up perfectly.

drongo

#6
I was working with ArcMap and VTBuilder to get the data. This time I was doing it exactly like you descriped:
- GlobalMapper: open SRTM (here: http://tinyurl.com/5v4zqos) and export 1) as 32bit-Elevation-GeoTiff, 2) as PNG-Color-Image and 3) as Terragen-Elevation-File
- open terragen-file in Terragen Classic and get a size of 488271,1 * 488271,1 meters
- load elevation-geotiff in Terragen 2
  - first difference: I can load a GeoTiff (not working using one from ArcMap (only 16bit))
- like before, the Auto-Georeferencing is not working, I have to give the coordinates of the corners by my self: North 45° and West 75° up to South 40° and East 80°. This matches the metadata in the .hdr-file of my SRTM-data, as well as the description in ArcMap
- I change the Planet apex to 42.5 and 77.5
- I add the image map shader with Plan Y and Position Center of 0,0 and the size from terragen classic
- but the result: the elevation data is a rectangular, the image a square.
- if i take the northern or southern width from arcMap or GoogleEarth (the actual one, not some projected (because no one can tell me the projection terragen is using)), than I have again an image like before: it fits in the height, but not in the width (shorter or larger at one boarder)
- maybe the secret lays in the georeferencing of the elevation data? is this working for you? how to export the GeoTiff that Terragen is able to read the position data and reproject it in its own coordinate system.

Greetings,
Drongo

drongo

mmmmhhh... dont get it... now it works... somehow...
I did export it again as geotiff. with projection- and world-file. now it gets the georeferencing correctly from the file. But it does not care about the apex of the planet. the image map shader is placed in the center (or lower left) of the height field, no matter what I type in at apex... why is that?
But okay, the image is mapped correctly to the surface. With the size from arcMap, using the width of the northern border.

monks

That's a great tut Ryan. Bookmarked for future reference. ;)

monks