CSW catalog settings and Metadata template

119 views
Skip to first unread message
Assigned to surendhar.d...@geosolutionsgroup.com by lorenzo...@geosolutionsgroup.com

Greg Vds

unread,
Sep 6, 2022, 11:26:26 AM9/6/22
to mapstore-developers
Hi,

I'm in the process of adding a CSW source to our catalog list (csw service from geoserver, DublinCore). 

I added it in the localconfig.json in the catalog.default.services.

Now I would like to be able to also set the advanced settings and a metadata template definition in the Mapstore app (and not letting the normal user to have to set that alone through the gui).

Where and how should I put that?

Also, in the record.properties, we have this:

Surendhar Dharmalingam

unread,
Sep 13, 2022, 8:22:26 AM9/13/22
to mapstore-developers
Hi Greg,

Thanks for reaching out.

Mapstore filters all references that correspond to get capabilities reference or layer references i.e scheme="http-get-capabilities" or matching pattern [/^OGC:WMS-(.*)-http-get-map/g, /^OGC:WMS/g]

Hence from the above dct references it matches only one i.e OGC:WMS and so only one result is returned.

Regards,
Suren

Greg Vds

unread,
Sep 19, 2022, 2:14:53 AM9/19/22
to mapstore-developers
Hi Suren,

Thank you for the explanation. Is there a way to remove this filter, or complete it in the localconfig of the app?
How can I add the advanced settings and the metadata template in the configuration of the app, so as it's already tuned for the users?

All the best,

Greg

Surendhar Dharmalingam

unread,
Sep 23, 2022, 2:24:07 AM9/23/22
to mapstore-developers
Hi Greg,

Unfortunately, there is no way to override the filter at the moment as it has some logic tied up. I will take this point as a feature request and if it's feasible we will create an issue in Mapstore and take it from there.

With respect to catalog service configuration with advanced settings, you may use this default configuration as an example.
```
{
    "services": {
        "Demo CSW Service": {
            "url": "https://demo.geo-solutions.it/geoserver/csw",
            "type": "csw",
            "title": "A title for Demo CSW Service",
            "showAdvancedSettings": true,
            "autoload": true,
            "autoSetVisibilityLimits": true,
            "showTemplate": true,
            "metadataTemplate": "<p>${description}</p>",
            "layerOptions": {
                "tileSize": 512
            },
            "format": "image/png8",
            "filter": {
                "staticFilter": "<ogc:Or><ogc:PropertyIsEqualTo><ogc:PropertyName>dc:type</ogc:PropertyName><ogc:Literal>dataset</ogc:Literal></ogc:PropertyIsEqualTo><ogc:PropertyIsEqualTo><ogc:PropertyName>dc:type</ogc:PropertyName><ogc:Literal>http://purl.org/dc/dcmitype/Dataset</ogc:Literal></ogc:PropertyIsEqualTo></ogc:Or>",
                "dynamicFilter": "<ogc:PropertyIsLike wildCard='%' singleChar='_' escapeChar='\\'><ogc:PropertyName>csw:AnyText</ogc:PropertyName><ogc:Literal>%${searchText}%</ogc:Literal></ogc:PropertyIsLike>"
            }
        }
    }
```

Also please refer these documentation links for more info on catalog service and configuration.

Hope this helps. Thanks!

Regards,
Suren

Greg Vds

unread,
Sep 26, 2022, 7:21:08 AM9/26/22
to mapstore-developers
Hi Suren,

This certainly helped a lot ;-).

Thank you very much,

Regards,
Greg

Greg Vds

unread,
Oct 19, 2022, 7:14:27 AM10/19/22
to mapstore-developers
Hi Surendhar,

And again a question about the csw definition and parameters in localconfig.js:
Is it possible to define in the layerOptions of the csw service the format of the getFeatureInfo response (text, html, json and so on)?

And a more global question about services: is it possible to define different services according to the MapStore application locale?

Thank you again.
All the best,

Greg

Surendhar Dharmalingam

unread,
Oct 21, 2022, 5:04:24 AM10/21/22
to mapstore-developers
Hi Greg,

Yes, you can configure `layerOptions` of the csw service but it is limited to tile size and WMS image format configuration.

```
layerOptions: {
    "format": "image/png8", 
    "tileSize": 512
}
```
Unfortunately, you cannot configure format of the getFeatureInfo response explicitly. 
However, upon adding a service, the application adds support to three formats by default to layer when added to map for getFeatureInfo response.
```
"infoFormats": [ "text/plain", "text/html", "application/json" ]
```
> is it possible to define different services according to the MapStore application locale?

In general all the services are made available regardless of the application locale.

Hope this was helpful. Please feel free to reach out for any clarifications you may have. 
Thanks for using Mapstore.

Regards,
Suren
Reply all
Reply to author
Forward
0 new messages