1

We host a very large image set using GeoServer's imagemosaic. Our dataset uses two dimensions (time and elevation). All WMS queries work like a charm in less than 200ms (including round trip time) but WCS queries take from 5 to 11 seconds.

Looking into GeoServer's logs I've found that every time a WCS request is processed there are two calls to the database querying for the full list of values of each dimension. This is an example:

2019-03-21 20:57:02,688 DEBUG [geotools.jdbc] - CREATE CONNECTION
2019-03-21 20:57:02,689 DEBUG [geotools.filter] - exporting PropertyName
2019-03-21 20:57:02,689 DEBUG [geotools.jdbc] - SELECT distinct("date") FROM "public"."data"
2019-03-21 20:57:04,496 DEBUG [geotools.jdbc] - CLOSE CONNECTION
2019-03-21 20:57:04,505 DEBUG [geotools.jdbc] - CREATE CONNECTION
2019-03-21 20:57:04,506 DEBUG [geotools.filter] - exporting PropertyName
2019-03-21 20:57:04,506 DEBUG [geotools.jdbc] - SELECT distinct("asset") FROM "public"."data"
2019-03-21 20:57:06,604 DEBUG [geotools.jdbc] - CLOSE CONNECTION

As you might see above, that full table queries take 4 seconds in a best case scenario.

We are making the WCS request using the POST method with this XML for example:

<GetCoverage service="WCS" version="2.0.1">
    <CoverageId>test__images</CoverageId>

    <Format>image/tiff</Format>

    <DimensionTrim>
        <Dimension>Lat</Dimension>
        <TrimLow>-34.677094</TrimLow>
        <TrimHigh>-34.667741</TrimHigh>
    </DimensionTrim>

    <DimensionTrim>
        <Dimension>Long</Dimension>
        <TrimLow>-61.546615</TrimLow>
        <TrimHigh>-61.526359</TrimHigh>
    </DimensionTrim>

    <DimensionSlice>
      <Dimension>elevation</Dimension>
      <SlicePoint>203</SlicePoint>
    </DimensionSlice>

    <DimensionSlice>
      <Dimension>time</Dimension>
      <SlicePoint>2019-03-18T00:00:00Z</SlicePoint>
    </DimensionSlice>

</GetCoverage>

We tried using the GET method also (using subset parameters) but we are observing the same results.

Is there any way we can avoid WCS to make that full table query?

  • This sort of question is best asked on the GeoServer user list – Ian Turton Mar 22 '19 at 8:16
  • Ian I take your recommendation, but yet i don't believe this is off topic. Could you please re-open the question? – luckyshonway Mar 22 '19 at 11:09

Browse other questions tagged or ask your own question.