I have given two co-ordinate pairs [{long, Lat}, {Long, Lat}] like this i have several co-ordinate pairs.I need to create bounding box with each co-ordinate pair.
Now i have one co-ordinate pair[{Long, Lat}]
I have to find with this one co-ordinate pair whether this intersects any of the bounding box.
Using Nodejs i can do this easily
var bbox = new BoundingBox({ minlat: 48.123, minlon: 16.23, maxlat: 49.012, maxlon: 16.367 })
var bbox2 = new BoundingBox({ lat: 48.5, lon: 16.5 })
console.log(bbox.intersects(bbox2)) // true
But i have to store those co-rdinate pairs in postgis as bounding box and find the intersecting pair alone.
I have gone through certain links but i could not get clear knowledge out of it.