Re: [gdal-dev] gdallocationinfo + WCS question...

2021-10-21 Thread Carl Godkin
Thanks, Even.

That makes sense.  (Finally!)  I can wait a little bit to come back to this
so I'll either build 3.3 HEAD on my own or await the next release.

It's great that this isn't a random server load thing or something!

The weird result on my own WCS server also seemed to be caused by a bad
"xmin" value which is how I started down this road.

Thanks again,

carl




On Thu, Oct 21, 2021 at 1:49 PM Even Rouault 
wrote:

>
> Le 21/10/2021 à 22:32, Rahkonen Jukka (MML) a écrit :
>
> Hi Even,
>
>
>
> You are right, re-running the request -oo clear_cache gives me the same
> error about 3 bands. Obviously our server was configured right when I used
> it with GDAL last time. Now gdallocationinfo does not work even for me
> because I wiped the working configuration from my cache. We will fix the
> service metadata when we go from beta to official soon.
>
>
>
> The nationalmap.gov service does not still work for me. I cleared the
> cache but I still get a 404 error from the server. Subsets in the reques
> are these
>
> SUBSET=x(-20037507.067213,-13590403.131594259)=y(5303978.1067894027,5304490.1067842878)
>
> The xmin value in the request you get is obviously wrong. The subset I get
> with GDAL master and head of 3.3 branch is:
>
>
> SUBSET=x%(-13591427.131584032,-13590403.131594259)=y(5303978.1067894027,5304490.1067842878)
>
> I suspect you might use a GDAL release version, that hasn't yet received
> the following recent fix that is likely related to that issue and will be
> in 3.3.3 and 3.4.0:
>
>
> https://github.com/OSGeo/gdal/commit/8af67b64371c275a3770e75da1bd0d4bb7329295
>
> (I get the same error as you with the 3.2 branch, so I strongly suspect
> the above is indeed the fix for that)
>
> Even
>
> -- http://www.spatialys.com
> My software is free, but my time generally not.
>
>
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] gdallocationinfo + WCS question...

2021-10-21 Thread Even Rouault


Le 21/10/2021 à 22:32, Rahkonen Jukka (MML) a écrit :


Hi Even,

You are right, re-running the request -oo clear_cache gives me the 
same error about 3 bands. Obviously our server was configured right 
when I used it with GDAL last time. Now gdallocationinfo does not work 
even for me because I wiped the working configuration from my cache. 
We will fix the service metadata when we go from beta to official soon.


The nationalmap.gov service does not still work for me. I cleared the 
cache but I still get a 404 error from the server. Subsets in the 
reques are these

SUBSET=x(-20037507.067213,-13590403.131594259)=y(5303978.1067894027,5304490.1067842878)

The xmin value in the request you get is obviously wrong. The subset I 
get with GDAL master and head of 3.3 branch is:


SUBSET=x%(-13591427.131584032,-13590403.131594259)=y(5303978.1067894027,5304490.1067842878)

I suspect you might use a GDAL release version, that hasn't yet received 
the following recent fix that is likely related to that issue and will 
be in 3.3.3 and 3.4.0:


https://github.com/OSGeo/gdal/commit/8af67b64371c275a3770e75da1bd0d4bb7329295

(I get the same error as you with the 3.2 branch, so I strongly suspect 
the above is indeed the fix for that)


Even


--
http://www.spatialys.com
My software is free, but my time generally not.

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] gdallocationinfo + WCS question...

2021-10-21 Thread Carl Godkin
Hi again,

Like Jukka, I get a 404 from the National Map server.  (I kept removing the
cache directory just in case that mattered.)

I just asked a colleague in Texas to try the National Map WCS command and
it's not working for him either so Ari and Even are apparently lucky!

Thanks,
carl


On Thu, Oct 21, 2021 at 1:32 PM Rahkonen Jukka (MML) <
jukka.rahko...@maanmittauslaitos.fi> wrote:

> Hi Even,
>
>
>
> You are right, re-running the request -oo clear_cache gives me the same
> error about 3 bands. Obviously our server was configured right when I used
> it with GDAL last time. Now gdallocationinfo does not work even for me
> because I wiped the working configuration from my cache. We will fix the
> service metadata when we go from beta to official soon.
>
>
>
> The nationalmap.gov service does not still work for me. I cleared the
> cache but I still get a 404 error from the server. Subsets in the reques
> are these
>
> SUBSET=x(-20037507.067213,-13590403.131594259)=y(5303978.1067894027,5304490.1067842878)
>
> and gdallocationinfo error is this:
>
>
>
> Report:
>
>   Location: (6446955P,13504941L)
>
>   Band 1:
>
> ERROR 1: HTTP error code : 404
>
> ERROR 1: Failed to get coverage data:
>
> ERROR 1: C:\Users\JRAHKONEN\.gdal\wcs_cache\QpYSX.xml, band 1: IReadBlock
> failed at X offset 6295, Y offset 26376: Failed to get coverage data:
>
>
>
> -Jukka-
>
>
>
> *Lähettäjä:* Even Rouault 
> *Lähetetty:* torstai 21. lokakuuta 2021 22.50
> *Vastaanottaja:* Rahkonen Jukka (MML) ;
> Carl Godkin ; gdal-dev@lists.osgeo.org
> *Aihe:* Re: [gdal-dev] gdallocationinfo + WCS question...
>
>
>
> Jukka,
>
> I don't understand how you get a non-error on the below request on your
> WCS service:
>
>
> https://beta-karttakuva.maanmittauslaitos.fi/wcs/service/ows?SERVICE=WCS=DescribeCoverage=2.0.1=korkeusmalli__korkeusmalli=text/xml
> advertizes 3 bands
>
> but the GeoTIFF returned by
>
>
> https://beta-karttakuva.maanmittauslaitos.fi/wcs/service/ows?SERVICE=WCS=GetCoverage=2.0.1=korkeusmalli__korkeusmalli=E%28498656,500704%29=N%287542384,7543408%29=image/tiff
>
> has just one band.
>
> Or maybe you have in your ~/gdal/wcs_cache a previous version of the
> DescribeCoverage response that advertizes just one band ?
>
>
>
> And for what is worth,
>
> gdallocationinfo "WCS:
> https://elevation.nationalmap.gov:443/arcgis/services/3DEPElevation/ImageServer/WCSServer?version=2.0.1=DEP3Elevation;
> -wgs84 -122.086 42.948 --debug ON
>
> returns 1882.00549316406 for me
>
> The multipart answer doesn't seem to be an issue.
>
>
>
> Le 21/10/2021 à 20:16, Rahkonen Jukka (MML) a écrit :
>
> Hi,
>
>
>
> At least it seems to work with our WCS service
>
> gdallocationinfo WCS:
> https://beta-karttakuva.maanmittauslaitos.fi/wcs/service/ows?version=2.0.1=korkeusmalli__korkeusmalli
> -wgs84 27 68
>
> Report:
>
>   Location: (228000P,119567L)
>
>   Band 1:
>
> Value: 303.463989257812
>
>
>
> -Jukka Rahkonen-
>
>
>
> *Lähettäjä:* gdal-dev 
>  *Puolesta *Carl Godkin
> *Lähetetty:* torstai 21. lokakuuta 2021 18.47
> *Vastaanottaja:* gdal-dev@lists.osgeo.org
> *Aihe:* [gdal-dev] gdallocationinfo + WCS question...
>
>
>
> Hi,
>
>
>
> I am trying to use gdallocationinfo to query point locations from a WCS
> server and not having any luck. I don't see anything in the docs that says
> this is unsupported but I can't make it work.
>
>
>
> First of all, is there a better way to get an elevation from a given
> lat,lon using WCS?
>
>
>
> Here's an example query using the USGS National Map server:
>
>
>
> gdallocationinfo "WCS:
> https://elevation.nationalmap.gov:443/arcgis/services/3DEPElevation/ImageServer/WCSServer?version=2.0.1=DEP3Elevation;
> -wgs84 -122.086 42.948 --debug ON
>
>
>
> This is a point in the middle of Crater Lake which I picked since it's
> flat and I know what to expect.
>
>
>
> Anyway, looking at the debug output it appears that the program is
> querying for a GeoTIFF of a VERY large area and that's failing.
>
>
>
> I actually want to do this with my own WCS server but thought it might be
> mis-configured somehow so I tried the USGS server.  With my own server,
> gdallocationinfo seems to be requesting a strange shape from the server (as
> I can see through the debug output).
>
>
>
> Thanks for any help,
>
>
>
> carl
>
>
>
>
>
> ___
>
> gdal-dev mailing list
>
> gdal-dev@lists.osgeo.org
>
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
>
> --
>
> http://www.spatialys.com
>
> My software is free, but my time generally not.
>
>
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] gdallocationinfo + WCS question...

