Friday 22 January 2016

Node ORMs and Geo-Spatial Data?

I'm relatively new to node and I'm having a hard time finding packages that might be able to assist me with the geo spatial app I'm making.I have a need to store Geometry in a PostgreSQL/PostGIS database - Points, Polygons, Multipolygons, etc. I have not been able to find an ORM that gracefully, or at all, handles geometry. From what I see from Googling, the few example projects that say they interface with PostGIS drop into the raw SQL query of Knex and write raw SQL into the databse. This isn't an option for me.== What I've looked at ==Bookshelf.js - No out of the box support for Geometry. I could install the bookshelf-json-columns specify the geometry columns as JSON and store the shapes as GeoJSON maybe. This would be more of a work around than anything. I'm also wary of how new this plugin is and what kind of support it would have in the future.Sequelize.js - The official documentation doesn't mention anything about supporting geometry but then the several GitHub pages make mentions that the changelog shows that they added Geometry support for postgres in 3.4.0. I popped into their IRC for some help but didn't make much headway. The fact that there's a disconnect between the documentation and what it supports makes me uncomfortable. Since I'm new I would hope to see some documentation to get me to starting point in how to implement the Models appropriately for geometry.Has anyone encountered a need for Geometry with PostGIS in Node before? Does anyone have a suggestion for a good ORM that you might be able to point me ?

Submitted January 22, 2016 at 06:05PM by PensiveLionTurtle

No comments:

Post a Comment