North/South/East/West coordinate in postgis to use with st_contains

22 Views Asked by At

Im getting boundaries from google map, with north/south/east/west coordinates.

Now I want to find all my points there are within these coordinates.

ST_Contains(
    ST_MakeEnvelope(:west, :south, :east, :north, 4326)
    ST_Transform(mypoints, 4326)
)

Now this doesnt work always.

Fx with

North: 25.784574189277627
West: -34.802203056636074
East: -169.80220305663607
South: -64.78137453669326

Which should give me some results.

enter image description here

0

There are 0 best solutions below