2021-10-21 Thread Rahkonen Jukka (MML)
Hi Even,

You are right, re-running the request -oo clear_cache gives me the same error 
about 3 bands. Obviously our server was configured right when I used it with 
GDAL last time. Now gdallocationinfo does not work even for me because I wiped 
the working configuration from my cache. We will fix the service metadata when 
we go from beta to official soon.

The nationalmap.gov service does not still work for me. I cleared the cache but 
I still get a 404 error from the server. Subsets in the reques are these
SUBSET=x(-20037507.067213,-13590403.131594259)=y(5303978.1067894027,5304490.1067842878)
and gdallocationinfo error is this:

Report:
  Location: (6446955P,13504941L)
  Band 1:
ERROR 1: HTTP error code : 404
ERROR 1: Failed to get coverage data:
ERROR 1: C:\Users\JRAHKONEN\.gdal\wcs_cache\QpYSX.xml, band 1: IReadBlock 
failed at X offset 6295, Y offset 26376: Failed to get coverage data:

-Jukka-

Lähettäjä: Even Rouault 
Lähetetty: torstai 21. lokakuuta 2021 22.50
Vastaanottaja: Rahkonen Jukka (MML) ; Carl 
Godkin ; gdal-dev@lists.osgeo.org
Aihe: Re: [gdal-dev] gdallocationinfo + WCS question...


Jukka,

I don't understand how you get a non-error on the below request on your WCS 
service:

https://beta-karttakuva.maanmittauslaitos.fi/wcs/service/ows?SERVICE=WCS=DescribeCoverage=2.0.1=korkeusmalli__korkeusmalli=text/xml
 advertizes 3 bands

but the GeoTIFF returned by

https://beta-karttakuva.maanmittauslaitos.fi/wcs/service/ows?SERVICE=WCS=GetCoverage=2.0.1=korkeusmalli__korkeusmalli=E%28498656,500704%29=N%287542384,7543408%29=image/tiff

has just one band.

Or maybe you have in your ~/gdal/wcs_cache a previous version of the 
DescribeCoverage response that advertizes just one band ?



And for what is worth,

gdallocationinfo 
"WCS:https://elevation.nationalmap.gov:443/arcgis/services/3DEPElevation/ImageServer/WCSServer?version=2.0.1=DEP3Elevation;
 -wgs84 -122.086 42.948 --debug ON

returns 1882.00549316406 for me

The multipart answer doesn't seem to be an issue.


Le 21/10/2021 à 20:16, Rahkonen Jukka (MML) a écrit :
Hi,

At least it seems to work with our WCS service

gdallocationinfo 
WCS:https://beta-karttakuva.maanmittauslaitos.fi/wcs/service/ows?version=2.0.1=korkeusmalli__korkeusmalli
 -wgs84 27 68
Report:
  Location: (228000P,119567L)
  Band 1:
Value: 303.463989257812

-Jukka Rahkonen-

Lähettäjä: gdal-dev 
 
Puolesta Carl Godkin
Lähetetty: torstai 21. lokakuuta 2021 18.47
Vastaanottaja: gdal-dev@lists.osgeo.org
Aihe: [gdal-dev] gdallocationinfo + WCS question...

Hi,

I am trying to use gdallocationinfo to query point locations from a WCS server 
and not having any luck. I don't see anything in the docs that says this is 
unsupported but I can't make it work.

First of all, is there a better way to get an elevation from a given lat,lon 
using WCS?

Here's an example query using the USGS National Map server:

gdallocationinfo 
"WCS:https://elevation.nationalmap.gov:443/arcgis/services/3DEPElevation/ImageServer/WCSServer?version=2.0.1=DEP3Elevation;
 -wgs84 -122.086 42.948 --debug ON

This is a point in the middle of Crater Lake which I picked since it's flat and 
I know what to expect.

Anyway, looking at the debug output it appears that the program is querying for 
a GeoTIFF of a VERY large area and that's failing.

I actually want to do this with my own WCS server but thought it might be 
mis-configured somehow so I tried the USGS server.  With my own server, 
gdallocationinfo seems to be requesting a strange shape from the server (as I 
can see through the debug output).

Thanks for any help,

carl




___

gdal-dev mailing list

gdal-dev@lists.osgeo.org

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

--

http://www.spatialys.com

My software is free, but my time generally not.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] gdallocationinfo + WCS question...

2021-10-21 Thread Carl Godkin
Thanks, Ari and Jukka.

Even running gdalinfo on the WCS server ahead of gdallocationinfo does not
help for either Jukka's server or the National Map server.

Although I tried originally on Windows 10 with GDAL 3.3.1, I have also
tried all of this from an RHEL 7 system (with GDAL 3.0.2) and WSL/Ubuntu
with 3.0.2.  I even tried the GDAL 2.4.4 that came bundled with MS4W and no
joy there either.

I am pretty puzzled by this behavior.  Most of the time I install GDAL with
"conda install gdal" but I can't believe I'm getting a broken version of
GDAL there.  Oh, and the RHEL 7 system is elsewhere, so it's not some weird
filtering on my computer's connection as far as I can tell.

Thanks for the help,

carl




On Thu, Oct 21, 2021 at 12:32 PM Rahkonen Jukka (MML) <
jukka.rahko...@maanmittauslaitos.fi> wrote:

> Hi,
>
> Try to run first
> gdalinfo "WCS:
> https://beta-karttakuva.maanmittauslaitos.fi/wcs/service/ows?version=2.0.1
> "
>
>
>
> and repeat the test then. If it works Ari may be able to tell why.
>
>
>
> -Jukka-
>
>
>
>
>
> Ari may be able to explain
>
>
>
> *Lähettäjä:* Carl Godkin 
> *Lähetetty:* torstai 21. lokakuuta 2021 22.25
> *Vastaanottaja:* Rahkonen Jukka (MML) ;
> gdal-dev@lists.osgeo.org
> *Aihe:* Re: [gdal-dev] gdallocationinfo + WCS question...
>
>
>
> Hi Jukka,
>
>
>
> Strangely, the command you pasted doesn't work for me, at with GDAL 3.3.1
> on Windows (with quotes added appropriately):
>
>
>
> gdallocationinfo "WCS:
> https://beta-karttakuva.maanmittauslaitos.fi/wcs/service/ows?version=2.0.1=korkeusmalli__korkeusmalli;
> -wgs84 27 68
> ERROR 1: PROJ: proj_uom_get_info_from_database: unit of measure not found
> Report:
>   Location: (228000P,119567L)
>   Band 1:
> ERROR 1: Returned tile does not match expected band configuration.
> Response has 1 bands while this dataset has 3 bands.
>
> ERROR 1: C:\Users\carl\.gdal\wcs_cache\nhXWS.xml, band 1: IReadBlock
> failed at X offset 222, Y offset 233: Returned tile does not match expected
> band configuration.
> Response has 1 bands while this dataset has 3 bands.
>
>   Band 2:
> ERROR 1: Returned tile does not match expected band configuration.
> Response has 1 bands while this dataset has 3 bands.
>
> ERROR 1: C:\Users\carl\.gdal\wcs_cache\nhXWS.xml, band 2: IReadBlock
> failed at X offset 222, Y offset 233: Returned tile does not match expected
> band configuration.
> Response has 1 bands while this dataset has 3 bands.
>
>   Band 3:
> ERROR 1: Returned tile does not match expected band configuration.
> Response has 1 bands while this dataset has 3 bands.
>
> ERROR 1: C:\Users\carl\.gdal\wcs_cache\nhXWS.xml, band 3: IReadBlock
> failed at X offset 222, Y offset 233: Returned tile does not match expected
> band configuration.
> Response has 1 bands while this dataset has 3 bands.
>
>
>
> I find that somewhat reassuring since I get a similar error when querying
> my own WCS server (that you helped me set up over the past couple of days):
>
>
>
> gdallocationinfo "WCS:
> http://localhost:8080/wcs?service=WCS=2.0.1=SRTM_3_arc-second_grid;
> -wgs84 -122.086 42.948
> Report:
>   Location: (3498P,8465L)
>   Band 1:
> ERROR 1: Returned tile does not match expected configuration.
> Got 4094x512 instead of 1024x512.
> ERROR 1: C:\Users\carl\.gdal\wcs_cache\hcoMu.xml, band 1: IReadBlock
> failed at X offset 3, Y offset 16: Returned tile does not match expected
> configuration.
> Got 4094x512 instead of 1024x512.
>
>
>
> Or, with --debug ON:
>
>
>
> gdallocationinfo "WCS:
> http://localhost:8080/wcs?service=WCS=2.0.1=SRTM_3_arc-second_grid;
> -wgs84 -122.086 42.948 --debug ON
> GDAL: GDALOpen(WCS:
> http://localhost:8080/wcs?service=WCS=2.0.1=SRTM_3_arc-second_grid,
> this=0228A4B2B970) succeeds as WCS.
> Report:
>   Location: (3498P,8465L)
>   Band 1:
> GDAL: GDAL_CACHEMAX = 6535 MB
> WCS: Requesting
> http://localhost:8080/wcs?service=WCS=GetCoverage=2.0.1=SRTM_3_arc-second_grid=long%28-125,-121.5880315%29=lat%2842.74956749998,43.17606349998%29=image/tiff
> HTTP: Fetch(
> http://localhost:8080/wcs?service=WCS=GetCoverage=2.0.1=SRTM_3_arc-second_grid=long%28-125,-121.5880315%29=lat%2842.74956749998,43.17606349998%29=image/tiff
> )
> HTTP: libcurl/7.78.0 Schannel zlib/1.2.11 libssh2/1.9.0
> HTTP: GDAL was built against curl 7.77.0, but is running against 7.78.0.
> WCS: GDALOpenResult() on content-type: image/tiff
> GDAL: GDALOpen(/vsimem/wcs/0228A4B2B970/wcsresult.dat,
> this=0228A4CEEC40) succeeds as GTiff.
> ERROR 1: Returned tile does not match expected configuration.
> Got 4094x512 instead of 1024x512.
> GDAL: GDALClose(/vsimem/wcs/0228A4B2B970/wcsresult.dat,
> this=0228A4CEEC40)
> ERROR 1: C:\Users\carl\.gdal\wcs_cache\hcoMu.xml, band 1: IReadBlock
> failed at X offset 3, Y offset 16: Returned tile does not match expected
> configuration.
> Got 4094x512 instead of 1024x512.
> GDAL: GDALClose(C:\Users\carl\.gdal\wcs_cache\hcoMu.xml,
> this=0228A4B2B970)
>
>
>
> Any suggestions?  If I break the above debug 

