ST_WITHIN is not giving results, always return zero records.
here is the example:
select *
FROM Areas a
WHERE ST_WITHIN({'type': 'Point', 'coordinates':[31.9, -4.8]}, a.location)
Expecting above query should return one record.
my database entries are
{
"id": "MyDesignatedLocation",
"location": {
"type": "Polygon",
"coordinates": [
[
[
31.8,
-5
],
[
32,
-5
],
[
32,
-4.7
],
[
31.8,
-4.7
],
[
31.8,
-5
]
]
]
}
}