Hide Geo Location

Good day

If I am saving user locations, and I want to keep those locations completely secure, would it be possible to have the Point be saved in the same way the password saves? In other words, blocked out even to myself?

Just thinking of keeping user locations safe from data breaches.

Do you want to save points so no one can ever see them? Including yourself?

Hi Mark

Firstly, thanks for your prompt reply.

We are actually trying to get the “suburb” that the user is located in, to save to the DB. The exact location is not that important at the moment, so we would just like to remove any possible security issues we would have to worry about.

I guess saving the suburb and leaving the exact GeoLocation point out would do the exact same thing. If you have any guidance on how we could do that, it would be greatly appreciated.

Otherwise, if it is possible to mask the location for everyone, including ourselves. I understand this sounds a bit counter productive.

Hi @Edwin-John_Sands,

Yes, it is possible to transform a user’s exact geolocation into an approximate one, which can help address your concern about security. You can do this by adding a small random offset to the original coordinates or by rounding them to a lower precision. These methods reduce the accuracy of the coordinates, making it harder to determine the user’s exact location.

Since the geolocation is transmitted as a Spatial Point, like POINT(40.7128, -74.0060) (which represents New York City), you can:

  1. Round the coordinates: For example, round the coordinates to whole numbers or to one decimal place, turning POINT(40.7128, -74.0060) into POINT(40.7, -74.0).
  2. Add a random offset: Introduce a small random offset to both coordinates. For instance, add a random value within 0.01 degrees to the latitude and longitude. This would change a point like POINT(40.7128, -74.0060) to POINT(40.7131, -74.0055).

These methods allow you to store the suburb or general area without saving the exact GeoLocation point, thus addressing the security concerns you mentioned.

Regards,
Stanislaw

Thanks! Your support is amazing :clap:

1 Like