Closed theo-armour closed 8 years ago
@geoffmcl
From your email:
Is the implied first image obviously inferior to the second true?
Does, really,
The results speak for themselves.
? I do not exactly know yet... but can listen why...While, I do prefer the softer cyan mix, with purple for elevations, shown in 2... than the heavy
reds
in 1... but what has this got to do with the underlying DEM data information?
OK, let's try again. First, please note that this exercise is not at all about coloring. Both meshes use a variety of 'normal' material - a generic surface or texture for 3D meshes that keeps things simple because no lights are required.
What the demos are about is resolution or accuracy or fineness of detail. The two images show Alcatraz island in San Francisco Bay.
Screen capture using PNG USGS 1 Second Viewer 3D unFlatland R1
Note that the model shows only sea level and above and that the rendering is fairly indistinct. It is unlikely that zooming in will show more detail.
Screen capture using data obtained by Google Maps API Elevations for Tiles
See also Alcatraz R1
Note that full bathymetric data is available and visible. Note that the model shows more detail. It is likely that zooming in and increasing the sampling rate will display more detail.
Do these two views help you understand the differences between what is available on static USGS data and what seems to be available now in 'cloudy' places? We should also look into MapQuest, OSM and other sources
http://fgx.github.io/sandbox/flightpath/fgx-flightpath-r13.html Will repeat, model too large for scene
Future rev will have slider that enables you to update the scale. Also may some kind of auto-scale depending on whether you are chasing or in world view. Also select your type of aircraft from the FGx aircraft library. [Yup, your b52 can fly like a c172]
... orientation wobbly
Currently reading roll, pitch and yaw from the CSV file
Got hung up today on getting map tiles and geometry to register on top of one another correctly plus the usual JavaScript asynchronicity issues (which I find fascinating)
But the next gen if FGx Flight path is on its way!
New Link
@geoffmcl
Will be working on fixing this script - given the issues I have learned from work on YGIL and VNLK flight paths...
Hi Theo,
Elevation files: So far, two examples...
Just a question about your elevation file naming conventions, and what they mean... some seem obvious -
Now, using the lat, lon, zoom, we can get the mappy tile directory... that is /z/x/y.png... functions lon2tile and lat2tile... gives us the slippy x and y...
Assuming all that is correct, now we have the exact boundaries of the elevations... can get an UL lat,lon, and a LR lat,lon... can get center, etc... and this can be used to size and position this square of elevations... at least as far as the x,z (lon,lat) positioning...
Now, after processing this set of elevation, we can get the min and max elevations... and thus should be able to set y... the alt...
And yes, so far both have been square
... since this matches a slippy tile that is also more or less square
... Why would we need elevations in other than squares
...
Yes, if the scene
covered by the path
, the track
, covers several slippy tiles, assumed touching
, at least one point shared, or one side shared, then we also need an elevation
squares to cover these other slippy tiles...
Yes, they could all be stored in a single elevation
file, say like 250x750, that is a vertical strip, like needed for VNLK paths for instance... But that would take some extra work to extract a square
of elevations to be applied to each slippy tile...
Or have I got something real wrong here??? I feel I am not understanding something...
@geoffmcl
See the read me on file names
Or in any script, click the 'i in a circle' to go to the read me. I try hard - and fail- to keep these up to date
Still coding - more talk later
Hi Theo,
Understanding the File Name
convention...
https://jaanga.github.io/cookbook-threejs/examples/google-api/elevations-get/elevations-get-r2.html
Yes, that says, a few words, repeated here -
Using file names to convey essential meta data. Is this a good thing?
Example elevations_-31.7300_148.6392_z12_t4_500x500_.txt
This gives: latitude, longitude, zoom, tiles and samples. Tile numbers
could be given instead. This would save some calculating and might avoid an
error or two. But nobody knows tile number and lat/lon is familiar to all
Well, without some meta data to describe the file, the elevations
are
absolutely meaningless... without knowing what part of the earth it
described, elevation wise, then the file is just rubbish...
At least the saved name should give some clues ;=))
Ok, I had missed that completely! My bad! I learn...
And as I study, test -
https://jaanga.github.io/cookbook-threejs/examples/google-api/elevations-get/elevations-get-r2.html
more I find a strange
, Theo algorithm...
If I use Tiles: 1
I get what I expect, one(1) mappy tile... no problem...
If I use Tiles: 2
I get a 2x2, ie 4 mappy tiles, with my lat,lon in the
4th tile... ok, can learn, this is the way of life... my point of interest
is in the bottom right tile... the 4th tile, counting top left to right,
and down eahc line, ... not obvious...
If I use Tiles: 3
I get a 3x3, ie 9 mappy tiles, with my lat,lon in the
5th tile... that is quite reasonable.. it is the center... maybe the
readme.md should explain more...
If I use Tiles: 4
I get a 4x4, ie 16 mappy tiles, with my lat,lon in the
12th tile... Well, again I can learn that, but why the map left/up
inclination... a Theo algorithm ;=))
If I use Tiles: 5
I get a 5x5, ie 25 mappy tiles, with my lat,lon in the
14th tile... Well, that is resonable, in that, that is the center
tile...
etc... It is only the even numbers, with the Theo go left-up
algorithm, that troubled me for a time... but once accepted, agreed,
written in stone, then, yes, this is a great meta file name convention,
that is good, required, and necessary...
So I learn the _tnn_
part of the name, alerts you to the respective
elevation
array expected...
I will so adjust my 2D display of the elevations
to obey these rules...
As you can understand, without this, I was previously treating the
elevation
file as covering a single mappy tile... ignored the
tnn... stupid me...
Regards, Geoff.
@geoffmcl
A's you surmise, the elevations part is easy. We can get all the elevations we need in the area of one tile. Just zoom in and out as you like.
The issue with the file names has to do with giving a good indication as to what image tiles can be used. The elevation data may be just one zoom level 12 tile, but we want a 16x16 grid of zoom level 15 images overlayed over the mesh. The current filename system is there to guide that process.
A better alternative might be just to provide upper left and lower right lat/lons in the file name. Then the user/script could decide at runtime what zoom level and tiling to use.
I will be looking into this alternative.
Update 2016-07-12
New Link
Get Elevations
@geoffmcl
This message is in reply to your FGx Google Groups message
This is if nothing else because GitHub issues allows you to paste in screen grabs - and it uses Markdown, which I am getting to like.
Compare and contrast:
Screen capture using data obtained by Google Maps API Elevations for Tiles - with San Francisco Telegraph hill at top right
The two images above compare 3D plots created from USGS 1 second data and from current Google Maps API data.
The data for the former took hours to source, download, manipulate, commit and upload. The data for the latter was comparatively easy to acquire.
The results speak for themselves.
More in response to you email is the following. And is what I think can go in the read me:
Terrain elevation data is a complex topic with a voluminous pedigree. The FGx mission is to help access be faster, cheaper smarter
See also: Digital elevation model.
The bullet points include:
I would be pleased to hear what bits are unclear or too much of a jump here.
So the DEM data we have already - as you point out - is cool. But the 1 second data is only available for a tiny portion of the globe and is above sea level only.The 3 second data is available for the globe but sucks for rendering areas smaller than a 100x100 or so kilometers.
We need more, newer and better.
Google Maps API Elevations for Tiles
Click on 'Get Elevations'
Explaining what's happening is as important as making what's happening. Thank you for pushing for the rationale behind the actions.
Theo