inasafe / inasafe

InaSAFE - QGIS plugin for estimating impact from natural disasters
www.inasafe.org
GNU General Public License v3.0
258 stars 134 forks source link

Support metadata with different headers than the custom inasafe generated ones #3478

Open NyakudyaA opened 7 years ago

NyakudyaA commented 7 years ago

Problem

Using a layer with metadata that is for instance generated with geonode does not work in inasafe because of the differences in the headers for the two metadata documents. Currently the only way to make geonode metadata usable in inasafe is to search and replace the headers and footers on the metadata record generated by csw.

Attached is the header that shows the main differences: comp1

The image below depicts differences in the footer of the xml. img

Expected Behaviour

Register any layer as insafe layer as long as the metadata has keywords irregardless of the header and footer differences.

Proposed Solution

Support all formats of headers and footer for geonode

timlinux commented 7 years ago

Use WB time for this @ismailsunni

ismailsunni commented 7 years ago

Hi @NyakudyaA Can you give me a way to get the metadata which has InaSAFE keywords and has different header/footer? Currently, I get either the InaSAFE keywords or the different header/footer, but not both in the same file.

NyakudyaA commented 7 years ago

@ismailsunni Please find the attached metadata file. This one has InaSAFE keywords with different header and footer. metadata.zip Notice how the InaSAFE keywords look like. This is because when you add them in the geonode UI they get escaped when being stored in the database

ismailsunni commented 7 years ago

@NyakudyaA do you also expect that InaSAFE can read your metadata (with escaped inasafe keywords) ?

NyakudyaA commented 7 years ago

@ismailsunni The escaping issue is a metadata issue in geonode. When you add metadata in geonode UI it is saved in the database in that format. I think I documented it in another ticket. We should be able to download geonode metadata from geonode and use it in QGIS. Without any modification. Currently, I had to escape the metadata so that the keywords are properly defined.