DanielHe4rt / sos-rs

35 stars 8 forks source link

Coordinates Validation #3

Open ijpatricio opened 5 months ago

ijpatricio commented 5 months ago

@DanielHe4rt I think we can do this quire easily, without resorting to complex tools like PostGIS, etc

We can plot a polygon on the map, and get the JSON info about the polygon.

https://www.keene.edu/campus/maps/tool/

image

Next, with user coordinates, we can calculate if that given coordinate is contained or not.

Conclusion: We just need to validate a given request. We will only need more complex tools, if it would be to query multiple records on a database. E.g.: check which "communication records" are in a given polygon etc.

ijpatricio commented 5 months ago

Just added a Coordinates Validator, commit: https://github.com/DanielHe4rt/sos-rs/commit/1609997fd59ce2c041c2ca6bd69d30346fd222d6

These points I considered valid - inside the one on the first post. I think this is enough, based on our conversation. Should we make a fine tuned polygon and points..... Let me know.

image

ijpatricio commented 5 months ago

Ok, this is documented here: https://github.com/DanielHe4rt/sos-rs/blob/main/docs/decisions/001-coordinates-validator.md

Let me know if OK, or if we should use another way (I'll delete the changes)