• 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

Les Neilson

Active Member
So.... I've got Geoserver running. I've created an enormous geotiff file of the North York Moors at 50cm resolution. I can load the URL into QGIS and query the layer and I'm getting good data back. The formatting is similar to the Scotland data I've been using.

upload_2018-1-10_19-26-0.png


So I've copied the URL into the config.php and that should be all I need to do, I think. Except that I'm not getting anything at all via the test page (localhost/maps/)

upload_2018-1-10_19-27-36.png


I don't know if this has anything to do with it

upload_2018-1-10_19-29-58.png
 

Wurstkoffer

Member
Uhhh nice, local geoserver. Forum user @linamza told me that he also tried to get it work. Maybe he can help.

Which URL you copied to config.php? I hope it wasn't "http://geoserver.org/England:NZ_70_50", coze this is no local URL. It should be something like "http://localhost:8080/....." assuming your geoserver runs at port 8080, which is default. Referring to geoserver documentation, it should be "http://localhost:8080/geoserver/wms?". Don't forget the question mark, coze my cheap php code doesn't check if it exists. And i guess "England:NZ_70_50" is the layers name ($wms_elevation_layer).


The request exceed message should come from Google. The amount of requests is limited, so you have to wait 24hrs.
 

Les Neilson

Active Member
I'll try to get in touch with linamza then. Good to hear someone else is experimenting. The URL I pasted in was localhost:portnumber, so something has gone wrong in the translation somewhere. Okay, that gives me something to work on...
 

Les Neilson

Active Member
By accident I seemed to have typed in an emoji code... :D

I remember now I copied the link from the geoserver layer preview panel, and it worked in qgis. I'll check again later
 

Les Neilson

Active Member
The main problem I think is that I'm not getting a plain text response:

upload_2018-1-11_19-53-0.png


In QGIS I get a different URL, but the response is as I expected. There's probably a setting in Geoserver I haven't figured out yet
 

Wurstkoffer

Member
What happens, when you click the link in the screenshot above?
And have you set up a location in config.php which is within the covered area?
 

Les Neilson

Active Member
The link I used in QGIS is

http://localhost:65534/geoserver/England/wms?version=1.3.0&layers=England:NZ_70_50&styles=&bbox=470000.0,500000.0,480000.0,510000.0&width=768&height=768&srs=EPSG:404000&

In the browser it gives me this error

<ServiceExceptionReport version="1.3.0" xsi:schemaLocation="http://www.opengis.net/ogc http://localhost:65534/geoserver/schemas/wms/1.3.0/exceptions_1_3_0.xsd"><ServiceException code="MissingParameterValue" locator="request">
Could not determine geoserver request from http request org.geoserver.platform.AdvancedDispatchFilter$AdvancedDispatchHttpRequest@59140524
</ServiceException></ServiceExceptionReport>
 

Wurstkoffer

Member
Hmmmm, will try to reproduce it at the weekend. Can you send me download links to the data you used? And can you tell me how do you set up geoserver?
 

Les Neilson

Active Member
To set up geoserver:

First you need Java runtime environment version 8. Important, not 9, only 8 works with geoserver.

Then install geoserver. It will ask for the jre folder, and the port number you want to use. I had problems using the default 8080; it crashed without any error message. Changing it seemed to solve that problem.

Then once you get into the web admin page and log in, you can follow the online documentation for getting started. Basically, you set up a workspace, then a data store which points to the data you want to access. Then you set up a layer, and select the data store. This part defines the publishing parameters, but so far I'm pretty hazy on what all this means.

At this point, select the Layer Preview page, and click on the OpenLayers link. This will open a new tab where you should see the data, and which you can click on and it will return altitude values.

This is the URL I've been trying to use in config.php, so far without success. It gets no response to the GetFeatureInfo request. I'm guessing it's some setting up that still needs to be done in geoserver. I'll try the forum to see if some expert can offer some help
 
Last edited:

Les Neilson

Active Member
I chose to make a single geotiff because otherwise I would have had to deal with multiple files, and although I'm sure that can be done in geoserver, it's an additional layer of complexity that I'll skip for now.

As for setting up geoserver, I was pretty much leaving everything possible as default, and randomly pressing buttons everywhere else.
 

Wurstkoffer

Member
I fumbled around a bit, but I'm giving up now. This is too time consuming at the moment.

I'm afraid merging to a GeoTIFF is not a good idea, because the individual tiles use different color palettes. A certain gray value of one tile means a different height value in another tile. But i'm not sure, maybe GeoTIFF can handle that.

I didn't find out how to add multiple tiles to GeoServer in the fastest way. Obviously it looks like you have to add all 99 tiles individually. But i'm pretty sure there's a way to add them all together.

When adding the ArcGrid files, please note that they are available in EPSG: 27700 (https://data.gov.uk/dataset/lidar-composite-dtm-50cm1). This must be specified at some point in GeoServer.
 

Les Neilson

Active Member
I've never had problems with merging geotiffs; they have embedded maximum and minimum elevation values so that when you put them together they adjust correctly.
 

Wurstkoffer

Member
Hmm, yeah... maybe displaying the tiles in grayscale (which has limited grayscale values) is only a function of QGis. The original asc files are in ArcGrid format, which seems to be plain ASCII. But how do you convert multiple layers to GeoTIFF in QGis? I just find the ability to export a single layer. And if I group all layers, the group cannot be exported.

However, you should define EPSG:27700 as default in QGis options before importing the ArcGRID files.
upload_2018-1-14_14-57-26.png
 

Les Neilson

Active Member
I'm not sure I understand exactly. I'm merging several tiles into a single large geotiff, not layers. I get the part about the coordinate reference system. Normally I check that the result matches another reference; other than that I don't worry too much because normally it seems that QGIS figures out most things by itself.

This is what I do in QGIS:
Select Raster - Miscellaneous - Merge
Select the folder where the .asc files are. Set a name for the geotiff, and Okay
When the processing has finished, I select a projection for display, and that's it.
 
Top