Neo4jSpatial
Craig Taverner
Neo Technology
#neo4j
@craigtaverner
craig@amanzi.com
Web Map Data with Neo4j-Spatial
and OpenStreetMap
Where are the Mushrooms?
Where are the Mushrooms?
Social Network
(Network) Impact Analysis
Logistics & Routing
Route Finding
Recommendations
Access Control
Fraud Analysis
What is a graph,
anyway?
A Graph
Vertex
Edge
A Graph
Node
Relationship
Property Graph Data Model
Nodes
Relationships
Relationships
Labels
Graph Building Blocks
●
Nodes
●
entities
●
Relationships
●
connect entities and structure domain
●
Properties
●
attributes and metadata
●
Labels
●
entities roles and grouping
What is Neo4j
Spatial?
Neo4j Spatial 2010
●
GSoC 2010
●
Core
●
Storage, GeometryEncoder
●
Search/RTree, Operations
●
I/O (Shapefile)
●
Extensions
●
Geotools Datastore
●
GeoServer & uDig
●
Ruby API
●
neo4j-spatial.rb (Rubygem)
●
OpenStreetMap
●
Import OSM, Dynamic Layers (JSON & CQL)
●
Export Shapefiles, and SLD styled PNG
Neo4j OSM in uDig
OpenStreetMap
OpenStreetMap
OpenStreetMap
OpenStreetMap
OSM
RTree
namic
ayers
Dynamic
Layers
Routing on OSM
Neo4j-Spatial 2011
●
OSM
●
Performance
●
Changesets and Users
●
Geoprocessing
●
LBS and SimplePointLayer
●
Routing OSM
●
GSoC 2011 – Geoprocessing functions
●
Data Mining OSM
●
What's next
●
Geoprocessing pipeline
●
Cool domains: artistic maps
Finding things close to other things
http://blog.neo4j.org/2011/03/neo4j-spatial-part1-finding-things.html
Finding things close to other things
http://blog.neo4j.org/2011/03/neo4j-spatial-part1-finding-things.html
Routing with OSM
Data Mining OSM
timestamp > 1207014810000 and timestamp < 1208310810000 and
(
user = 'Zenon' or user = 'tomasCY' or user = 'muffu' or
user = 'dcp' or user = 'cartOMike' or user = 'djanda' or
user = 'Peter14' or user = 'toaster' or user = 'user_7363' or
user = 'lyx'
)
Artistic Maps
Artistic Maps
Artistic Maps
Cellular Network Topology
Cellular Network Topology
ID Site Latitude Longitude
1 ABC 55.678 12.567
2 XYZ 55.890 12.123
3 PRQ 55.543 12.890
ID Sector SiteID Azimuth Beamwidth
1 1 1 0 100
2 2 1 120 100
3 3 1 240 100
4 1 2 0 90
5 2 2 120 110
6 3 2 240 90
7 1 3 0 180
8 2 3 180 180
O(N)
O(ln(N))
O(1)
What's next?
Spatial Cypher!
Spatial Cypher GSoC Demo
What is Cypher?
sel ect skills.name
f rom users j oi n user_skills on (...) j oi n skills on (...)
where users.name = “Michael“
Consider SQL:
Cypher is for graph querying!
MATCH (me:User {name:'Michael'})-[:HAS_SKILL]->(skill)
RETURN skill.name
Cypher is for graph querying!
MATCH (me:Person {name:'Andreas'})-[:FRIEND]->(friend)
-[:FRIEND]->(friend2)
RETURN friend2
Point Index
Search within polygon
Search within polygon
Index polygons?
Questions?

Neo4j Spatial - FooCafe September 2015

Editor's Notes

  • #2 The purpose of this presentation is to introduce Neo4j Spatial, and two specific projects, the GSoC and OSM Mention Neo Technologies and AmanziTel, but no more We have a product in the market that uses uDig and Neo4j, but felt that our integration was too specific to our needs, and so decided to collaborate with Neo Technologies to produce a more generalized library available as an extension to the database
  • #24 Storage: plugable – dataset, layer, encoder Search: Indexing is currently an R-Tree, but it is possible to plug in any custom mechanism conforming to the interface. Multi-dimensional index Spatial indices (quad-tree, R-tree, kn-tree, SFCs) Composite indices and dynamic indices Lucene