Re: [gdal-dev] gdallocationinfo + WCS question...

2021-10-21 Thread Even Rouault

Jukka,

I don't understand how you get a non-error on the below request on your 
WCS service:


https://beta-karttakuva.maanmittauslaitos.fi/wcs/service/ows?SERVICE=WCS=DescribeCoverage=2.0.1=korkeusmalli__korkeusmalli=text/xml 
advertizes 3 bands


but the GeoTIFF returned by

https://beta-karttakuva.maanmittauslaitos.fi/wcs/service/ows?SERVICE=WCS=GetCoverage=2.0.1=korkeusmalli__korkeusmalli=E%28498656,500704%29=N%287542384,7543408%29=image/tiff

has just one band.

Or maybe you have in your ~/gdal/wcs_cache a previous version of the 
DescribeCoverage response that advertizes just one band ?



And for what is worth,

gdallocationinfo 
"WCS:https://elevation.nationalmap.gov:443/arcgis/services/3DEPElevation/ImageServer/WCSServer?version=2.0.1=DEP3Elevation 
" 
-wgs84 -122.086 42.948 --debug ON


returns 1882.00549316406 for me

The multipart answer doesn't seem to be an issue.


Le 21/10/2021 à 20:16, Rahkonen Jukka (MML) a écrit :


Hi,

At least it seems to work with our WCS service

gdallocationinfo 
WCS:https://beta-karttakuva.maanmittauslaitos.fi/wcs/service/ows?version=2.0.1=korkeusmalli__korkeusmalli 
 
-wgs84 27 68


Report:

  Location: (228000P,119567L)

  Band 1:

    Value: 303.463989257812

-Jukka Rahkonen-

*Lähettäjä:* gdal-dev  *Puolesta 
*Carl Godkin

*Lähetetty:* torstai 21. lokakuuta 2021 18.47
*Vastaanottaja:* gdal-dev@lists.osgeo.org
*Aihe:* [gdal-dev] gdallocationinfo + WCS question...

Hi,

I am trying to use gdallocationinfo to query point locations from a 
WCS server and not having any luck. I don't see anything in the docs 
that says this is unsupported but I can't make it work.


First of all, is there a better way to get an elevation from a given 
lat,lon using WCS?


Here's an example query using the USGS National Map server:

gdallocationinfo 
"WCS:https://elevation.nationalmap.gov:443/arcgis/services/3DEPElevation/ImageServer/WCSServer?version=2.0.1=DEP3Elevation 
" 
-wgs84 -122.086 42.948 --debug ON


This is a point in the middle of Crater Lake which I picked since it's 
flat and I know what to expect.


Anyway, looking at the debug output it appears that the program is 
querying for a GeoTIFF of a VERY large area and that's failing.


I actually want to do this with my own WCS server but thought it might 
be mis-configured somehow so I tried the USGS server.  With my own 
server, gdallocationinfo seems to be requesting a strange shape from 
the server (as I can see through the debug output).


Thanks for any help,

carl


___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


--
http://www.spatialys.com
My software is free, but my time generally not.

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] gdallocationinfo + WCS question...

2021-10-21 Thread Rahkonen Jukka (MML)
Hi,
Try to run first
gdalinfo 
"WCS:https://beta-karttakuva.maanmittauslaitos.fi/wcs/service/ows?version=2.0.1;

and repeat the test then. If it works Ari may be able to tell why.

-Jukka-


Ari may be able to explain

Lähettäjä: Carl Godkin 
Lähetetty: torstai 21. lokakuuta 2021 22.25
Vastaanottaja: Rahkonen Jukka (MML) ; 
gdal-dev@lists.osgeo.org
Aihe: Re: [gdal-dev] gdallocationinfo + WCS question...

Hi Jukka,

Strangely, the command you pasted doesn't work for me, at with GDAL 3.3.1 on 
Windows (with quotes added appropriately):

gdallocationinfo 
"WCS:https://beta-karttakuva.maanmittauslaitos.fi/wcs/service/ows?version=2.0.1=korkeusmalli__korkeusmalli;
 -wgs84 27 68
ERROR 1: PROJ: proj_uom_get_info_from_database: unit of measure not found
Report:
  Location: (228000P,119567L)
  Band 1:
ERROR 1: Returned tile does not match expected band configuration.
Response has 1 bands while this dataset has 3 bands.

ERROR 1: C:\Users\carl\.gdal\wcs_cache\nhXWS.xml, band 1: IReadBlock failed at 
X offset 222, Y offset 233: Returned tile does not match expected band 
configuration.
Response has 1 bands while this dataset has 3 bands.

  Band 2:
ERROR 1: Returned tile does not match expected band configuration.
Response has 1 bands while this dataset has 3 bands.

ERROR 1: C:\Users\carl\.gdal\wcs_cache\nhXWS.xml, band 2: IReadBlock failed at 
X offset 222, Y offset 233: Returned tile does not match expected band 
configuration.
Response has 1 bands while this dataset has 3 bands.

  Band 3:
ERROR 1: Returned tile does not match expected band configuration.
Response has 1 bands while this dataset has 3 bands.

ERROR 1: C:\Users\carl\.gdal\wcs_cache\nhXWS.xml, band 3: IReadBlock failed at 
X offset 222, Y offset 233: Returned tile does not match expected band 
configuration.
Response has 1 bands while this dataset has 3 bands.

I find that somewhat reassuring since I get a similar error when querying my 
own WCS server (that you helped me set up over the past couple of days):

gdallocationinfo 
"WCS:http://localhost:8080/wcs?service=WCS=2.0.1=SRTM_3_arc-second_grid;
 -wgs84 -122.086 42.948
Report:
  Location: (3498P,8465L)
  Band 1:
ERROR 1: Returned tile does not match expected configuration.
Got 4094x512 instead of 1024x512.
ERROR 1: C:\Users\carl\.gdal\wcs_cache\hcoMu.xml, band 1: IReadBlock failed at 
X offset 3, Y offset 16: Returned tile does not match expected configuration.
Got 4094x512 instead of 1024x512.

Or, with --debug ON:

gdallocationinfo 
"WCS:http://localhost:8080/wcs?service=WCS=2.0.1=SRTM_3_arc-second_grid;
 -wgs84 -122.086 42.948 --debug ON
