← Back to team overview

dhis2-devs team mailing list archive

Re: DHIS2 - Validations on GPS coordinates

 

Hi

The majority of e.g. health districts in the world would have a relatively
compact shape - this is largely determined by the logistics of
administrating such entities. Which also mean that a validation rule
representing a rectangular boundary box around such entities in most cases
will have an area only 30-60% larger than the area of the entity itself.
It's only the long and narrow diagonally oriented entities that don't fit
inside a rectangular box reasonably well.

So the relatively simple validation method of using these boundary lat/long
co-ordinates is likely to pick up many of the most typical data entry
mistakes: lat/long swapped around, putting a minus in front of the wrong
co-ordinates (if in the southern hemisphere, all latitudes are negatives),
and so on.

Using what is basically a GIS point-in-polygon procedure will pick up a few
more mistakes, but it is a more complicated and timeconsuming process. My
experience during the last 25 years of working with spatial data indicates
that those will be few, though, because you will typically NOT pick up the
other main group of errors: errors caused by using the wrong datum or
projection; errors caused by incorrect conversion of degree-minutes-seconds
format into decimal degrees, and similar. This group of common errors
normally result in positions being 100 metres to 30 km off the true
position, so most of those will still fall within your "district" polygon.

In general, I prefer to verify entered co-ordinates using different methods:
- put the points on top of good quality base maps and use visual
verification (on screen or on paper)
- compare co-ordinates with other data sets available for e.g. towns
(openstreetmap and our sources are good for this)
- compare co-ordinates with other point data sets for e.g. health
facilities.
Such comparisons can be visual OR using GIS-based adjacency analysis. So if
you have a residential location for e.g. a patient reporting at hospital A,
and that location is 300km away from the residence - well, then you know
it's fishy and you can zoom in and cross-verify with street address or
other textual location info.

Best regards
Calle




On 16 March 2015 at 11:55, Abyot Gizaw <abyota@xxxxxxxxx> wrote:

> By general validation I mean:
>
> latitude = [-90, 90]
> longitude = [-180, 180]
>
> To see Google maps, you need to use the latest trunk, which Jason
> suggested.
>
>
> ---
> Thank you,
> Abyot.
>
> On Mon, Mar 16, 2015 at 10:52 AM, Jason Pickering <
> jason.p.pickering@xxxxxxxxx> wrote:
>
>> Hi Robin,
>>
>> I think what Abyot means is that general validation would be something
>> like saying that you could setup a bounding box for the area which you know
>> you are going to receive coordinates. For instance, if the countries
>> latitude is between -18 and -25 degrees, you could setup a rule to ensure
>> that the coordinates are between these values. However, what you suggest is
>> much more sophisticated, i.e. spatial validation based on the position
>> within the orgunit hierarchy. This is not supported and would certainly
>> need some development or a custom app to support this.
>>
>> You may need to look here
>>
>> https://apps.dhis2.org/dev/
>>
>> which is the latest version of "trunk" while the normal demo site is the
>> latest version of the current stable release.
>>
>> Best regards,
>> Jason
>>
>>
>> On Mon, Mar 16, 2015 at 10:48 AM, Robin Martens <martens@xxxxxxx> wrote:
>>
>>>  Hi Abyot,
>>>
>>>
>>>
>>> What do you mean with the “general validation of latitude and longitude”?
>>>
>>>
>>>
>>> Using google maps would be great. However, I didn’t find it on the Event
>>> Capture app on the demo server. How do you access it?
>>>
>>>
>>>
>>> Regards,
>>>
>>>
>>>
>>> Robin
>>>
>>>
>>>
>>> *From:* Abyot Gizaw [mailto:abyota@xxxxxxxxx]
>>> *Sent:* 16 March 2015 11:38
>>> *To:* Robin Martens
>>> *Cc:* DHIS 2 Users list; dhis2-devs
>>> *Subject:* Re: [Dhis2-devs] DHIS2 - Validations on GPS coordinates
>>>
>>>
>>>
>>> Hi Robin,
>>>
>>>
>>>
>>> No, it is not possible to define specific validation on coordinates
>>> except the general validation of latitude and longitude.
>>>
>>>
>>>
>>> However, if you look at the latest Event Capture app, it is possible to
>>> capture coordinates from Google map. The app also allows to zoom-in/out
>>> based on polygons and points defined for orgunits.
>>>
>>>
>>>
>>>
>>> ---
>>>
>>> Thank you,
>>>
>>> Abyot.
>>>
>>>
>>>
>>> On Mon, Mar 16, 2015 at 10:22 AM, Robin Martens <martens@xxxxxxx> wrote:
>>>
>>> Hi all,
>>>
>>>
>>>
>>> Does anyone know if it is possible to set validation rules on GPS
>>> coordinates in the event capture module?
>>>
>>>
>>>
>>> Ideally, coordinates would be within the polygon of the organization
>>> unit the event is linked to (a country or district in this case). Else,
>>> just min-max values could already work to limit the possibility of errors.
>>>
>>>
>>>
>>> Thanks,
>>>
>>>
>>>
>>> Robin
>>>
>>>
>>>
>>> *From:* Dhis2-users [mailto:dhis2-users-bounces+martens=
>>> sher.be@xxxxxxxxxxxxxxxxxxx] *On Behalf Of *Ngoc Thanh Nguyen
>>> *Sent:* 15 March 2015 20:29
>>> *To:* DHIS 2 Users list; dhis2-devs
>>> *Subject:* [Dhis2-users] Morbidity and mortality program in demo dhis2
>>> site
>>>
>>>
>>>
>>> Hi all,
>>>
>>>
>>>
>>> I would like to buid a system for Morbidity and mortality in Vietnam. I
>>> think the one deployed on the demo site is similar to what we plan to have
>>> though it may go a bit further, i.e. multiple events with registration
>>> (tracking a patient throughout their admission history) rather than single
>>> event without registration.
>>>
>>>
>>>
>>> Could anyone who were involved in this implementation share some lessons?
>>>
>>>
>>>
>>> Thanks
>>>
>>> Thanh
>>>
>>>
>>> _______________________________________________
>>> 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
>>>
>>>
>>>
>>> _______________________________________________
>>> 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
>>>
>>>
>>
>>
>> --
>> Jason P. Pickering
>> email: jason.p.pickering@xxxxxxxxx
>> tel:+46764147049
>>
>
>
> _______________________________________________
> 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
>
>


-- 

*******************************************

Calle Hedberg

46D Alma Road, 7700 Rosebank, SOUTH AFRICA

Tel/fax (home): +27-21-685-6472

Cell: +27-82-853-5352

Iridium SatPhone: +8816-315-19274

Email: calle.hedberg@xxxxxxxxx

Skype: calle_hedberg

*******************************************

References