Elevation Grid Generator
- decaff_42
- Staff
- Posts: 3838
- Joined: Sat Oct 29, 2011 7:23 pm
- Favorite Aircraft: SR-71 Blackbird
- Location: Eastern United States
- OS: Mac OSX
- Has thanked: 844 times
- Been thanked: 1726 times
- Contact:
Elevation Grid Generator
Visit my GitHub page for Python codes: https://github.com/decaff42?tab=repositories
YSFlight Addon Database - Find links to nearly every addon made for YSFlight!
Submit Addon To Database
- Barr
- Veteran
- Posts: 1012
- Joined: Wed Mar 28, 2012 8:49 pm
- Favorite Aircraft: The Boeing 757
- Location: Providence, Rhode Island
- OS: Windows 10/Gentoo
- Has thanked: 272 times
- Been thanked: 206 times
Elevation Grid Generator
600x600 @ aprox 3min.
Edit:
How can you lower the height amplification. For example for a maximum of 50ft? I tried using decimals but the program makes everything flat.
Beginner ATC for hire!
Current Projects:
-Pilatus PC12
-Mooney M20
-New England Scenery
Fine Print:
**Word of Caution**
My knowledge is limited. Anything I write in my posts may or may not be accurate. To be honest I think its all crap.
- Barr
- Veteran
- Posts: 1012
- Joined: Wed Mar 28, 2012 8:49 pm
- Favorite Aircraft: The Boeing 757
- Location: Providence, Rhode Island
- OS: Windows 10/Gentoo
- Has thanked: 272 times
- Been thanked: 206 times
Re: Elevation Grid Generator
How does the height amplification work? Is 255m default? So if its at 1 the max height will be 255m? Right and if its at .5 the max height will be 122.5m, correct?
Beginner ATC for hire!
Current Projects:
-Pilatus PC12
-Mooney M20
-New England Scenery
Fine Print:
**Word of Caution**
My knowledge is limited. Anything I write in my posts may or may not be accurate. To be honest I think its all crap.
- Flake
- VFA-49
- Posts: 4375
- Joined: Thu Feb 10, 2011 8:47 pm
- Favorite Aircraft: Boeing F/A-18A
- Location: Australia
- OS: Windows 10 (x64)
- Has thanked: 861 times
- Been thanked: 1279 times
- Contact:
Re: Elevation Grid Generator
Height amplification * pixel value = height in meters of point.
So if the heigh amp is 1, and the pixel is 255 white, then the point would be 255m.
EDIT: 3000th post! Bow before my true Planar form!
- Barr
- Veteran
- Posts: 1012
- Joined: Wed Mar 28, 2012 8:49 pm
- Favorite Aircraft: The Boeing 757
- Location: Providence, Rhode Island
- OS: Windows 10/Gentoo
- Has thanked: 272 times
- Been thanked: 206 times
Re: Elevation Grid Generator
Ay mind dumbing that down for meOfficerFlake wrote:1 to 1 of the pixel value.
Height amplification * pixel value = height in meters of point.
So if the heigh amp is 1, and the pixel is 255 white, then the point would be 255m.
EDIT: 3000th post! Bow before my true Planar form!
oh wait never saw the white after 255. So basically the brighness of each pixel is basically the height.
Also Im using 100x100 pixel bitmaps but it takes about 30 seconds for it to process it? Surely cant be my computer? And to add the .flds are coming out blank and zoomed in? No elevation grids
Beginner ATC for hire!
Current Projects:
-Pilatus PC12
-Mooney M20
-New England Scenery
Fine Print:
**Word of Caution**
My knowledge is limited. Anything I write in my posts may or may not be accurate. To be honest I think its all crap.
- Flake
- VFA-49
- Posts: 4375
- Joined: Thu Feb 10, 2011 8:47 pm
- Favorite Aircraft: Boeing F/A-18A
- Location: Australia
- OS: Windows 10 (x64)
- Has thanked: 861 times
- Been thanked: 1279 times
- Contact:
Re: Elevation Grid Generator
Exactament.BARRACUZ wrote:So basically the brighness of each pixel is basically the height.
Probably your PC.BARRACUZ wrote:Also Im using 100x100 pixel bitmaps but it takes about 30 seconds for it to process it? Surely cant be my computer? And to add the .flds are coming out blank and zoomed in? No elevation grids
- Barr
- Veteran
- Posts: 1012
- Joined: Wed Mar 28, 2012 8:49 pm
- Favorite Aircraft: The Boeing 757
- Location: Providence, Rhode Island
- OS: Windows 10/Gentoo
- Has thanked: 272 times
- Been thanked: 206 times
Re: Elevation Grid Generator
Beginner ATC for hire!
Current Projects:
-Pilatus PC12
-Mooney M20
-New England Scenery
Fine Print:
**Word of Caution**
My knowledge is limited. Anything I write in my posts may or may not be accurate. To be honest I think its all crap.
- kiwiflieger
- Contributor
- Posts: 227
- Joined: Thu Mar 27, 2014 7:09 am
- Favorite Aircraft: Die Fledermaus
- Has thanked: 125 times
- Been thanked: 92 times
Re: Elevation Grid Generator
It may not be the PC, as I have very similar specs to BARRACUZ, but the fld.BARRACUZ wrote:Also Im using 100x100 pixel bitmaps but it takes about 30 seconds for it to process it? Surely cant be my computer? And to add the .flds are coming out blank and zoomed in? No elevation grids
I have conducted some testing of this program and found that removing the fld information in a text editor and leaving just the elevation grid information, then saving as a .ter file, gives a working elevation grid.
Example:
Code: Select all
FIELD
FLDNAME WANAKAELEV
GND 0 0 215
SKY 23 106 189
GNDSPECULAR FALSE
DEFAREA LAND
BASEELV 0.00m
MAGVAR 0.00deg
CANRESUME TRUE
PCK "00000000.ter" 274601
TerrMesh
SPEC FALSE
NBL 501 546
TMS 108.00 108.00
CBE 0.00 1833.76 46 112 10 194 169 92
BLO 0.00 R 1 46 112 10 1 46 112 10
BLO 0.00 L 1 73 122 25 1 73 122 25
BLO 0.00 R 1 100 133 40 1 73 122 25
Code: Select all
FIELD
FLDNAME WANAKAELEV
GND 0 0 215
SKY 23 106 189
GNDSPECULAR FALSE
DEFAREA LAND
BASEELV 0.00m
MAGVAR 0.00deg
CANRESUME TRUE
PCK "00000000.ter" 274601
Hope this helps...
- Barr
- Veteran
- Posts: 1012
- Joined: Wed Mar 28, 2012 8:49 pm
- Favorite Aircraft: The Boeing 757
- Location: Providence, Rhode Island
- OS: Windows 10/Gentoo
- Has thanked: 272 times
- Been thanked: 206 times
Re: Elevation Grid Generator
Also just so others are aware both kiwi and I have noticed that the program will also include any "picture" that shows up on screen and behind the running program window. For example if you decide to load and generate a bitmap while having a chrome window or fancy wallpaper in the background you will see it in the resulting elevation grid.
Beginner ATC for hire!
Current Projects:
-Pilatus PC12
-Mooney M20
-New England Scenery
Fine Print:
**Word of Caution**
My knowledge is limited. Anything I write in my posts may or may not be accurate. To be honest I think its all crap.
- DD-Destroyer
- Contributor
- Posts: 323
- Joined: Tue May 22, 2012 11:45 pm
- Favorite Aircraft: FA-50 Golden Eagle
- Location: Seoul
- OS: Windows
- Has thanked: 4 times
- Been thanked: 165 times
- Contact:
- Barr
- Veteran
- Posts: 1012
- Joined: Wed Mar 28, 2012 8:49 pm
- Favorite Aircraft: The Boeing 757
- Location: Providence, Rhode Island
- OS: Windows 10/Gentoo
- Has thanked: 272 times
- Been thanked: 206 times
Re: Elevation Grid Generator
I'm a boob at this so take my suggestions lightly. Hopefully flake or grigor can chime in.DD-Destroyer wrote:What is my problem???????
1. The grid generator will generate the bitmap plus whatever is under or ontop of it on the screen. So let's say you have a pickachu wallpaper and have a text document open. The generator will pick these up and include it in the end result so you will get a mountain plus a pikachu mountain. So set your wall paper to none or black and drag all windows even the generator itself away from under the image.
2. Make sure to set the program to run as administrator and run it under xp compatibility. Also try not to run major cpu hog programs like chrome or a videogames. I've noticed that the generator will take a tad longer probably due to the CPU usage priority.
3. Make sure the bitmap is a true 100 pixel by 100 pixel image. I used paint.net and it has some weird settings when you resize so depending on your program double check. Remember that the generator takes the color value of each and every pixel and turns it into a coordinate for ys. So the more pixels or larger the image is the longer it will take to process it all.
4.The generator uses raw cpu power to make the grids so if you have an older machine it will take longer
And if someone can please explain in some detail how to properly use the height amplification. I'm having g trouble getting accurate sized grids since I don't know what to multiply the height amplification by. Like do you average out your highest or Max rgb values and use that?
Beginner ATC for hire!
Current Projects:
-Pilatus PC12
-Mooney M20
-New England Scenery
Fine Print:
**Word of Caution**
My knowledge is limited. Anything I write in my posts may or may not be accurate. To be honest I think its all crap.
- Flake
- VFA-49
- Posts: 4375
- Joined: Thu Feb 10, 2011 8:47 pm
- Favorite Aircraft: Boeing F/A-18A
- Location: Australia
- OS: Windows 10 (x64)
- Has thanked: 861 times
- Been thanked: 1279 times
- Contact:
Re: Elevation Grid Generator
But that's okay because I like boobs.BARRACUZ wrote:I'm a boob at this
- kiwiflieger
- Contributor
- Posts: 227
- Joined: Thu Mar 27, 2014 7:09 am
- Favorite Aircraft: Die Fledermaus
- Has thanked: 125 times
- Been thanked: 92 times
Re: Elevation Grid Generator
The height amplification is a multiple of the pixel value, e.g. black (0,0,0) or white (255,255,255). So if the height amp. was set to 20, say, then the height of a white pixel (in metres, of course ) would be 255 x 20 = 5100 metres.BARRACUZ wrote:And if someone can please explain in some detail how to properly use the height amplification.
- DD-Destroyer
- Contributor
- Posts: 323
- Joined: Tue May 22, 2012 11:45 pm
- Favorite Aircraft: FA-50 Golden Eagle
- Location: Seoul
- OS: Windows
- Has thanked: 4 times
- Been thanked: 165 times
- Contact:
Re: Elevation Grid Generator
1. OS : Windows 10 64bit
2. CPU : Intel Skylake i7-6700k with quad core and 4.0Ghz clock
3. VGA : nVidia Geforce GTX 1080
4. RAM : 8G
- Flake
- VFA-49
- Posts: 4375
- Joined: Thu Feb 10, 2011 8:47 pm
- Favorite Aircraft: Boeing F/A-18A
- Location: Australia
- OS: Windows 10 (x64)
- Has thanked: 861 times
- Been thanked: 1279 times
- Contact:
Re: Elevation Grid Generator
- DD-Destroyer
- Contributor
- Posts: 323
- Joined: Tue May 22, 2012 11:45 pm
- Favorite Aircraft: FA-50 Golden Eagle
- Location: Seoul
- OS: Windows
- Has thanked: 4 times
- Been thanked: 165 times
- Contact:
Re: Elevation Grid Generator
- Barr
- Veteran
- Posts: 1012
- Joined: Wed Mar 28, 2012 8:49 pm
- Favorite Aircraft: The Boeing 757
- Location: Providence, Rhode Island
- OS: Windows 10/Gentoo
- Has thanked: 272 times
- Been thanked: 206 times
Re: Elevation Grid Generator
Ok so if im understading the max elevation in the bitmap must be 255 white? It cant be a max of like 180,43,189.OfficerFlake wrote:Also, for your viewing pleasure BARRACUZ: viewtopic.php?p=86162#p86162
Or is there a way to scale a maps elevation when the highest point in the bitmap is not a 255 white? This what ive been trying to understand. If you cant then its a real bummer since youll need to edit alot when you pull elevation maps of gis sites
Beginner ATC for hire!
Current Projects:
-Pilatus PC12
-Mooney M20
-New England Scenery
Fine Print:
**Word of Caution**
My knowledge is limited. Anything I write in my posts may or may not be accurate. To be honest I think its all crap.
- kiwiflieger
- Contributor
- Posts: 227
- Joined: Thu Mar 27, 2014 7:09 am
- Favorite Aircraft: Die Fledermaus
- Has thanked: 125 times
- Been thanked: 92 times
Re: Elevation Grid Generator
pixel brightness (0-255) * height amplification = final grid height
The maximum pixel value doesn't have to be 255 and the scaling is only determined by the brightness of an individual pixel, not the maximum value anywhere on a bitmap.
Normally, I find the highest pixel value in the bitmap, and then find its elevation on a map. Then just divide elevation of highest point by pixel value and you have the height amplification value.BARRACUZ wrote:Or is there a way to scale a maps elevation when the highest point in the bitmap is not a 255 white? This what ive been trying to understand. If you cant then its a real bummer since youll need to edit alot when you pull elevation maps of gis sites
Example:
Say I'm using this image:
(a random bit of NZ I picked out) and the highest point is somewhere in the bottom right corner. I'd find the elevation on a map and calculate accordingly. ( I think the amplification is something around 15 on this example)
NB all measurements are in metres!
- Barr
- Veteran
- Posts: 1012
- Joined: Wed Mar 28, 2012 8:49 pm
- Favorite Aircraft: The Boeing 757
- Location: Providence, Rhode Island
- OS: Windows 10/Gentoo
- Has thanked: 272 times
- Been thanked: 206 times
Re: Elevation Grid Generator
Okay so now you have me at pixel brightness. A quick Google search and I think I need to find a way to convert the bitmap to a true grey scale image and not just use the "black and white" color function.kiwiflieger wrote:Just did some testing and determined that the equation for grid face height is always:
pixel brightness (0-255) * height amplification = final grid height
The maximum pixel value doesn't have to be 255 and the scaling is only determined by the brightness of an individual pixel, not the maximum value anywhere on a bitmap.
Normally, I find the highest pixel value in the bitmap, and then find its elevation on a map. Then just divide elevation of highest point by pixel value and you have the height amplification value.BARRACUZ wrote:Or is there a way to scale a maps elevation when the highest point in the bitmap is not a 255 white? This what ive been trying to understand. If you cant then its a real bummer since youll need to edit alot when you pull elevation maps of gis sites
Example:
Say I'm using this image:
(a random bit of NZ I picked out) and the highest point is somewhere in the bottom right corner. I'd find the elevation on a map and calculate accordingly. ( I think the amplification is something around 15 on this example)
NB all measurements are in metres!
Beginner ATC for hire!
Current Projects:
-Pilatus PC12
-Mooney M20
-New England Scenery
Fine Print:
**Word of Caution**
My knowledge is limited. Anything I write in my posts may or may not be accurate. To be honest I think its all crap.
- Flake
- VFA-49
- Posts: 4375
- Joined: Thu Feb 10, 2011 8:47 pm
- Favorite Aircraft: Boeing F/A-18A
- Location: Australia
- OS: Windows 10 (x64)
- Has thanked: 861 times
- Been thanked: 1279 times
- Contact:
Re: Elevation Grid Generator
So basically what I've been saying this whole time.kiwiflieger wrote:pixel brightness (0-255) * height amplification = final grid height
I mean, have I explained this poorly or...?
---
You could do that. The height is based of the LUMINANCE value of the pixel, Colors are irrelevant.BARRACUZ wrote:It cant be a max of like 180,43,189?
Colors can be defined by Red, Green, Blue, or Hue, Saturation, Luminence. Full white is 255 luminence, regardless of hue and saturation levels. Full black is 0 luminence, regardless of hue and saturation. It would be best to think of the light level in regards to luminence.
I tried explaining in RGB as this is what everyone is most familiar with.
You could use colors but they would have NO impact on the grid height - just the luminance of the pixel is all that matters.
Who is online
Users browsing this forum: No registered users and 6 guests