Support > Environment models
Texture and base maps from Google Maps using Plane Sailing
(1/1)
elir71:
I've been playing with doing a model of a real world canal based on a real world example. I came accross the problem of getting the canal segments to line up, each one being a separate heightmap and texture in each section of terrain.ini each based on googlemap printscreen and crop.
Based on plane sailing formulae
INPUTS from the URL of the google map page
https://www.google.co.uk/maps/@52.9727602,-3.6609794,10z
vvvvv
https://www.google.co.uk/maps/@[LAT_CENTRE],[LONG_CENTRE],[ZOOM]z
and assuming as aspect ratio of 2, as the image I see is twice as wide as it is high
TerrainLatExtent=32768/(60*2^(ZOOM)) ... in decimal degrees
TerrainLongExtent=TerrainLatExtent*2/cos(RADIANS(LAT_CENTRE)) ... in decimal degrees
TerrainLat=LAT_CENTRE-TerrainLatExtent/2
TerrainLong=LONG_CENTRE-TerainLongExtent/2
The above parameters can be put into the terrain.ini file once you have worked out the values (probably using a spreadsheet)
For the heightmap .... The image can then be resized and cropped to 1025 ... 2049 etc for the heightmap which then needs to be shaded according to contours
For the texture ... The image can then be resized and cropped to 1024 ... 2048 etc
This uses plane sailing formulae as its base which approximates the earths surface at the centre of the map to a flat plane where the "departure" distance east or west is the same at all latitudes of that map (hence its suitability only for relatively small areas)
Navigation
[0] Message Index
Go to full version