ckan / ckanext-dcat

CKAN ♥ DCAT
164 stars 142 forks source link

two many locn:geometry #249

Open jze opened 1 year ago

jze commented 1 year ago

For DCAT-AP the extension generates too many locn:geometry values.

DCAT-AP specifies the cardinality of locn:geometry for the class dct:Location as [0..1].

Currently the export looks like this

<dct:spatial>
  <dct:Location rdf:nodeID="N1c28db5fb3c64004809faa27ab9f2c18">
    <locn:geometry rdf:datatype="https://www.iana.org/assignments/media-types/application/vnd.geo+json">{"type":"Polygon","coordinates":[[[8.63647,54.30695],[8.63629,54.30572],[8.63691,54.30567],[8.63697,54.30688],[8.63647,54.30695]]]}</locn:geometry>
    <locn:geometry rdf:datatype="http://www.opengis.net/ont/geosparql#wktLiteral">POLYGON ((8.6365 54.3070, 8.6363 54.3057, 8.6369 54.3057, 8.6370 54.3069, 8.6365 54.3070))</locn:geometry>
  </dct:Location>
</dct:spatial>

I suggest to remove the GeoJSON entry. Then the export would be:

<dct:spatial>
  <dct:Location rdf:nodeID="N1c28db5fb3c64004809faa27ab9f2c18">
    <locn:geometry rdf:datatype="http://www.opengis.net/ont/geosparql#wktLiteral">POLYGON ((8.6365 54.3070, 8.6363 54.3057, 8.6369 54.3057, 8.6370 54.3069, 8.6365 54.3070))</locn:geometry>
  </dct:Location>
</dct:spatial>