zalf-rdm / geonode

GeoNode is an open source platform that facilitates the creation, sharing, and collaborative use of geospatial data.
https://geonode.org/
Other
0 stars 0 forks source link

Feature: implement use_constraints with restrictioncodes #112

Open mwallschlaeger opened 3 weeks ago

mwallschlaeger commented 3 weeks ago

Feature Description

COMPLICATED TO DESCRIBE, ASK @mwallschlaeger for details

We're decided to have a two part approach for constraints:

  1. use constraints for defined constraints by us (zalf) with 3 default restrictionscodes (copyright, ...)
  2. other constraints for user defined constraints with default restrictionscode (other restrichtions) .

Upstream geonode implements this with Restrictions and Other constraints like: image This we can use to impl. 2. as it is exactly what we need.

for 1. we need to reimplement the field use_constraints (which is in zalf/geonode, but not in the way we need it) to be a free text field, and another field use_constraints_restrictions which holds the restriction codes applied to use_constraints so they can also be written to the xml like:

   <gmd:resourceConstraints>
         <gmd:MD_LegalConstraints>
           <gmd:useConstraints>
              <gmd:MD_RestrictionCode codeSpace="ISOTC211/19115" codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#MD_RestrictionCode" codeListValue="limitation not listed">limitation not listed</gmd:MD_RestrictionCode>
           </gmd:useConstraints>
           <gmd:otherConstraints>
             <gco:CharacterString>CC BYgfdhfg</gco:CharacterString>
           </gmd:otherConstraints>
         </gmd:MD_LegalConstraints>
       </gmd:resourceConstraints>

tasks todo:

PART OF https://github.com/zalf-rdm/geonode/issues/9