Hi,

Hi,

I do not know how QGIS deals with this, but how about using VRT? It is XML and 
you can use it with GDAL tools. Try

Step 1.
gdal_translate -of vrt 
WCS:"http://demo.geo-solutions.it:80/geoserver/wcs?version=2.0.1&coverage=sf__sfdem";
 wcs.vrt

Step 2.
gdal_translate -of GTiff -outsize 200 200 -projwin 589980.000 4928010.000 
590980.000 4918010.000 wcs.vrt converted_from_wcs_vrt.tif

This VRT file did not work with my QGIS but a VRT created for my local 
Geoserver works. Steps to follow

gdal_translate -of VRT 
WCS:"localhost:8080/geoserver/wcs?version=2.0.1&service=WCS&coverage=sf__sfdem" 
localwcs.vrt

QGIS opens localwcs.vrt. The VRT file is referencing another XML file that is 
created by the WCS driver, in my case
<SourceFilename 
relativeToVRT="0">C:\Users\JRAHKONEN\.gdal\wcs_cache\DokaJ.xml</SourceFilename>

QGIS was not able to open C:\Users\JRAHKONEN\.gdal\wcs_cache\DokaJ.xml directly 
but I did not spend much time for finding out why not.

So if you want to continue the game:

  1.  create vrt with gdal_translate
  2.  check what xml file it is reading
  3.  move the xml file away from the WCS cache directory
  4.  edit the vrt file and update the reference into the XML file
  5.  Try with GDAL tools and QGIS.

I am not at all sure if QGIS can use the WCS-VRT layer in a way that makes 
sense. I suggest to test with your own Geoserver and follow what kind of 
requests QGIS creates.

Good luck.

-Jukka Rahkonen-


-Jukka Rahkonen-



Lähettäjä: 1520 gis <juliermeopensourcedevelo...@gmail.com>
Lähetetty: maanantai 23. marraskuuta 2020 16.01
Vastaanottaja: gdal-dev@lists.osgeo.org; Rahkonen Jukka (MML) 
<jukka.rahko...@maanmittauslaitos.fi>
Aihe: Re: gdal-dev Digest, Vol 198, Issue 45

Dear Rahkonen Jukka,

I will consider your warnings about using GDAL_WCS with GeoServer.  It seems 
that what I am trying to do is not possible, but it will be something 
interesting to achieve through GDAL_WCS. In many cases, the user has access to 
wcs geoservices and he may be interested in loading some specific coverages 
(full coverage and subsets) in QGIS using an XML just like GDAL_WMTS driver. 
Some institutions make WCS capabilities available, but wmts. And this is my 
situation, I have a remote / external geoserver with wcs capabilities 
available, but wmts.

It could be something interesting to be implemented in the future.

Thank you very much for your time and consideration of my messages.

Kind regards

Julierme


On Sat, Nov 21, 2020 at 5:00 PM 
<gdal-dev-requ...@lists.osgeo.org<mailto:gdal-dev-requ...@lists.osgeo.org>> 
wrote:
Send gdal-dev mailing list submissions to
        gdal-dev@lists.osgeo.org<mailto:gdal-dev@lists.osgeo.org>

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.osgeo.org/mailman/listinfo/gdal-dev
or, via email, send a message with subject or body 'help' to
        
gdal-dev-requ...@lists.osgeo.org<mailto:gdal-dev-requ...@lists.osgeo.org>

You can reach the person managing the list at
        gdal-dev-ow...@lists.osgeo.org<mailto:gdal-dev-ow...@lists.osgeo.org>

When replying, please edit your Subject line so it is more specific
than "Re: Contents of gdal-dev digest..."


Today's Topics:

   1. GDAL_WCS Driver and gdal_translate (1520 gis)
   2. Re: GDAL_WCS Driver and gdal_translate (jratike80)
   3. Automatic labels placement (Franco Amato)
   4. resampling netcdf data (Nazanin tavakoli)


----------------------------------------------------------------------

Message: 1
Date: Fri, 20 Nov 2020 17:18:30 -0300
From: 1520 gis 
<juliermeopensourcedevelo...@gmail.com<mailto:juliermeopensourcedevelo...@gmail.com>>
To: gdal-dev@lists.osgeo.org<mailto:gdal-dev@lists.osgeo.org>
Subject: [gdal-dev] GDAL_WCS Driver and gdal_translate
Message-ID:
        
<CAKTKyJKpbfvZnXhM60FDF_T-0wFFpW=54wc8f1nnh5fz7re...@mail.gmail.com<mailto:54wc8f1nnh5fz7re...@mail.gmail.com>>
Content-Type: text/plain; charset="utf-8"

Dear all,

I would like to open this discussion here about creating a xml/ raster wcs
ingest using gdal_translate.
My 2 goals are:
1 - get a xml like in [1] by running command line similar do gdal_wmts
driver in [2]

gdal_translate "WCS:
http://demo.geo-solutions.it:80/geoserver/wcs?version=2.0.1&coverage=nurc__Img_Sample
<http://demo.geo-solutions.it/geoserver/wcs?version=2.0.1&coverage=nurc__Img_Sample>
" wcs.xml -of WCS

*OR*

gdal_translate "WCS:
http://demo.geo-solutions.it/geoserver/ows?service=WCS&request=getCapabilities,layer=nurc__Img_Sample
" wcs.xml -of WCS


2 - get a xml / raster subset

gdal_translate "WCS:
http://demo.geo-solutions.it:80/geoserver/wcs?version=2.0.1&coverage=nurc__Img_Sample
<http://demo.geo-solutions.it/geoserver/wcs?version=2.0.1&coverage=nurc__Img_Sample>
" wcs.xml -projwin -100 40 -80 30 -of WCS

*OR*

gdal_translate "WCS:
http://demo.geo-solutions.it/geoserver/ows?service=WCS&request=getCapabilities,layer=nurc__Img_Sample
" wcs.xml -projwin -100 40 -80 30 -of WCS

If the solution I am trying to get can not be possible through
gdal_translate, would someone have an xml sample like in [1] to share, but
with raster subset ingest, instead the whole image content?

I appreciated your time in advance.

Kind regards

Julierme

[1] <WCS_GDAL>
  <ServiceURL>https://demo.geo-solutions.it/geoserver/wcs?version=2.0.1&amp
;</ServiceURL>
  <CoverageName>nurc:Img_Sample</CoverageName>

<GetCoverageExtra>&amp;BoundingBox=-130.85168,20.7052,-62.0054,54.1141</GetCoverageExtra>
</WCS_GDAL>

[2] gdal_translate "WMTS:
http://maps.wien.gv.at/wmts/1.0.0/WMTSCapabilities.xml,layer=lb"; wmts.xml -
of WMTS.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.osgeo.org/pipermail/gdal-dev/attachments/20201120/ca9ab931/attachment-0001.html>

------------------------------

Message: 2
Date: Sat, 21 Nov 2020 03:47:58 -0700 (MST)
From: jratike80 
<jukka.rahko...@maanmittauslaitos.fi<mailto:jukka.rahko...@maanmittauslaitos.fi>>
To: gdal-dev@lists.osgeo.org<mailto:gdal-dev@lists.osgeo.org>
Subject: Re: [gdal-dev] GDAL_WCS Driver and gdal_translate
Message-ID: 
<1605955678597-0.p...@n6.nabble.com<mailto:1605955678597-0.p...@n6.nabble.com>>
Content-Type: text/plain; charset=us-ascii

Hi,

Just a note to remind that earlier in thread "gdal-dev Digest, Vol 198,
Issue 14" it was noticed that the GDAL WCS driver most probably has a bug
and certain WCS coverages from Geoserver do not work. It seems to be related
with the native CRS EPSG:4326. So if you test now with Geoserver, don't test
with nurc__Img_Sample or other coverages which are in EPSG:4326.

I know this does not answer your question, sorry.

-Jukka Rahkonen-


juliermeopensourcedeveloper wrote
> Dear all,
>
> I would like to open this discussion here about creating a xml/ raster wcs
> ingest using gdal_translate.
> My 2 goals are:
> 1 - get a xml like in [1] by running command line similar do gdal_wmts
> driver in [2]
>
> gdal_translate "WCS:
> http://demo.geo-solutions.it:80/geoserver/wcs?version=2.0.1&coverage=nurc__Img_Sample
> &lt;http://demo.geo-solutions.it/geoserver/wcs?version=2.0.1&amp;coverage=nurc__Img_Sample&gt;
> " wcs.xml -of WCS
>
> *OR*
>
> gdal_translate "WCS:
> http://demo.geo-solutions.it/geoserver/ows?service=WCS&request=getCapabilities,layer=nurc__Img_Sample
> " wcs.xml -of WCS
>
>
> 2 - get a xml / raster subset
>
> gdal_translate "WCS:
> http://demo.geo-solutions.it:80/geoserver/wcs?version=2.0.1&coverage=nurc__Img_Sample
> &lt;http://demo.geo-solutions.it/geoserver/wcs?version=2.0.1&amp;coverage=nurc__Img_Sample&gt;
> " wcs.xml -projwin -100 40 -80 30 -of WCS
>
> *OR*
>
> gdal_translate "WCS:
> http://demo.geo-solutions.it/geoserver/ows?service=WCS&request=getCapabilities,layer=nurc__Img_Sample
> " wcs.xml -projwin -100 40 -80 30 -of WCS
>
> If the solution I am trying to get can not be possible through
> gdal_translate, would someone have an xml sample like in [1] to share, but
> with raster subset ingest, instead the whole image content?
>
> I appreciated your time in advance.
>
> Kind regards
>
> Julierme
>
> [1]
> <WCS_GDAL>
>
> <ServiceURL>
> https://demo.geo-solutions.it/geoserver/wcs?version=2.0.1&amp
> ;
> </ServiceURL>
>
> <CoverageName>
> nurc:Img_Sample
> </CoverageName>
>
> <GetCoverageExtra>
> &amp;BoundingBox=-130.85168,20.7052,-62.0054,54.1141
> </GetCoverageExtra>
> </WCS_GDAL>
> [2] gdal_translate "WMTS:
> http://maps.wien.gv.at/wmts/1.0.0/WMTSCapabilities.xml,layer=lb"; wmts.xml
> -
> of WMTS.
>
> _______________________________________________
> gdal-dev mailing list

> gdal-dev@.osgeo<mailto:gdal-dev@.osgeo>

> https://lists.osgeo.org/mailman/listinfo/gdal-dev





--
Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html


------------------------------

Message: 3
Date: Sat, 21 Nov 2020 09:59:01 -0500
From: Franco Amato <cvfr...@gmail.com<mailto:cvfr...@gmail.com>>
To: gdal-dev@lists.osgeo.org<mailto:gdal-dev@lists.osgeo.org>
Subject: [gdal-dev] Automatic labels placement
Message-ID:
        
<cadaawmcjmh6hs6hm1wkgjykmjzxetgqywrsokfrw3e1lucg...@mail.gmail.com<mailto:cadaawmcjmh6hs6hm1wkgjykmjzxetgqywrsokfrw3e1lucg...@mail.gmail.com>>
Content-Type: text/plain; charset="utf-8"

Good morning gdal members,
I would know if you know any automatic labels placement library. I tried
with PAL library located here (http://pal.heig-vd.ch) but it's too complex
to use with GDAL data.

Any suggestions are really appreciated.

Thank you,
Franco
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.osgeo.org/pipermail/gdal-dev/attachments/20201121/c0a10346/attachment-0001.html>

------------------------------

Message: 4
Date: Sat, 21 Nov 2020 18:47:18 +0330
From: Nazanin tavakoli <nazitkk1...@gmail.com<mailto:nazitkk1...@gmail.com>>
To: gdal-dev@lists.osgeo.org<mailto:gdal-dev@lists.osgeo.org>
Subject: [gdal-dev] resampling netcdf data
Message-ID:
        
<CAPBJ=oxvajgetpvmj9hkx8nf9we9xw3bxtftzjpcznftk4x...@mail.gmail.com<mailto:oxvajgetpvmj9hkx8nf9we9xw3bxtftzjpcznftk4x...@mail.gmail.com>>
Content-Type: text/plain; charset="utf-8"

Hello,
I want to change the resolution of my data whose resolution is 0.0416
degrees (1/24th) resolution and I want to convert it to 0.5 degrees. I have
already used this code but I have some errors. Could you please help me?
gdal_translate -of netCDF -tr 0.5 0.5 WS.nc
<https://www.youtube.com/redirect?redir_token=QUFFLUhqa0hCWkdnLUttTmVYbzh4UGFIeW9RQTBxa2piUXxBQ3Jtc0trMTVQTV9YMVVrZWVzb2xXVjh1LVBCQ2ZoT3FoTzNKYjQ2NndBcmIxQVd2TkM3NXU3dUVjQ2FtMXFkOWdRSi1vdTVISnd6UEpsZWRDRVlLSDlzZDJlcGdqdlU5S0xyOXhXSlFSajliMG1URkhrWi1iMA%3D%3D&event=comments&q=http%3A%2F%2Fws.nc%2F&stzid=UgynaQQEp5-9sVSWQqp4AaABAg.9GHKHEPqQ8_9GKO25Kpqfy>
WS_1.nc
<https://www.youtube.com/redirect?redir_token=QUFFLUhqbEYxWEQxZzZpbVZSNGk2RjZHUnVUdEVNNEpZd3xBQ3Jtc0ttNzZDcUdxdUN6QU5vc1lKVmdULVFqLWo1WDdjendJbXJwcm03a3R2bWN6dnRlaWM1bENzUXhFNnp2NlN6b2x6Q0V3X21ueFdBNm5HVmQzaEVsZ0FKWGNZNEZSSk9GdDdmbVFwY2JKX1RuUjk0TTJTUQ%3D%3D&event=comments&q=http%3A%2F%2F1.nc%2F&stzid=UgynaQQEp5-9sVSWQqp4AaABAg.9GHKHEPqQ8_9GKO25Kpqfy>
Warning 1: Recode from UTF-8 to CP_ACP failed with the error: "Invalid
argument".
Warning 1: No UNIDATA NC_GLOBAL:Conventions attribute Input file size is
8640, 4320 0Warning 1: Recode from UTF-8 to CP_ACP failed with the error:
"Invalid argument". ...10...20...30...40...50...60...70...80...90..Warning
1: Recode from UTF-8 to CP_ACP failed with the error: "Invalid argument".
.100 - done.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.osgeo.org/pipermail/gdal-dev/attachments/20201121/c8ee3be9/attachment-0001.html>

------------------------------

Subject: Digest Footer

_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org<mailto:gdal-dev@lists.osgeo.org>
https://lists.osgeo.org/mailman/listinfo/gdal-dev


------------------------------

End of gdal-dev Digest, Vol 198, Issue 45
*****************************************
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to