Closed NyakudyaA closed 7 years ago
@nyakudya please clean up your description, it's hard to follow. This needs to go upstream to the Geonode project, which @lucernae can do
@NyakudyaA the fastest way to do something like this is for now is to strip inasafe keywords tags and insert it to supplementalInformation using Geonode's Edit Layer UI (click the layers > Edit Layers > Edit Metadata > Supplemental Information). However this string will be escaped, so I need to do another preprocess to insert it to GeoSAFE. But with this, I would be able to easily find that InaSAFE metadata (which is in supplementalInformation and can be extracted via CSW). The ideal solutions would be by doing modification in InaSAFE so that its keywords fully conforms GMD ISO Metadata, and I think now understand the real problem after exploring some metadata stuffs. But I need to read more about the standard. I suggests for now we put InaSAFE keywords in supplemental information using Geonode's UI even if it will be escaped.
@lucernae I have written database triggers to correct the special characters that are inserted into the metadata record. If we go ahead with it we will return metadata that is properly formated and this would mean some code in geosafe needs to match this. This helps us when using metadata in QGIS. metadata
I would say to go with it. So, I will change the code in GeoSAFE if you already made changes to oondra.
I don't think database triggers are a good long term solution unless they are scripted into the oondra deployment repo.
This issue was moved to kartoza/geonode#269
Problem
When uploading a layer without specifying the preserve metadata tag. The inasafe keywords cannot be added to the geonode ui because the inasafe keywords are xml encoded with tags. The metadata record is uploaded to the postgres database
base_resourcebase
.Example: `
Solution
Allow geonode ui to upload supplementary keywords as xml tags. This mean we need to find ways of inserting xml tags into the database table or strip inasafe keywords tags properly so that they can be inserted into the database table