GDAL: 
GDALOpen(WCS:http://localhost:8080/wcs?service=WCS=2.0.1=SRTM_3_arc-second_grid,
 this=0228A4B2B970) succeeds as WCS.
Report:
  Location: (3498P,8465L)
  Band 1:
GDAL: GDAL_CACHEMAX = 6535 MB
WCS: Requesting 
http://localhost:8080/wcs?service=WCS=GetCoverage=2.0.1=SRTM_3_arc-second_grid=long%28-125,-121.5880315%29=lat%2842.74956749998,43.17606349998%29=image/tiff
HTTP: 
Fetch(http://localhost:8080/wcs?service=WCS=GetCoverage=2.0.1=SRTM_3_arc-second_grid=long%28-125,-121.5880315%29=lat%2842.74956749998,43.17606349998%29=image/tiff)
HTTP: libcurl/7.78.0 Schannel zlib/1.2.11 libssh2/1.9.0
HTTP: GDAL was built against curl 7.77.0, but is running against 7.78.0.
WCS: GDALOpenResult() on content-type: image/tiff
GDAL: GDALOpen(/vsimem/wcs/0228A4B2B970/wcsresult.dat, 
this=0228A4CEEC40) succeeds as GTiff.
ERROR 1: Returned tile does not match expected configuration.
Got 4094x512 instead of 1024x512.
GDAL: GDALClose(/vsimem/wcs/0228A4B2B970/wcsresult.dat, 
this=0228A4CEEC40)
ERROR 1: C:\Users\carl\.gdal\wcs_cache\hcoMu.xml, band 1: IReadBlock failed at 
X offset 3, Y offset 16: Returned tile does not match expected configuration.
Got 4094x512 instead of 1024x512.
GDAL: GDALClose(C:\Users\carl\.gdal\wcs_cache\hcoMu.xml, this=0228A4B2B970)

Any suggestions?  If I break the above debug output down and use "curl" to 
download the GeoTIFF and then use gdallocationinfo on the downloaded file, I 
get a reasonable result.
I guess I could do that.  But what I find very strange is that gdallocationinfo 
seems to request a rather odd-shaped patch (-125 to -121.5 in longitude, but 
only 42.75 to 43.18 in latitude) which cases trouble.

Thanks a lot,

carl




On Thu, Oct 21, 2021 at 11:16 AM Rahkonen Jukka (MML) 
mailto:jukka.rahko...@maanmittauslaitos.fi>>
 wrote:
Hi,

At least it seems to work with our WCS service

gdallocationinfo 
WCS:https://beta-karttakuva.maanmittauslaitos.fi/wcs/service/ows?version=2.0.1=korkeusmalli__korkeusmalli
 -wgs84 27 68
Report:
  Location: (228000P,119567L)
  Band 1:
Value: 303.463989257812

-Jukka Rahkonen-

Lähettäjä: gdal-dev 
mailto:gdal-dev-boun...@lists.osgeo.org>> 
Puolesta Carl Godkin
Lähetetty: torstai 21. lokakuuta 2021 18.47
Vastaanottaja: gdal-dev@lists.osgeo.org
Aihe: [gdal-dev] gdallocationinfo + WCS question...

Hi,

I am trying to use 

Re: [gdal-dev] gdallocationinfo + WCS question...

2021-10-21 Thread Rahkonen Jukka (MML)
Hi,

My first test was:
gdallocationinfo  
"WCS:https://elevation.nationalmap.gov:443/arcgis/services/3DEPElevation/ImageServer/WCSServer?version=2.0.1=DEP3Elevation;
 -wgs84 10 20 --debug on

Generated request was:
WCS: Requesting 
https://elevation.nationalmap.gov:443/arcgis/services/3DEPElevation/ImageServer/WCSServer?SERVICE=WCS=GetCoverage=2.0.1=DEP3Elevation=x%281112188.7215549201,1113212.7215446942%29=y%282272938.1370637044,2273450.1370585896%29=image/tiff

Gdallocationfo showed:
Value: 0

Maybe it is a right value, I do not know. I got zero value also with -wgs84 27 
68. Now I tried with the coordinates that you used -wgs84 -122.086 42.948 but 
it leads into server error after GDAL sent this request with quite a large 
subsets:
WCS: Requesting 
https://elevation.nationalmap.gov:443/arcgis/services/3DEPElevation/ImageServer/WCSServer?SERVICE=WCS=GetCoverage=2.0.1=DEP3Elevation=x%28-20037507.067213,-13590403.131594259%29=y%285303978.1067894027,5304490.1067842878%29=image/tiff

-Jukka-





Lähettäjä: gdal-dev  Puolesta Ari Jolma
Lähetetty: torstai 21. lokakuuta 2021 22.09
Vastaanottaja: gdal-dev@lists.osgeo.org
Aihe: Re: [gdal-dev] gdallocationinfo + WCS question...


I don't understand the problem :)

Maybe it's because I ran gdalinfo on the WCS first.

For the gdallocationinfo I get

gdallocationinfo 
"WCS:https://elevation.nationalmap.gov:443/arcgis/services/3DEPElevation/ImageServer/WCSServer?version=2.0.1=DEP3Elevation;
 -wgs84 -122.086 42.948
Report:
  Location: (6446955P,13504941L)
  Band 1:
Value: 1882.00549316406

Ari
Rahkonen Jukka (MML) kirjoitti 21.10.2021 klo 21.56:
Hi,

I wonder if the problem is in the multipart response that the nationalmap.gov 
server is sending. The result is not too big tiff (1023x511 pixels as revealed 
by 1023 511) but perhaps GDAL does not know how to extract 
it from the multipart envelope. I do not know either. I thought that multipart 
was only an issue with WCS 1.1.x but obviously it can be used also with WCS 
2.0. I do understand how brilliant idea multipart response is in theory but 
unfortunately it is a pain for the users.

This is the beginning of the response:

--wcs
Content-Type: text/xml
Content-ID: GML-Part
  
http://www.opengis.net/def/crs/EPSG/0/3857 
axisLabels="x y" uomLabels=" " srsDimension="2">
  3005564.702644 10446506.055425
  3006588.702633 10447018.055420

  
  

  

  0 0
  1023 511

  
  band_1
  
http://www.opengis.net/def/crs/EPSG/0/3857>
  3005564.702644 10446506.055425

  
  http://www.opengis.net/def/crs/EPSG/0/3857>XOFFSET1.00XOFFSET 0 

  http://www.opengis.net/def/crs/EPSG/0/3857>0 
YOFFSET1.00YOFFSET 

  
  

  http://www.opengis.net/spec/WCS_coverageencoding_geotiff/1.0/ 
xlink:arcrole="fileReference"/>
  
cid:Coverage1.tif>
  
  image/tiff

  
  

  

  band_1
  
  

  3.4E-38 3.4E+38

  

  

  

--wcs
Content-Type: image/tiff
Content-Description: coverage data
Content-Transfer-Encoding: binary
Content-ID: 1.tif
…

-Jukka Rahkonen-


Lähettäjä: gdal-dev 
 
Puolesta Carl Godkin
Lähetetty: torstai 21. lokakuuta 2021 18.47
Vastaanottaja: gdal-dev@lists.osgeo.org
Aihe: [gdal-dev] gdallocationinfo + WCS question...

Hi,

I am trying to use gdallocationinfo to query point locations from a WCS server 
and not having any luck. I don't see anything in the docs that says this is 
unsupported but I can't make it work.

First of all, is there a better way to get an elevation from a given lat,lon 
using WCS?

Here's an example query using the USGS National Map server:

gdallocationinfo 
"WCS:https://elevation.nationalmap.gov:443/arcgis/services/3DEPElevation/ImageServer/WCSServer?version=2.0.1=DEP3Elevation;
 -wgs84 -122.086 42.948 --debug ON

This is a point in the middle of Crater Lake which I picked since it's flat and 
I know what to expect.

Anyway, looking at the debug output it appears that the program is querying for 
a GeoTIFF of a VERY large area and that's failing.

I actually want to do this with my own WCS server but thought it might be 
mis-configured somehow so I tried the USGS server.  With my own server, 
gdallocationinfo seems to be requesting a strange shape from the server (as I 
can see through the debug output).

Thanks for any help,

carl




___

gdal-dev mailing list

gdal-dev@lists.osgeo.org

https://lists.osgeo.org/mailman/listinfo/gdal-dev
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] gdallocationinfo + WCS question...

