Spatial Module

Last modified by Vincent Massol on 2024/11/19 16:12

 XWiki
 Feature
 Dormant
 

Description

Summary
The spatial module objective is to bring storage, indexing and querying facilities for geometry objects in XWiki.

Use cases

  • UC1: It should be possible to create XWiki applications that declare geometric objects fields in its XClass(es). Such geometric objects could be : coordinates (or point, or LatLon), shapes, polygons.
  • UC2: It should be possible to perform geometric operations and queries on those fields, such as computing distance, querying intersection, etc.

Implementation ideas

XClass/geo data mapping strategy

  • Strategy A: One geometry field common for all objects. Property instances with values such as POINT(10 70), POLYGON((-10 30, -40 40, -10 -20, 40 20, 0 0, -10 30)), etc.
    • Pros:
      • Generic, supports all objects upstart
    • Cons:
      • Not easy/possible to have a generic displayer/picker.
      • Object type restrictions have to be implemented at the application level.
      • InformationIdea: maybe have a field configuration select list (multivalued) that allows to restrict which objects are allowed (same as NumberClass with "integer", "long", etc.).
  • Strategy B: One geometry field per object : point, polygon, circle, etc.
    • Pros:
      • Isolated displayers/pickers
      • Easier for application developers to restrict to one type of object
    • Cons:
      • Must declare all object types possible as meta classes
      • Probably too much different object types, will clutter the field type picker in the class editor

Underlying implementation

Storage

Hibernate spatial. See http://www.hibernatespatial.org/

Note: hibernate spatial is integrated in hibernate ORM starting in 4.x.

Search

The idea here is to use Solr Spatial Search module. See http://wiki.apache.org/solr/SolrAdaptersForLuceneSpatial4

Related thread : http://xwiki.markmail.org/thread/gy6qtgtl2bfbosoa

Current status

Some work started at: https://github.com/xwiki-contrib/module-spatial and https://github.com/jvelo/xwiki-platform/tree/feature-spatial

Q&A

Q: Does this relate anyhow to SVG and SVG Macro?
A: 


 


Get Connected