Discussion in 'Tracks' started by Wurstkoffer, Sep 17, 2017.
Fantastic to work with this kind of reference data !
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.
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/)
I don't know if this has anything to do with it
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.
I'll try to get in touch with linamza then. Good to hear someone else is experimenting. The URL I pasted in was localhostortnumber, so something has gone wrong in the translation somewhere. Okay, that gives me something to work on...
By accident I seemed to have typed in an emoji code...
I remember now I copied the link from the geoserver layer preview panel, and it worked in qgis. I'll check again later
The main problem I think is that I'm not getting a plain text response:
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
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?
When I click the link I get
no features were found
Yes, I set a test location ins the right area
What is the link you pasted into QGis?
What happens when you paste it into your browser?
The link I used in QGIS is
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
In my config.php I've put just this
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?
Okay... the raw data I got from the following location (but you could use anything. I use geotiff)
Open the LIDAR Composite Digital Terrain Model (DTM)
Download the four 50cm resolution files
I then unpack these to a single folder and merge them into a single geotiff using QGIS. The result for this lot is 1.5GB
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
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.
This may be relevant to the problem:
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.
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.
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.
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.
Separate names with a comma.