Issues saving GIS coordinates of org units via API

A simple way to check this out, would be to go /api/organisationUnits/uYswH7612T9 after the metadata post, and then go to same location after you saved in DHIS… and see if there is any difference (you might want to add ?fields=:owner to filter things out)

···


Morten

On Fri, Apr 10, 2015 at 1:49 PM, Mahendra Kariya mahendra.kariya@thoughtworks.com wrote:

Hi,

We are POSTing the following payload to /api/metadata. If we go and check the coordinates on org unit form in DHIS, they are coming up correctly. But when we try to plot these org units on GIS, they are not getting plotted.

However, if we save the org units (without making any changes) on DHIS, we are able to see them on GIS.

Are we passing incomplete information in the payload?

{

“organisationUnits”: [

{
  "name": "OpUnit1",
  "openingDate": "12-12-2014",
  "id": "uYswH7612T9",
  "shortName": "OpUnit1",
  "level": 5,
  "parent": {
    "name": "Parent",
    "id": "YtswH7ko2T9"
  },
  "attributeValues": [],
  "coordinates": "[25,50]"
}

]

}

Did you include

"featureType":"Point" ?

Regards,
Jason

···

On Fri, Apr 10, 2015 at 8:52 AM, Morten Olav Hansen mortenoh@gmail.com wrote:

A simple way to check this out, would be to go /api/organisationUnits/uYswH7612T9 after the metadata post, and then go to same location after you saved in DHIS… and see if there is any difference (you might want to add ?fields=:owner to filter things out)


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp


Morten

On Fri, Apr 10, 2015 at 1:49 PM, Mahendra Kariya mahendra.kariya@thoughtworks.com wrote:

Hi,

We are POSTing the following payload to /api/metadata. If we go and check the coordinates on org unit form in DHIS, they are coming up correctly. But when we try to plot these org units on GIS, they are not getting plotted.

However, if we save the org units (without making any changes) on DHIS, we are able to see them on GIS.

Are we passing incomplete information in the payload?

{

“organisationUnits”: [

{
  "name": "OpUnit1",
  "openingDate": "12-12-2014",
  "id": "uYswH7612T9",
  "shortName": "OpUnit1",
  "level": 5,
  "parent": {
    "name": "Parent",
    "id": "YtswH7ko2T9"
  },
  "attributeValues": [],
  "coordinates": "[25,50]"
}

]

}

Jason P. Pickering
email: jason.p.pickering@gmail.com
tel:+46764147049