2021-10-21 Thread Carl Godkin
Hi Jukka,

Strangely, the command you pasted doesn't work for me, at with GDAL 3.3.1
on Windows (with quotes added appropriately):

gdallocationinfo "WCS:
https://beta-karttakuva.maanmittauslaitos.fi/wcs/service/ows?version=2.0.1=korkeusmalli__korkeusmalli;
-wgs84 27 68
ERROR 1: PROJ: proj_uom_get_info_from_database: unit of measure not found
Report:
  Location: (228000P,119567L)
  Band 1:
ERROR 1: Returned tile does not match expected band configuration.
Response has 1 bands while this dataset has 3 bands.

ERROR 1: C:\Users\carl\.gdal\wcs_cache\nhXWS.xml, band 1: IReadBlock failed
at X offset 222, Y offset 233: Returned tile does not match expected band
configuration.
Response has 1 bands while this dataset has 3 bands.

  Band 2:
ERROR 1: Returned tile does not match expected band configuration.
Response has 1 bands while this dataset has 3 bands.

ERROR 1: C:\Users\carl\.gdal\wcs_cache\nhXWS.xml, band 2: IReadBlock failed
at X offset 222, Y offset 233: Returned tile does not match expected band
configuration.
Response has 1 bands while this dataset has 3 bands.

  Band 3:
ERROR 1: Returned tile does not match expected band configuration.
Response has 1 bands while this dataset has 3 bands.

ERROR 1: C:\Users\carl\.gdal\wcs_cache\nhXWS.xml, band 3: IReadBlock failed
at X offset 222, Y offset 233: Returned tile does not match expected band
configuration.
Response has 1 bands while this dataset has 3 bands.

I find that somewhat reassuring since I get a similar error when querying
my own WCS server (that you helped me set up over the past couple of days):

gdallocationinfo "WCS:
http://localhost:8080/wcs?service=WCS=2.0.1=SRTM_3_arc-second_grid;
-wgs84 -122.086 42.948
Report:
  Location: (3498P,8465L)
  Band 1:
ERROR 1: Returned tile does not match expected configuration.
Got 4094x512 instead of 1024x512.
ERROR 1: C:\Users\carl\.gdal\wcs_cache\hcoMu.xml, band 1: IReadBlock failed
at X offset 3, Y offset 16: Returned tile does not match expected
configuration.
Got 4094x512 instead of 1024x512.

Or, with --debug ON:

gdallocationinfo "WCS:
http://localhost:8080/wcs?service=WCS=2.0.1=SRTM_3_arc-second_grid;
-wgs84 -122.086 42.948 --debug ON
GDAL: GDALOpen(WCS:
http://localhost:8080/wcs?service=WCS=2.0.1=SRTM_3_arc-second_grid,
this=0228A4B2B970) succeeds as WCS.
Report:
  Location: (3498P,8465L)
  Band 1:
GDAL: GDAL_CACHEMAX = 6535 MB
WCS: Requesting
http://localhost:8080/wcs?service=WCS=GetCoverage=2.0.1=SRTM_3_arc-second_grid=long%28-125,-121.5880315%29=lat%2842.74956749998,43.17606349998%29=image/tiff
HTTP: Fetch(
http://localhost:8080/wcs?service=WCS=GetCoverage=2.0.1=SRTM_3_arc-second_grid=long%28-125,-121.5880315%29=lat%2842.74956749998,43.17606349998%29=image/tiff
)
HTTP: libcurl/7.78.0 Schannel zlib/1.2.11 libssh2/1.9.0
HTTP: GDAL was built against curl 7.77.0, but is running against 7.78.0.
WCS: GDALOpenResult() on content-type: image/tiff
GDAL: GDALOpen(/vsimem/wcs/0228A4B2B970/wcsresult.dat,
this=0228A4CEEC40) succeeds as GTiff.
ERROR 1: Returned tile does not match expected configuration.
Got 4094x512 instead of 1024x512.
GDAL: GDALClose(/vsimem/wcs/0228A4B2B970/wcsresult.dat,
this=0228A4CEEC40)
ERROR 1: C:\Users\carl\.gdal\wcs_cache\hcoMu.xml, band 1: IReadBlock failed
at X offset 3, Y offset 16: Returned tile does not match expected
configuration.
Got 4094x512 instead of 1024x512.
GDAL: GDALClose(C:\Users\carl\.gdal\wcs_cache\hcoMu.xml,
this=0228A4B2B970)

