I need to get all points within a box to display them in a flat map. The column in the database is a geographic point. I'm using the following query:
SELECT * FROM asset a WHERE a.point::geometry && ST_MakeEnvelope(28.715242, -96.730798, 30.684093, -94.559248, 4326)
I have the following points already stored in the asset table.
SRID=4326;POINT(-95.9681015014648 29.8167991638184) SRID=4326;POINT(-95.3429565429688 29.6000289916992) SRID=4326;POINT(-94.9028167724609 29.3941402435303) SRID=4326;POINT(-95.5656051635742 29.7831516265869) SRID=4326;POINT(-95.385986328125 29.5799331665039) SRID=4326;POINT(-93.7581100463867 29.4718837738037)
It won't give an error. There are records inside that box, but it just simply won't return any records.