← Back to team overview

dhis2-users team mailing list archive

Re: [Dhis2-devs] Info on GIS development

 

Very happy to see progress on this, but I cannot quite get it to work:

I had an existing hierarchy, and imported the coordinates for Admin1.
However, when I try to see the map, I get "Form is not complete" all
the time, with no indication of what is lacking (nothing, as far as I
can see).

Also, some more discussion is needed with regard to how to handle the
import of orgunits where there is no match (for example an empty
hierarchy).

Secondly, I think it would be really valuable to also calculate and
store the midpoint for polygons. This would enable us to have to
alternative renderings of a level/layer: Either as a polygon, or as a
(proportional/colored) symbol (placed at the midpoint).

Knut

2010/7/14 Lars Helge Øverland <larshelge@xxxxxxxxx>:
>
> We are in the process of changing the GIS module in terms of how the
> geographical information is persisted and presented.
> In the snapshot version we now store the coordinates in JSON format directly
> in the database on the OrganisationUnit.coordinates property. This gives us
> a lot more flexibility in the way maps are presented.
> Previously maps had to be registered explicitly either in the form of
> GeoJson files or Shapefiles. Then the user had to select a map together with
> indicator and period. Now the user can select an orgunit from a tree and the
> children of that orgunit at the level below will be displayed in the map.
> In large countries in India it is impossible to display a single map at the
> lower levels (eg. for thousands of districts) as the map will be too heavy
> and slow to load. Registering and managing maps for every e.g. provinces
> will also be too cumbersome. With the current solution there is no more work
> of registering and selecting maps - only the one time job of importing
> geographical data/coordinates into the database.
> Importing is a 4 step process:
>
> 1. Convert your shapefiles (or whatever format you have) into GML.
> The recommended tool is FWTools, http://fwtools.maptools.org/ ;. The command
> for converting shapefiles into GML is
> ogr2ogr -F GML output.gml input.shp
> (make sure you stand inside the folder containing the shape files)
> Check available formats with the command ogr2ogr
>
>
> 2. Make sure the XML element inside the GML file which contains the orgunit
> name is called exactly ogr:Name (use search and replace if not), e.g.
> <ogr:Name>Badjia</ogr:Name>
>
> 3. Import the GML file into DHIS through the regular import interface (no
> need to zip it)
>
> 4. In the GIS module, make sure the Administrator - Map Source setting is
> set to DHIS database.
> In the Polygon Layer screen, you can then select the orgunit from the tree
> which appears by clicking on the Parent orgunit field.
>
> Caveat: Shapefiles tend to have duplicate orgunit names, at least at the
> lower levels, which will cause the import to crash as DHIS requires unique
> names. This will have to be taken care of in the GML/shapefile manually for
> now, will see if we can handle this better in the future.
> Feedback on this is appreciated as we hope to release soon. Using the module
> with GeoJson as map source works as before.
>
> Thanks to Jan and Bob for great work on GIS / import so far...
>
> Lars
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>



-- 
Cheers,
Knut Staring



References