Agensgraph, graph databases, web development and webgis, advice on which way to go?

152 Views Asked by At

More of an advice question here.

I'm well versed in Postgres/PostGIS, so I thought I'd look at Agensgraph aka Apache Graph Extension (AGE). This is a graph implementation in Postgresql which uses SQL for 'read-only' querying, but Cypher for pattern matching (adding/updating etc.).

Usefully this means I can use psycopg2 and python libaries to interact with the graph database. I've added nodes from dictionaries such as {'id': '1', 'name': 'A', 'geometry': 'POLYGON ((10 10, 20 10, 20 20, 15 15, 15 5, 10 10))', 'type': 'Excavation area'} here you can see a geometry column.

With all that working I'm looking to put a web interface on top, this should be able to interact with the data in the usual ways. I've used Django in the past, but it feels a little overkill for this. Further, having geospatial data, I'd need a webgis implementation, one which allows the creation/editing of spatial data.

So, with the above dict I can turn it into a geopandas GeoDataFrame, change it to geojson etc. I can structure generic queries to cope easily with the gathering of data query = "MATCH(n: " + node_type + ") RETURN n". For the example it is a Site polygon node, so I can MATCH all the Sites and return a GeoDataFrame of all site polygons. While handling in Python is handy, I need to make a user interface for non-technical people.

With all this said, I have several questions:

  • Am I storing the geometry in the best way to allow direct editing from a GIS web interface?
  • Given my requirements what is the best framework/implementation to get this 'web ready'?
  • The previous point, but including WebGIS?
  • Any other pointers/suggestions?
1

There are 1 best solutions below

0
Wey Gu On

You could give NebulaGraph a try, it’s an OpenSource GraphDatabase.

It supports Geo-Spatial datatype/indexing, too. The Geo info could be persistent in Vertex/Edge properties.

Ref in docs: