• 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
Response from WMS will be slower than from google, but it shouldn't deliver zeros, if the requested location is within it's coverage (Saxony, Germany in my example code - https://www.google.com/maps/place/Saxony/).
Google should always deliver, coze it's coverage contains the whole world.

I assume, you replaced "MYAPIKEY" with your api key? What errors you get when you click the WMS und Google links in logfiles?
 

Les Neilson

Active Member
Yes, I put MYAPIKEY to hide my real one. I was using the example location from your original config.php. The API key was the only thing I changed in it. On the localhost page everything seemed okay, and the elevation was 517, I think. I won't be back at my pc until sunday night, so for now I can't look at the log files
 

Les Neilson

Active Member
Any chance you could give any tips on how to extract the necessary info from a WMS server to modify config.php? (maybe using QGis to search the various layers?) For example I've been looking at this site:

https://eo.jncc.gov.uk/geoserver/scotland/wms?service=wms&version=1.3.0&request=GetCapabilities
https://eo.jncc.gov.uk/geoserver/scotland/wms?service=wms&version=1.3.0&request=GetCapabilities
I can figure out how to find the elevation values, but there's no ortho layer as far as I can see. Can I leave it blank?

Thanks once again...
 

Wurstkoffer

Member
yeah, leave it blank and ...
PHP:
$wms_orto_fetch = false;
I'm not sure how the config test page behaves. I've only ever tested it, i think, with ortho fetch from WMS enabled.
 

Les Neilson

Active Member
It's almost working, but look at this screenshot

upload_2017-11-14_21-38-1.jpeg


The problem is there's no end string to the elevation value, so it doesn't pick up the value correctly. I tried putting something from the following line, but it doesn't seem to be working. Any ideas?
 

Les Neilson

Active 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)
 

Wurstkoffer

Member
Oh, apparently the WMS server you're using provides extreme values outside the covered area. The WMS server from my example returned NULL values there. Therefore, the script decides: If WMS does not return a value - take the value from Google. I'll check it out and get back to you.
 

Wurstkoffer

Member
Can't reproduce this behaviour. I set up the elevation part in my config as follows:
PHP:
$wms_elevation_url = "https://eo.jncc.gov.uk/geoserver/scotland/wms?";
$wms_elevation_layer = "scotland-lidar-2-dtm";
$wms_elevation_querylayers = "scotland-lidar-2-dtm";
$wms_elevation_format = "text/plain";
$wms_elevation_response_start_str = "GRAY_INDEX = ";
$wms_elevation_response_end_str = "\n";
... didn't changed the LAT/LON so it requested the location from my example (Saxony, Germany). The Scotland WMS delivered "no features were found". I now remember, the script validates if the response is a number. So in this case, no number is delivered. Therefore the Google value will be used and sent to RTB, as you can see in the screenshot.
upload_2017-11-15_21-31-41.png
 
Top