Rules for coordinates?

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.


Natalie T

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 ( 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. ( 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. (




Jason P. Pickering