-1

How can I determine if a latitude/longitude fits in a rectangle? This rectangle is built by two GeoPoints (minLat/minLong, maxLat/maxLong).

We could resolve without Solr or ElasticSearch?

Ignasi
  • 5,887
  • 7
  • 45
  • 81
  • 3
    Sounds like simple geometry. – RealSkeptic May 21 '15 at 15:59
  • 1
    Could you give an example? – Ignasi May 21 '15 at 16:00
  • 1
    These questions have answers that will likely be useful: [How to check if a point is inside a rectangle?](http://math.stackexchange.com/questions/190111/how-to-check-if-a-point-is-inside-a-rectangle) and [Finding whether a point lies inside a rectangle or not](http://stackoverflow.com/questions/2752725/finding-whether-a-point-lies-inside-a-rectangle-or-not) – beej May 21 '15 at 16:25
  • Is MySQL involved? If so, do you have a Spatial index? If not, remove it from the tags. – Rick James Jun 05 '15 at 17:41

1 Answers1

0

From your description of how the rectangle is built, it sounds as if you just need to check that your latitude and longitude are within the min/max values

swingMan
  • 732
  • 1
  • 6
  • 17