I'm using sequelize and postgis, and I have a table device with a column coord with type GEOMETRY('POINT').
when an insert a new device, in my columns coord value I use this:
coord = { type: 'Point', coordinates: [lng,lat], crs: { type: 'name', properties: { name: 'EPSG:3857'}} }
and it's ok for now.
Next, I need to find all devices in an area limited by a polygon
example in pseudo-code:
device coord is (lng1, lat1)
my poligon is [lng2 lat2, lng3 lat3, lng4 lat4, ...]
how can I do this query using sequelize?
sequelize 4.41.0 node v9.4.0