[Geoserver-users] WCS and multipart/mixed response

Hi, I am still somewhat of a new user of Geoserver (and of W*S in general); I know some of the basics, but am starting to work on specific use-case implementations for the project I’m on.

I have a store/layer setup on a local instance, and can get the WMS image as expected. However, when I did a WCS requeset, I was able to get a result, but the result was in a “multipart/mixed” response, and I had to manually go in and extract the TIF image from the second part. Is this normal for WCS responses? Or is there something perhaps configured incorrectly with the WCS server.

For example, here’s the URL I used to make the request (semi-redacted):

https://HOSTNAME/geoserver/NSIDC/wcs?service=WCS&version=1.1.0&request=GetCoverage&identifier=IDENTIFIER&BoundingBox=-900000,-900000,900000,900000,EPSG:3411&format=image/geotiff

And the first part of the response:

MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary=“----=_Part_75_128209765.1707259235983”

------=_Part_75_128209765.1707259235983
Content-Type: text/xml
Content-Transfer-Encoding: 7bit
Content-ID: urn:ogc:wcs:1.1:coverages

<?xml version="1.0" encoding="UTF-8"?>TITLEGenerated from ImageMosaicIDENTIFIER

------=_Part_75_128209765.1707259235983
Content-Type: image/tiff
Content-Transfer-Encoding: base64
Content-ID:

TU0AKgAAAAgAEQEAAAMAAAABATAAAAEBAAMAAAABATAAAAECAAMAAAABACAAAAEDAAMAAAABAAEA
AAEGAAMAAAABAAEAAAEVAAMAAAABAAEAAAEaAAUAAAABAAAA3AEbAAUAAAABAAAA5AEoAAMAAAAB
AAEAAAFCAAMAAAABATAAAAFDAAMAAAABATAAAAFEAAQAAAABAAABkgFFAAQAAAABAAWkAAFTAAMA
AAABAAMAAIXYAAwAAAAQAAAA7IevAAMAAAAQAAABbKSBAAIAAAAGAAABjAAAAAAAAAAAAAEAAAAB

… (more)

Thanks in advance. I’ve tried looking for documentation, but either my searching skills are just poor, or I’m misunderstanding what I’ve read.

Scott Lewis
NSIDC

I find that each different version of the WCS specification is a bit different. What you describe is normal for an odd standard.

Try the WCS 2 also?

The first versions of the spec returned that document, and the document had a link to the image output.

···


Jody Garnett

Hi,

Multipart is correct for WCS 1.1.x. If you just begin with WCS and do not have any special reason to use 1.1.x then I recommend WCS 2.0. It is much less odd than 1.1.x.

The standard texts are in https://www.ogc.org/standard/wcs/

-Jukka Rahkonen-

···

Lähettäjä: Scott Lewis <glewis@anonymised.com7…>
Lähetetty: keskiviikko 7. helmikuuta 2024 23.58
Vastaanottaja: geoserver-users@lists.sourceforge.net
Aihe: [Geoserver-users] WCS and multipart/mixed response

Hi, I am still somewhat of a new user of Geoserver (and of W*S in general); I know some of the basics, but am starting to work on specific use-case implementations for the project I’m on.

I have a store/layer setup on a local instance, and can get the WMS image as expected. However, when I did a WCS requeset, I was able to get a result, but the result was in a “multipart/mixed” response, and I had to manually go in and extract the TIF image from the second part. Is this normal for WCS responses? Or is there something perhaps configured incorrectly with the WCS server.

For example, here’s the URL I used to make the request (semi-redacted):

https://HOSTNAME/geoserver/NSIDC/wcs?service=WCS&version=1.1.0&request=GetCoverage&identifier=IDENTIFIER&BoundingBox=-900000,-900000,900000,900000,EPSG:3411&format=image/geotiff

And the first part of the response:

MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary=“----=_Part_75_128209765.1707259235983”

------=_Part_75_128209765.1707259235983
Content-Type: text/xml
Content-Transfer-Encoding: 7bit
Content-ID: urn:ogc:wcs:1.1:coverages

<?xml version="1.0" encoding="UTF-8"?>TITLEGenerated from ImageMosaicIDENTIFIER

------=_Part_75_128209765.1707259235983
Content-Type: image/tiff
Content-Transfer-Encoding: base64
Content-ID:

TU0AKgAAAAgAEQEAAAMAAAABATAAAAEBAAMAAAABATAAAAECAAMAAAABACAAAAEDAAMAAAABAAEA
AAEGAAMAAAABAAEAAAEVAAMAAAABAAEAAAEaAAUAAAABAAAA3AEbAAUAAAABAAAA5AEoAAMAAAAB
AAEAAAFCAAMAAAABATAAAAFDAAMAAAABATAAAAFEAAQAAAABAAABkgFFAAQAAAABAAWkAAFTAAMA
AAABAAMAAIXYAAwAAAAQAAAA7IevAAMAAAAQAAABbKSBAAIAAAAGAAABjAAAAAAAAAAAAAEAAAAB

… (more)

Thanks in advance. I’ve tried looking for documentation, but either my searching skills are just poor, or I’m misunderstanding what I’ve read.

Scott Lewis
NSIDC