← Back to team overview

dhis2-devs team mailing list archive

Re: Geojson cannot be verified

 

Hi WHA,

Jan committed a new fix yesterday which exposes the geometries through the
Web API. Latest 2.16 available here
https://apps.dhis2.org/ci/job/dhis-2.16/

Just like in the GIS, Pivot Table and Data vIsualizer modules you can
select OrgUnits in three ways:

1) Select the OUs directly: ou=ou:DxAPPqXvwLy;yu4N82FFeLm
2) Select one or more full levels: ou=ou:LEVEL-2;LEVEL-3
3) Select OU group: ou=ou:OU_GROUP-CXw2yu5fodb

 For 2) and 3) , you can add a specific orgunit as the parent to restrict
the selection, e.g. like this:
https://apps.dhis2.org/demo/api/geoFeatures.json?ou=ou:LEVEL-3;jUb8gELQApl

However, what you get is not fully valid GeoJSON, and we have to do a bit
of tweaking. The full syntax is summarized here:
http://en.wikipedia.org/wiki/GeoJSON

-- 
Knut Staring
Dept. of Informatics, University of Oslo
+4791880522
http://dhis2.org


On Mon, Aug 18, 2014 at 9:14 AM, winhtaik aung <winhtaikaung28@xxxxxxxxxxx>
wrote:

>
> Dear devs,
>
> I got error while i validate geojson on http://geojsonlint.com/
>
> I don't know why it gots error. i get geojson data from
> http://localhost:8082/dhis-web-mapping/getGeoJson.action?ids=IWp9dQGM0bS&ids=OU_GROUP-jblbYwuvO33&callback=Ext.data.JsonP.callback3
>
> Is there any way to get valid geojson from dhis?(to use in leaflet.js )
>
>
>
> Best Regards
> Win Htaik Aung(WHA)
> Contact on Skype winhtaikaung28
>
>
> _______________________________________________
> 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
>
>


-- 
Knut Staring
Dept. of Informatics, University of Oslo
+4791880522
http://dhis2.org

References