Postgres is the DB of choice due to its spatial indexing goodness (top-k-closest-points) using PostGIS or other gists. Looks like Node.js ORMs do not directly support spatial indexing, so which one requires the least amount of hacking for this? Sequelize and node-orm-2 seem to demand some hacking to get it working. Any suggestions?
Asked
Active
Viewed 1,259 times
1 Answers
2
As of sequelize 3.4.0, Geometry support has been added for postgres. You can use the GEOMETRY datatype in the model definition:
sequelize.define("point", {
geom: DataTypes.GEOMETRY
});

Evan Siroky
- 9,040
- 6
- 54
- 73
-
But no support for box or extent https://sequelize.org/docs/v6/other-topics/other-data-types/#miscellaneous-datatypes – jcollum Mar 10 '23 at 00:08