• Dear visitors,

    The email issue has been finally solved.
    Thank you for your patience and happy browsing.

    Team ACM.

TUTORIAL Race Track Builder - Inject elevation data and terrain texture

Wurstkoffer

Member
I see. Everything after the "?" is not necessary. I doubt it'll fix the problem, but try it. And send me some coordinates where you get the -999999 values.
 

Wurstkoffer

Member
There we go. The scotland WMS indeed sends a -9999.0 value. That's not nice.

Do the following. In config.php around line 66 add this:
PHP:
// There are WMS servers out there which sends extreme fake values
// for areas outside its coverage. To compensate that, specify
// a range in which the expected real value should lie.
$wms_elevation_value_limit_min = "-300";
$wms_elevation_value_limit_max = "9000";
In maps\api\elevation\json\index.php change line 184 from this:
PHP:
else {
to this:
PHP:
elseif($elevation_wms > $wms_elevation_value_limit_min && $elevation_wms < $wms_elevation_value_limit_max) {
 

Les Neilson

Active Member
Okay, let's try that... I'm actually finding this PHP stuff interesting, by the way. I've downloaded a couple of pdfs. Now to find time to read them...
 

Les Neilson

Active Member
Last night it was working well at last, although slowly. Unfortunately RTB crashed so I lost it all, but I'll try again this evening. If all goes well I'll build a short stretch to see how it looks and runs. I'll post a link if anyone is interested. Even subdivided to around a metre or so I wasn't seeing any stepping and the road bed and edges were pretty well defined. So far, very positive!
 

Willy Wale

Member
Thanks again, it seems to be working now... On to the next problem ;) I'm getting a lot of negative numbers outside of the sampled area (-9999) Where in the code can I limit the elevations to zero? (or only slightly negative)
UK LIDAR data I have looked at contains -9999 for any data point that is a body of water (lake/river/sea). It may also be the generic value for no data. So I think the 'correct' values are being returned (ie same as the source data) and as you wrote above you need to post process somehow.
 

Wurstkoffer

Member
Last night it was working well at last, although slowly. Unfortunately RTB crashed so I lost it all, but I'll try again this evening. If all goes well I'll build a short stretch to see how it looks and runs. I'll post a link if anyone is interested. Even subdivided to around a metre or so I wasn't seeing any stepping and the road bed and edges were pretty well defined. So far, very positive!
Oh nice, no steppings. Maybe they use some interpolation in these DTM/DSM layers. The layer i used is pixel based with a resolution of something like 1 pixel = 2x2 meter.

RTB crashes might be related to RAM? But I'm not sure. I have 32GB and rarely crashes. In some sessions I may have been subdividing for 2-3 hours without interruption and RTB has retrieved elevation data from the WMS during that time. At some point I went to sleep and left RTB to itself. The next morning I saw that it was receiving elevation data for 4-5 hours after i left. And there was no crash.

I'm really interested in your results, so of course send links! :)
 

Les Neilson

Active Member
The lack of stepping might just be that I haven't subdivided enough to see it yet. I'll let it finish and try it out as is. Then I might try to see how far I can subdivide... In the meantime, another couple of hours and I should have something to share :)
 

Wurstkoffer

Member
Nice, that was fast. Terrain looks really detailed. Just needs some flattening. And you already placed some trees, buildings and objects.
 

Les Neilson

Active Member
Yes, fast because I only subdivided close to the road. But no visible stepping, and I was able to conform the track to the surface (well, 25% in the centre and 95% at the edges) and it seemed pretty good. I haven't driven that bit of road for maybe 20 years but it looked pretty realistic
 

Les Neilson

Active Member
It's a shame that there's no freely available lidar data for my pet project (the Isle of Man TT circuit). It's on sale though, for £7000 :(
 

Les Neilson

Active Member
Another question: what happens if you save a piece of terrain and reload it before all the subdivision has been completed? Are the unsampled points eventually fixed or do they get left as they were when you quit?
 

Les Neilson

Active Member
It doesn't appear to, but that doesn't surprise me. Although I notice this: when I reloaded a track and tried to add some more detail to a section, it was okay at the beginning, then I started to get only -9999 again. So I quit out, and realised I'd hit the edge of the sample area. When I restarted RTB again it went on sending the requests that didn't get a valid response before
 

Les Neilson

Active Member
What would be really useful: in my case there are two layers covering different areas. If the php could try one layer - if it gets a null response try the next - and if nothing works default to google data.
 

Wurstkoffer

Member
Oh, good to hear it resumes. Multiple layers for different areas shouldn't be a problem to code. Send me the URLs and some locations and i'll take a look at it.
 
Top