I created a map with administrative boundaries with QGIS.
Now I want to import this map to DHIS2. how to do that.
I would like to quote @Bjorn_Sandvik here:
Hi, it is not possible to import a QGIS project file into DHIS2, so the results needs to be viewed in QGIS, or you can make an PDF export.
Thank you for your quick response.
just for clarification: I converted my map’s chapfile file to a GML file in QGIS.
now; I have the GML file of my map, how to import it into DHIS2.
Okay, I will leave @Bjorn_Sandvik to answer the question (or one of the experts); however, I would like to tell you that importing data back to DHIS2 was asked in the Maps GIS Workshop and there might be a second workshop to cover more of these types of questions.
I copied the link to this video to the time when this is mentioned (it’s in the end at 2:07:51):
Hi @elmoujarrade, do your polygons (or points) correspond to orgunits that already exist in DHIS2? In that case, you just have to make sure the names match in GML: Maps - DHIS2 Documentation (and that you have the right projection, EPSG:4326)
Here is an excerpt from my GML file. I opted to use the name of the region (Oriental). the error massage I received while importing is as follows:
Failed to validate job runtime - `GML import failed: Le type d'élément "gml:featureMember" doit se terminer par la balise de fin correspondante "</gml:featureMember>". On line 18 column 7.
Hi, my XML is rusty, but you could try removing the backslashes in front of <ogr:Name> and </ogr:Name>
Thanks for sharing the tool “xmllint”
You’re welcome! I never tried it but thought it could be helpful because I’ve seen DHIS2 experts here sometimes recommend use jsonlint.com …
do you have a sample GML file with Organisations units to share with me.
Thank you for your support.
Hi @elmoujarrade, just to clarify, you can not import a “QGIS Project file” into DHIS2, but you can import a GML file that is properly formatted. We hope to switch to GeoJSON (a much cleaner format) in a future version: https://jira.dhis2.org/browse/DHIS2-7171
Did you check the documentation on: Maps - DHIS2 Documentation
Especially “Step 3 - Prepare the GML file” as you already have the GML file.
If it still does’t work, could you please share the full GML file with me?
Try to use
<ogr:uid>...</ogr:uid> when specifying the UID of your organisation units in the GML file.
I am very grateful for the support. I am so happy that the borders layer is displayed.
Thank you so much