Hi Mitxel,

thanks for your comments.

With regard to the DEM testing:

I repeated the test and now I succeeded. I can see elevations at your Spanish track not coming from a "normal" DEM database. There seems to be a simple reason for this: The previous test was made without the additional installations described in connection with ECW and friends. Thus, there was no libcurl.dll and the test failed - the WSC was not a supported format.

Then I installed the packages necessary for ECW, ... testing. Thus, libcurl.dll came in and the GDAL package in the QMS path now can handle WCS.

The first attempt to build a VRT for the WCS failed again - the reason was simple: I wasn't connected to the Internet. gdalbuildvrt used a large timeout before informing me that it can't reach the required server. Activating the Internet I got the VRT and it worked as expected.

Nevertheless there remains still the problem with ogr_MSSQLSpatial.dll (for WCS too!). This is not a QMS problem, but some GDAL problem because I didn't use QMS for the VRT creation.

Regards

WolfgangTh


Am 05.03.2018 um 19:35 schrieb Mitxel:
Hi all.

Sometimes find and download DEMs becomes boring, so last weeks I have been playing to get elevation data on the fly from WCS servers in QMS.  In simple words this is the equivalent to online maps but for DEMs, so  you get an online DEM

Here is a way that works for me, and the good thing is that is a very easy recipe:

Step 1

- Write a basic  text file following this example, and save it in your DEM folder with the extension .wcs ( eg. ESP_IGN-MDT25.wcs) :

<WCS_GDAL>
  <ServiceURL>http://www.ign.es/wcs/mdt?</ServiceURL>
<CoverageName>mdt:Elevacion25830_25</CoverageName>
  <Version>1.0.0</Version>
</WCS_GDAL>

- You  have to replace the values between labels according to the WCS you want, where

ServiceURL is the URL of the service without parameters.
CoverageName is the identifier for the elevation dataset.   (in simple words the layer) Version is the WCS version that is used in the communication, if you don't know try the default value 1.0.0. (read remarks about versions below)

The example above works to get a DEM served by the Spanish IGN

The URL of the WCS and the coverage names are usually provided  by authorities and data providers in their web sites. If you only know the WCS Url, you can try to get the avalable coverage names  requesting the Capabilities file in a web browser. (eg http://www.example.com/example?request=Getcapabilities)


Step 2

- In QMS, open the VRT Builder

- Select as source file the .wcs text file you have just created. ( eg. example.wcs)

- Select a .vrt destination file ( eg. WCS_example.vrt) (Prepending WCS_ to the name of .vrt file is a good idea to remind that it is an online DEM)

- (optional if the the WCS supports more than one SRS), you can fill the -a_srs advanced option to choose the SRS, (eg EPSG:25830)

- Run the builder , and you are done.



The first time you load the new online DEM it will take a bit long to load and the status line will remain quiet, be patient. Once the WCS is connected  the status line will show the height and slope data on the fly, and if you don't ask to hillsade or colorize large areas, it will run fine.

So this is complementary to local DEM files, if you are doing an intensive use of hillsading or color slopes you would like to have local DEMs.

I find  online DEMs useful when:

- You want to view something away of your usual mountain range and you  don't have its DEM

- You  want to draw  (or filter) a track with a fine elevation accuracy  and you don't want to find and download tons of files that you will never use (eg. downloading a 5m accuracy DEM for whole Spain would be crazy)

In these cases online DEMs work fine for me. Some WCS are faster than others, you must try to find the limits, but don't ask QMS to hillsade the whole Pyrinees with a  5m accuracy DEM in your screen. Of course, the user is required to have a brain  :-)



Remarks:

- WCS versions:  WCS 2.0.1 is supported only from GDAL 2.3, that may be you don't have (QMS windows compiled version comes with GDAl 2.1). Anyway you can try to write the WCS file with default version 1.0.0 and usually it will run.

- When you build the .vrt file GDAL will query the WCS server and then it will re-write your basic .wcs file converting it in a longer .wcs file with more parameters. So you get at once in your DEM folder the long .wcs file and a .vrt file to load in QMS  (This is an easy and funny way , isn't it?)

- In a strict way step #2 would not be necessary. The basic .wcs file created in step #1 would be pretty enough to load the WCS in QMS, but actually the DEM window only shows files with .vrt extension, so we need the .vrt    ...or may be not...want to try?   you can make a fake .vrt , this is a link to the .wcs renamed as .vrt, and it works.  (Even renaming the .wcs as .vrt, would do the trick, but I think that this is not a good idea at all)   May be openning the scope of the DEM window to list .vrt and .wcs files could be a nice improvement.

- Anyway  the combination of .vrt + long .wcs is also useful for advanced users. In this way you can edit and tune the .wcs and the .vrt to choice some paramaters when avalaible (eg. the DEM format:ASCII, Geotiff,... or the SRS)


I hope you will find this useful , may be it can be improved.

Mainly I have tested it in linux at home. I have more difficult for testing in windows: I have only tested in a VM at home  and in a PC that is connected to internet behind a proxy, In both them all runs slower.

If you want to give a try you can use the example above, or you can download this zip file <https://drive.google.com/file/d/1xFrnwtW3JK0cIi-LIIwsgVdYYOYHEQMc/view?usp=sharing> with a couple of ready to go samples. The .zip contains:
25m DEM  from Spanish IGN, (both files .wcs and .vrt)
25m DEM fromBasque Country Authority <http://www.geo.euskadi.eus/s69-geoser/es/contenidos/informacion/servicios_estandares/es_81/servicios_estandares.html>(both files .wcs and .vrt) gpx file with a track to jump in the coverage area covered by both DEMs in an easy way

Of course If there is not inconvenience,  I would add to the wiki the procedure to load WCS DEMs,


Mitxel


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot


_______________________________________________
Qlandkartegt-users mailing list
Qlandkartegt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qlandkartegt-users

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Qlandkartegt-users mailing list
Qlandkartegt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qlandkartegt-users

Reply via email to