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 <gml:high>1023 511</gml:high>) 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
<gml:boundedBy>
<gml:Envelope srsName=http://www.opengis.net/def/crs/EPSG/0/3857
axisLabels="x y" uomLabels=" " srsDimension="2">
<gml:lowerCorner>3005564.702644 10446506.055425</gml:lowerCorner>
<gml:upperCorner>3006588.702633 10447018.055420</gml:upperCorner>
</gml:Envelope>
</gml:boundedBy>
<gml:domainSet>
<gml:RectifiedGrid dimension="2" gml:id="grid_Coverage1">
<gml:limits>
<gml:GridEnvelope>
<gml:low>0 0</gml:low>
<gml:high>1023 511</gml:high>
</gml:GridEnvelope>
</gml:limits>
<gml:axisLabels>band_1</gml:axisLabels>
<gml:origin>
<gml:Point gml:id="grid_origin_Coverage1"
srsName=http://www.opengis.net/def/crs/EPSG/0/3857>
<gml:pos>3005564.702644 10446506.055425</gml:pos>
</gml:Point>
</gml:origin>
<gml:offsetVector
srsName=http://www.opengis.net/def/crs/EPSG/0/3857>XOFFSET1.000000XOFFSET 0
</gml:offsetVector>
<gml:offsetVector srsName=http://www.opengis.net/def/crs/EPSG/0/3857>0
YOFFSET1.000000YOFFSET </gml:offsetVector>
</gml:RectifiedGrid>
</gml:domainSet>
<gml:rangeSet>
<gml:File>
<gml:rangeParameters xlink:href=cid:Coverage1.tif
xlink:role=http://www.opengis.net/spec/WCS_coverageencoding_geotiff/1.0/
xlink:arcrole="fileReference"/>
<gml:fileReference>cid:Coverage1.tif</gml:fileReference<cid:Coverage1.tif%3c/gml:fileReference>>
<gml:fileStructure/>
<gml:mimeType>image/tiff</gml:mimeType>
</gml:File>
</gml:rangeSet>
<gmlcov:rangeType>
<swe:DataRecord>
<swe:field name="band_1">
<swe:Quantity>
<swe:description>band_1</swe:description>
<swe:uom code="unknown"/>
<swe:constraint>
<swe:AllowedValues>
<swe:interval>3.4E-38 3.4E+38</swe:interval>
</swe:AllowedValues>
</swe:constraint>
</swe:Quantity>
</swe:field>
</swe:DataRecord>
</gmlcov:rangeType>
</gmlcov:RectifiedGridCoverage>
--wcs
Content-Type: image/tiff
Content-Description: coverage data
Content-Transfer-Encoding: binary
Content-ID: 1.tif
…
-Jukka Rahkonen-
Lähettäjä: gdal-dev <[email protected]> Puolesta Carl Godkin
Lähetetty: torstai 21. lokakuuta 2021 18.47
Vastaanottaja: [email protected]
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&coverage=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
[email protected]
https://lists.osgeo.org/mailman/listinfo/gdal-dev