← Back to team overview

dhis2-users team mailing list archive

Re: Importing GADM boundaries into DHIS2

 

Thanks Knut, I was able to import directly from the file you shared via
matching the ISO codes. Very helpful!


On Wed, Aug 8, 2018 at 6:26 AM Knut Staring <knutst@xxxxxxxxx> wrote:

> Forgot to add some regions that can be used for grouping and filtering
> (these are not WHO regions):
>
> South-eastern Asia
> 'BRN','IDN','KHM','LAO','MMR','MYS','PHL','SGP','THA','TLS','VNM'
> Southern Asia
> 'AFG','BGD','BTN','IND','IRN','LKA','MDV','NPL','PAK'
> Western Asia
>
> 'ARE','ARM','AZE','BHR','CYP','GEO','IRQ','ISR','JOR','KWT','LBN','OMN','PSE','QAT','SAU','SYR','TUR','YEM'
> Central Asia
> 'KAZ','KGZ','TJK','TKM','UZB'
> Eastern Asia
> 'CHN','HKG','JPN','KOR','MAC','MNG','PRK','TWN'
> Northern Africa
> 'DZA','EGY','ESH','LBY','MAR','SDN','TUN'
> Sub-Saharan Africa
>
> 'AGO','ATF','BDI','BEN','BFA','BWA','CAF','CIV','CMR','COD','COG','COM','CPV','DJI','ERI','ETH','GAB','GHA','GIN','GMB','GNB','GNQ','IOT','KEN','LBR','LSO','MDG','MLI','MOZ','MRT','MUS','MWI','MYT','NAM','NER','NGA','REU','RWA','SEN','SHN','SLE','SOM','SSD','STP','SWZ','SYC','TCD','TGO','TZA','UGA','ZAF','ZMB','ZWE'
> 'AGO','BDI','COG','COD','GNQ','GAB','RWA','STP'
>
> On Wed, Aug 8, 2018 at 12:25 PM Knut Staring <knutst@xxxxxxxxx> wrote:
>
>> Hi Nick,
>>
>> I have been working on a solution to import all the levels, but if you
>> are really only looking for the country level, it is quite straightforward.
>> The main obstacle is the size of the file, which can be significantly
>> reduced by a) filtering out polygons that you don't need (e.g. Antartica)
>> and b) simplifying those you do need, e.g. using http://mapshaper.org/
>> (which can also be downloaded and run locally on your laptop).
>>
>> The filtering can be done in several ways.
>> a) It seems you already have the orgunits in your tree, which will then
>> serve as a filter itself. Do you already have three-letter ISO codes for
>> matching?
>> b) If you did not already have the countries (or no good way of
>> matching), you can use the ogr2ogr tool of the GDAL package like this:
>>
>> ogr2ogr -where "GID_0  in
>> ('AGO','BDI','COG','COD','GNQ','GAB','RWA','STP')" countries.shp
>> gadm36_0.shp
>>
>> c) Since we now require PostGIS (from 2.30), that is the most versatile
>> tool for all of these manipulations (though not sure if the simplification
>> algorithms are as good as the ones Mapshaper offers).
>>
>> I attach a file of all countries reduced to 4%, let me know if you are
>> able to use that directly.
>>
>> Knut
>>
>> On Tue, Aug 7, 2018 at 11:38 PM Shurajit Dutta <shurajitdutta@xxxxxxxxx>
>> wrote:
>>
>>> Hi everyone
>>>
>>> Was wondering if there was a simplified process to import GADM (
>>> https://gadm.org/) boundaries into DHIS2.
>>>
>>> For example, if I have a global hierarchy of some sort and only want to
>>> import the country-level boundaries.
>>>
>>> ie.
>>> Global
>>> ---Regional
>>> -----Country
>>>
>>> Thanks,
>>> Nick
>>>
>>> --
>>> Shurajit Dutta (MPH, MHI)
>>> Health Information Systems Adviser
>>> _______________________________________________
>>> Mailing list: https://launchpad.net/~dhis2-users
>>> Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx
>>> Unsubscribe : https://launchpad.net/~dhis2-users
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>
>>
>> --
>> Knut Staring
>>
>> Department of Information, Evidence and Research
>> World Health Organization, Geneva, Switzerland
>> Office: +41 22 791 3683 Mob1: +33 6 4434 2931 Mob2: +47 9188 0522
>> Skype:     knutstar
>>
>
>
> --
> Knut Staring
>
> Department of Information, Evidence and Research
> World Health Organization, Geneva, Switzerland
> Office: +41 22 791 3683 Mob1: +33 6 4434 2931 Mob2: +47 9188 0522
> Skype:     knutstar
>


-- 
Shurajit Dutta (MPH, MHI)
Health Information Systems Adviser

Follow ups

References