Any suggestions?  If I break the above debug output down and use "curl" to
download the GeoTIFF and then use gdallocationinfo on the downloaded file,
I get a reasonable result.
I guess I could do that.  But what I find very strange is that
gdallocationinfo seems to request a rather odd-shaped patch (-125 to -121.5
in longitude, but only 42.75 to 43.18 in latitude) which cases trouble.

Thanks a lot,

carl




On Thu, Oct 21, 2021 at 11:16 AM Rahkonen Jukka (MML) <
jukka.rahko...@maanmittauslaitos.fi> wrote:

> Hi,
>
>
>
> At least it seems to work with our WCS service
>
> gdallocationinfo WCS:
> https://beta-karttakuva.maanmittauslaitos.fi/wcs/service/ows?version=2.0.1=korkeusmalli__korkeusmalli
> -wgs84 27 68
>
> Report:
>
>   Location: (228000P,119567L)
>
>   Band 1:
>
> Value: 303.463989257812
>
>
>
> -Jukka Rahkonen-
>
>
>
> *Lähettäjä:* gdal-dev  *Puolesta *Carl
> Godkin
> *Lähetetty:* torstai 21. lokakuuta 2021 18.47
> *Vastaanottaja:* gdal-dev@lists.osgeo.org
> *Aihe:* [gdal-dev] gdallocationinfo + WCS question...
>
>
>
> Hi,
>
>
>
> I am trying to use gdallocationinfo to query point locations from a WCS
> server and not having any luck. I don't see anything in the docs that says
> this is unsupported but I can't make it work.
>
>
>
> First of all, is there a better way to get an elevation from a given
> lat,lon using WCS?
>
>
>
> Here's an example query using the USGS National Map server:
>
>
>
> gdallocationinfo "WCS:
> 

Re: [gdal-dev] gdallocationinfo + WCS question...

2021-10-21 Thread Ari Jolma

I don't understand the problem :)

Maybe it's because I ran gdalinfo on the WCS first.

For the gdallocationinfo I get

gdallocationinfo 
"WCS:https://elevation.nationalmap.gov:443/arcgis/services/3DEPElevation/ImageServer/WCSServer?version=2.0.1=DEP3Elevation; 
-wgs84 -122.086 42.948

Report:
  Location: (6446955P,13504941L)
  Band 1:
    Value: 1882.00549316406

Ari

Rahkonen Jukka (MML) kirjoitti 21.10.2021 klo 21.56:


Hi,

I wonder if the problem is in the multipart response that the 
nationalmap.gov server is sending. The result is not too big tiff 
(1023x511 pixels as revealed by 1023 511) but 
perhaps GDAL does not know how to extract it from the multipart 
envelope. I do not know either. I thought that multipart was only an 
issue with WCS 1.1.x but obviously it can be used also with WCS 2.0. I 
do understand how brilliant idea multipart response is in theory but 
unfortunately it is a pain for the users.


This is the beginning of the response:


--wcs

Content-Type: text/xml

Content-ID: GML-Part

  

    http://www.opengis.net/def/crs/EPSG/0/3857 
 axisLabels="x y" 
uomLabels=" " srsDimension="2">


  3005564.702644 10446506.055425

  3006588.702633 10447018.055420

    

  

  

    

  

    

  0 0

  1023 511

    

  

band_1

  

    srsName=http://www.opengis.net/def/crs/EPSG/0/3857 
>


  3005564.702644 10446506.055425

    

  

  srsName=http://www.opengis.net/def/crs/EPSG/0/3857 
>XOFFSET1.00XOFFSET 0 



  srsName=http://www.opengis.net/def/crs/EPSG/0/3857 
>0 YOFFSET1.00YOFFSET 



    

  

  

    

   
xlink:role=http://www.opengis.net/spec/WCS_coverageencoding_geotiff/1.0/ 
 
xlink:arcrole="fileReference"/>


  cid:Coverage1.tif>


  

image/tiff

    

  

  

    

  

    

band_1

  

  

    

  3.4E-38 3.4E+38

    

  

    

  

    

  



--wcs

Content-Type: image/tiff

Content-Description: coverage data

Content-Transfer-Encoding: binary

Content-ID: 1.tif

…

-Jukka Rahkonen-

*Lähettäjä:* gdal-dev  *Puolesta 
*Carl Godkin

*Lähetetty:* torstai 21. lokakuuta 2021 18.47
*Vastaanottaja:* gdal-dev@lists.osgeo.org
*Aihe:* [gdal-dev] gdallocationinfo + WCS question...

Hi,

I am trying to use gdallocationinfo to query point locations from a 
WCS server and not having any luck. I don't see anything in the docs 
that says this is unsupported but I can't make it work.


First of all, is there a better way to get an elevation from a given 
lat,lon using WCS?


Here's an example query using the USGS National Map server:

gdallocationinfo 
"WCS:https://elevation.nationalmap.gov:443/arcgis/services/3DEPElevation/ImageServer/WCSServer?version=2.0.1=DEP3Elevation 
" 
-wgs84 -122.086 42.948 --debug ON


This is a point in the middle of Crater Lake which I picked since it's 
flat and I know what to expect.


Anyway, looking at the debug output it appears that the program is 
querying for a GeoTIFF of a VERY large area and that's failing.


I actually want to do this with my own WCS server but thought it might 
be mis-configured somehow so I tried the USGS server.  With my own 
server, gdallocationinfo seems to be requesting a strange shape from 
the server (as I can see through the debug output).


Thanks for any help,

carl


___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] gdallocationinfo + WCS question...

2021-10-21 Thread Rahkonen Jukka (MML)
Hi,

I wonder if the problem is in the multipart response that the nationalmap.gov 
server is sending. The result is not too big tiff (1023x511 pixels as revealed 
by 1023 511) but perhaps GDAL does not know how to extract 
it from the multipart envelope. I do not know either. I thought that multipart 
was only an issue with WCS 1.1.x but obviously it can be used also with WCS 
2.0. I do understand how brilliant idea multipart response is in theory but 
unfortunately it is a pain for the users.

This is the beginning of the response:

--wcs
Content-Type: text/xml
Content-ID: GML-Part
  
http://www.opengis.net/def/crs/EPSG/0/3857 
axisLabels="x y" uomLabels=" " srsDimension="2">
  3005564.702644 10446506.055425
  3006588.702633 10447018.055420

  
  

  

  0 0
  1023 511

  
  band_1
  
