-
Notifications
You must be signed in to change notification settings - Fork 152
Description
We are running CKAN 2.10 on docker containers with ckanext-dcat installed with the profile set as ckanext.dcat.rdf.profiles = euro_dcat_ap_3
and ckanext.dat.output_spatial_format
left as the default wtk. We have been testing out the rdf exposure of the spatial coverage field by looking at the .jsonld and .xml endpoints. The _parse_geodata function in the base profile (ckanext-dcat/ckanext/dcat/profiles/base.py
) indicates that both WKT and GeoJSON formats should be accepted, but only GeoJSON input seems to work.
Entering a GeoJSON string such as {"type": "Point", "coordinates": [102.0, 0.5]}
results in a WTK parsing at the .xml endpoint.
<dct:spatial>
<dct:Location rdf:nodeID="N22187f65232347ffb027d17c3d6a1368">
<dcat:centroid rdf:datatype="http://www.opengis.net/ont/geosparql#wktLiteral">POINT (102.0000 0.5000)</dcat:centroid>
</dct:Location>
</dct:spatial>.
Setting the output_spatial_format as geojson also gives a correct output.
<dct:spatial>
<dct:Location rdf:nodeID="N424c9233272c47ec9ae58bec46b872ee">
<dcat:centroid rdf:datatype="https://www.iana.org/assignments/media-types/application/vnd.geo+json">{"type": "Point", "coordinates": [102.0, 0.5]}</dcat:centroid>
</dct:Location>
</dct:spatial>
When entering a WTK string such as POINT (102.0 0.5)
, however, nothing shows up at the endpoint, in WTK or GeoJSON format.
<dct:spatial>
<dct:Location rdf:nodeID="N58fb40312991454495e1a7066ad098c2"/>
</dct:spatial>
Changing to a different profile setup, such as ckanext.dcat.rdf.profiles = euro_dcat_ap_2 euro_dcat_ap_scheming
does not change the behaviour. Is the spatial coverage field meant to accept WTK input, or just GeoJSON?