dhis2-users team mailing list archive
-
dhis2-users team
-
Mailing list archive
-
Message #16012
Re: Rules for coordinates?
Hi Natalie,
This is currently not supported, but sounds like an excellent feature. It
would be useful if you could file an issue on the issue tracking system (
jira.dhis2.org) and describe the use case in more detail.
Since DHIS2 now requires the use of PostGIS, I think there could be a
couple of work arounds.
1) You might consider to develop a custom JavaScript widget which would
perform this check for you. (https://github.com/d3/d3-geo#geoContains) on
the client.
2) A server side script could probably also check for this quite easily, to
at least identify if any points do not fall inside a given polygon using
the st_contains function of PostGIS. (
https://gis.stackexchange.com/questions/222465/how-to-check-a-set-of-points-are-inside-a-polygon-or-not-in-postgis
)
Regards,
Jason
On Mon, Jun 25, 2018 at 10:43 AM Natalie Tibbels <ntibbel1@xxxxxxx> wrote:
> Hi all,
>
> Is there a way (in 2.28 or 2.29) to set up validation rules (or another
> approach) to ensure that when coordinates are captured or entered for an
> event, they are within the correct country boundaries? Like a min max rule
> for coordinates for example. Since the coordinates are built into the
> system (e.g. not a separate data element or attribute), I’m having trouble
> figuring it out.
>
> Thanks,
>
> Natalie T
> _______________________________________________
> 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
>
--
Jason P. Pickering
email: jason.p.pickering@xxxxxxxxx
tel:+46764147049
References