http://www.opengis.net/def/crs/EPSG/0/3857>
  3005564.702644 10446506.055425

  
  http://www.opengis.net/def/crs/EPSG/0/3857>XOFFSET1.00XOFFSET 0 

  http://www.opengis.net/def/crs/EPSG/0/3857>0 
YOFFSET1.00YOFFSET 

  
  

  http://www.opengis.net/spec/WCS_coverageencoding_geotiff/1.0/ 
xlink:arcrole="fileReference"/>
  
cid:Coverage1.tif>
  
  image/tiff

  
  

  

  band_1
  
  

  3.4E-38 3.4E+38

  

  

  

--wcs
Content-Type: image/tiff
Content-Description: coverage data
Content-Transfer-Encoding: binary
Content-ID: 1.tif
…

-Jukka Rahkonen-


Lähettäjä: gdal-dev  Puolesta Carl Godkin
Lähetetty: torstai 21. lokakuuta 2021 18.47
Vastaanottaja: gdal-dev@lists.osgeo.org
Aihe: [gdal-dev] gdallocationinfo + WCS question...

Hi,

I am trying to use gdallocationinfo to query point locations from a WCS server 
and not having any luck. I don't see anything in the docs that says this is 
unsupported but I can't make it work.

First of all, is there a better way to get an elevation from a given lat,lon 
using WCS?

Here's an example query using the USGS National Map server:

gdallocationinfo 
"WCS:https://elevation.nationalmap.gov:443/arcgis/services/3DEPElevation/ImageServer/WCSServer?version=2.0.1=DEP3Elevation;
 -wgs84 -122.086 42.948 --debug ON

This is a point in the middle of Crater Lake which I picked since it's flat and 
I know what to expect.

Anyway, looking at the debug output it appears that the program is querying for 
a GeoTIFF of a VERY large area and that's failing.

I actually want to do this with my own WCS server but thought it might be 
mis-configured somehow so I tried the USGS server.  With my own server, 
gdallocationinfo seems to be requesting a strange shape from the server (as I 
can see through the debug output).

Thanks for any help,

carl

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] gdallocationinfo + WCS question...

2021-10-21 Thread Rahkonen Jukka (MML)
Hi,

At least it seems to work with our WCS service

gdallocationinfo 
WCS:https://beta-karttakuva.maanmittauslaitos.fi/wcs/service/ows?version=2.0.1=korkeusmalli__korkeusmalli
 -wgs84 27 68
Report:
  Location: (228000P,119567L)
  Band 1:
Value: 303.463989257812

-Jukka Rahkonen-

Lähettäjä: gdal-dev  Puolesta Carl Godkin
Lähetetty: torstai 21. lokakuuta 2021 18.47
Vastaanottaja: gdal-dev@lists.osgeo.org
Aihe: [gdal-dev] gdallocationinfo + WCS question...

Hi,

I am trying to use gdallocationinfo to query point locations from a WCS server 
and not having any luck. I don't see anything in the docs that says this is 
unsupported but I can't make it work.

First of all, is there a better way to get an elevation from a given lat,lon 
using WCS?

Here's an example query using the USGS National Map server:

gdallocationinfo 
"WCS:https://elevation.nationalmap.gov:443/arcgis/services/3DEPElevation/ImageServer/WCSServer?version=2.0.1=DEP3Elevation;
 -wgs84 -122.086 42.948 --debug ON

This is a point in the middle of Crater Lake which I picked since it's flat and 
I know what to expect.

Anyway, looking at the debug output it appears that the program is querying for 
a GeoTIFF of a VERY large area and that's failing.

I actually want to do this with my own WCS server but thought it might be 
mis-configured somehow so I tried the USGS server.  With my own server, 
gdallocationinfo seems to be requesting a strange shape from the server (as I 
can see through the debug output).

Thanks for any help,

carl

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


[gdal-dev] gdallocationinfo + WCS question...

2021-10-21 Thread Carl Godkin
Hi,

I am trying to use gdallocationinfo to query point locations from a WCS
server and not having any luck. I don't see anything in the docs that says
this is unsupported but I can't make it work.

First of all, is there a better way to get an elevation from a given
lat,lon using WCS?

Here's an example query using the USGS National Map server:

gdallocationinfo "WCS:
https://elevation.nationalmap.gov:443/arcgis/services/3DEPElevation/ImageServer/WCSServer?version=2.0.1=DEP3Elevation;
-wgs84 -122.086 42.948 --debug ON

This is a point in the middle of Crater Lake which I picked since it's flat
and I know what to expect.

Anyway, looking at the debug output it appears that the program is querying
for a GeoTIFF of a VERY large area and that's failing.

I actually want to do this with my own WCS server but thought it might be
mis-configured somehow so I tried the USGS server.  With my own server,
gdallocationinfo seems to be requesting a strange shape from the server (as
I can see through the debug output).

Thanks for any help,

carl
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


[gdal-dev] Export / import from PostGIS to GRASS and primary keys

2021-10-21 Thread Juan Pedro Pérez Alcántara
Hi there,

I have some questions about the role of primary keys when importing /
exporting between PostGIS and GRASS. I've been making some tests regarding
this process and what follows are my impressions, so they may be wrong in
some points.

I fully understand that, given the disparity of data models,
simplifications needs to be taken regarding the very complex primary key
arrangements (multi column keys, for example) a Relational Database can do,
and that going through the GDAL pipeline with an integer autonumber ogc_fid
key is the sensible way to go, this is something that can be easily managed.

However, my workflow implies quite a lot of PostGIS ingested data that goes
to GRASS to perform topology cleaning and some other operations and back to
PostGIS. In this process, I've notice the following:

- GDAL ignores the primary key of the database, substituting it with an
ogc_fid, when importing into GRASS;

- when going back to PostGIS, another key comes from GRASS. I'm aware of
the FID option to rename the key.

My problem with this is that I lose in the process the original PostGIS
table PK. I'm workarounding this by making a physical copy of the PK into
another column, so when data is back, I can link original / GRASS processed
data.

Then, my question is: is there a way to keep the PK field at PostGIS into
the GDAL pipeline as a normal column, so I don't have to duplicate the
original PK as I'm doing right now?

Thank you so much, best regards,

---

Juan Pedro Pérez Alcántara

jp.perez.alcant...@gmail.com
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev