How import shapefiles in DHIS2 (Geo coordinates boundaries in DHIS2)

Dear all.
I am requesting for your help. I want to design maps at the district and facility levels that include boundaries. To achieve this, we need shapefiles. How can we upload shapefiles into DHIS2?
Regards,

Hi!
You have to convert your shapefile to Geojson or gml format and be sure that the names of the boudaries and the ou are the same and then go to import/export app and use the org unit geometry import option

2 Likes

Hi @Shapr0019!

@Amadou is correct! We now recommend the use of GeoJSON now though (we need to update the documentation) as only GML v2.0 is supported and GeoJSON became a widespread format.

The documentation is available here: Maps - DHIS2 Documentation

We hope it goes smoothly, keep us posted!
Bruno

1 Like

Thank you very much @Amadou and @Bruno . I will try. By any chance, do you have a CSV file format for geo-coordinates that I can use and convert to GeoJSON when sending or importing into DHIS2?

GeoJSON Example

Here is a GeoJSON example and create file of .json file and upload.
you can find your co-ordinates from your ministry or consult with your Geomatics engineers or download from the internet as document suggest

{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "properties": {
        "organisationUnit": "Nepal", // Match this from your DHIS2 instance
        "id": "CseDlDfCmVm" // Match this from your DHIS2 instance
      },
      "geometry": {
        "type": "Polygon",
        "coordinates": [
          [
            [80.606141271502622, 30.466972730007456],
            [80.6073785911492, 30.466901345420865],
            [80.608000000000000, 30.467000000000000],
            [80.609500000000000, 30.467200000000000],  // Added a fourth point
            [80.609800000000000, 30.467500000000000],  // Added a fifth point
            [80.606141271502622, 30.466972730007456]  // Closing the polygon loop
          ]
        ]
      }
    }
  ]
}
2 Likes

This is good , thanks @rcpoudel. Just for clarity , the file you provided is for one org unity right? …because will be having many org unity we want to upload their coordinates once

1 Like

To make your data upload process more efficient, I recommend chunking the GeoJSON data into smaller files, each containing data for upto 50 organizations

GeoJSON for Multiple Organizations

{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "properties": {
        "organisationUnit": "Organization 1",
        "id": "Org_1"
      },
      "geometry": {
        "type": "Polygon",
        "coordinates": [
          [
            [80.606141271502622, 30.466972730007456],
            [80.6073785911492, 30.466901345420865],
            [80.608000000000000, 30.467000000000000],
            [80.606141271502622, 30.466972730007456]
          ]
        ]
      }
    },
    {
      "type": "Feature",
      "properties": {
        "organisationUnit": "Organization 2",
        "id": "Org_2"
      },
      "geometry": {
        "type": "Polygon",
        "coordinates": [
          [
            [80.606500000000000, 30.468000000000000],
            [80.607700000000000, 30.467800000000000],
            [80.608200000000000, 30.468200000000000],
            [80.606500000000000, 30.468000000000000]
          ]
        ]
      }
    }
    // Add 48 more organizations here
  ]
}
1 Like

@rcpoudel thank you very much, worked now

1 Like