0

I am trying to get metadata of each mosaic image element defined with its attributes using datastore.properties postgis indexing method. Is it possible to get that info in some way using Geoserver CSW service? I tried GetRecords type of request but it only returns layer metadata.

Request:

endpoint

/geoserver/csw 

reqBody

<?xml version="1.0" encoding="UTF-8"?>
<GetRecords service="CSW" version="2.0.2" maxRecords="50" startPosition="1" resultType="results" outputFormat="application/xml" outputSchema="http://www.opengis.net/cat/csw/2.0.2" xmlns="http://www.opengis.net/cat/csw/2.0.2" xmlns:csw="http://www.opengis.net/cat/csw/2.0.2" xmlns:ogc="http://www.opengis.net/ogc" xmlns:ows="http://www.opengis.net/ows" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dct="http://purl.org/dc/terms/" xmlns:gml="http://www.opengis.net/gml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/cat/csw/2.0.2 ../../../csw/2.0.2/CSW-discovery.xsd">
  <Query typeNames="csw:Record">
    <ElementSetName typeNames="csw:Record">full</ElementSetName>
    <Constraint version="1.1.0">
      <ogc:Filter>
        <ogc:PropertyIsLike wildCard="%" singleChar="_" escapeChar="\">
          <ogc:PropertyName>dc:title</ogc:PropertyName>
          <ogc:Literal>%esat%</ogc:Literal>
        </ogc:PropertyIsLike>
      </ogc:Filter>
    </Constraint>
  </Query>
</GetRecords>

Response:

<?xml version="1.0" encoding="UTF-8"?>
<csw:GetRecordsResponse xmlns:csw="http://www.opengis.net/cat/csw/2.0.2" xmlns:rim="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dct="http://purl.org/dc/terms/" xmlns:ows="http://www.opengis.net/ows" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0.2" xsi:schemaLocation="http://www.opengis.net/cat/csw/2.0.2 http://192.168.180.132:9091/geoserver/schemas/csw/2.0.2/record.xsd">
    <csw:SearchStatus timestamp="2022-12-15T16:14:46.543Z"/>
    <csw:SearchResults numberOfRecordsMatched="1" numberOfRecordsReturned="1" nextRecord="0" recordSchema="http://www.opengis.net/cat/csw/2.0.2" elementSet="full">
        <csw:Record>
            <dc:identifier>testiranje_rastera:esat3</dc:identifier>
            <dc:creator>GeoServer Catalog</dc:creator>
            <dct:references scheme="OGC:WMS">http://192.168.180.132:9091/geoserver/wms?service=WMS&amp;request=GetMap&amp;layers=testiranje_rastera:esat3</dct:references>
            <dc:subject>esat3</dc:subject>
            <dc:subject>WCS</dc:subject>
            <dc:subject>ImageMosaic</dc:subject>
            <dc:description>Generated from ImageMosaic</dc:description>
            <dc:title>esat3</dc:title>
            <dc:type>http://purl.org/dc/dcmitype/Dataset</dc:type>
            <ows:BoundingBox crs="urn:x-ogc:def:crs:EPSG:6.11:4326">
                <ows:LowerCorner>45.75093578854459 16.035794771100694</ows:LowerCorner>
                <ows:UpperCorner>45.9313002833765 16.152964170260535</ows:UpperCorner>
            </ows:BoundingBox>
        </csw:Record>
    </csw:SearchResults>
</csw:GetRecordsResponse>

1 Answer 1

1

GeoServer internal CSW can provide metadata on single layer and on services only, but not on the single images part of a mosaic.

It could be added, with some coding. See here if you are interested in pursuing it: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-fixes,-improvements-and-new-features-in-GeoServer

3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.