I've done quite a few google searches, but haven't managed to find anything that has helped me directly. I've got a few features in a PostGIS table with a geography column. The features are focused around (latitude, longitude) 0, 100 and 1, 101 (those are literally the points for any POINTS or LINESTRINGS in that column).
I'm making a query like this:
SELECT GUID, ATTRS, ST_AsGML(GEOG), ACTIVE, CREATED, FTIME
FROM FEATURES
WHERE GEOG && ST_MakeEnvelope(99, -3, 103, 3, 4326)
AND ACTIVE = TRUE ORDER BY CREATED DESC LIMIT 100
And it returns all the data
If I change the query to be much larger, then nothing comes back:
SELECT GUID, ATTRS, ST_AsGML(GEOG), ACTIVE, CREATED, FTIME
FROM FEATURES
WHERE GEOG && ST_MakeEnvelope(-75, -80, 110, 3, 4326)
AND ACTIVE = TRUE ORDER BY CREATED DESC LIMIT 100
So is there a limit I'm hitting somewhere here I don't know about it?
If I change the query to this:
SELECT GUID, ATTRS, ST_AsGML(GEOG), ACTIVE, CREATED, FTIME
FROM FEATURES
WHERE GEOG && ST_MakeEnvelope(-70, -80, 109, 3, 4326)
AND ACTIVE = TRUE ORDER BY CREATED DESC LIMIT 100
I still get all my data back!
EDIT
Added the ST_AsEWKT(GEOG) as requested:
select ST_AsEWKT(GEOG) from features;
st_asewkt
-----------------------------------
SRID=4326;POINT(100 0)
SRID=4326;POINT(100 0)
SRID=4326;POINT(100 0)
SRID=4326;POINT(100 0)
SRID=4326;POINT(100 0)
SRID=4326;POINT(100 0)
SRID=4326;POINT(100 0)
SRID=4326;LINESTRING(100 0,101 1)
SRID=4326;POINT(100 0)
SRID=4326;POINT(100 0)
SRID=4326;LINESTRING(100 0,101 1)
SRID=4326;LINESTRING(100 0,101 1)
SRID=4326;LINESTRING(100 0,101 1)
SRID=4326;LINESTRING(100 0,101 1)
SRID=4326;LINESTRING(100 0,101 1)
SRID=4326;LINESTRING(100 0,101 1)
SRID=4326;POINT(100 0)
SRID=4326;POINT(100 0)