Aspects are behaviors that can be configured above the ontologies concept, their main goal is to optimize the data to enforce their potential.
We wanted at first restructure some ontologies to add specific behavior depending on class inheritance but since ontologies are standard we are not in a position to modifiy them by any means, that is how we came with the aspect idea.
Still, aspects could have been hardcoded into Ziggy in order to optimize some ontologies but we wanted the optimisations to be configurable in a declarative way.
There is currently two available type of aspect :
TimeSeries : Each time a datatype property is updated for a projection its data is stored into an InfluxDB Time Series which enable TimeSeries request type (mean, avg over a given period of time) onto the projection datatype property
GeoSpatial : Enhance a datatype property designed to store geo spatial data and make it available for specific geospatial operator
To store GeoSpatial data we rely on GeoJson (You may find the reference here : http://geojson.org/ ). Note that there is some schenanigans about the way we manipulate GeoJson data, the semantic world don't know what JSON is so we store those as string in Turtle. Soon enough we will make it fully transparent to you in JSON, it's in the planning.
Right now you need to escape the Geo Json payload as a String as such :
Accepted :
sens-obs:point_C1692
a wgs84:Point ;
wgs84:alt "1995"^^xsd:float ;
wgs84:lat "41.6570"^^xsd:float ;
wgs84:long "-78.900"^^xsd:float ;
<http://www.opengis.net/gml/pos/linestring> "{\"type\": \"LineString\",\"coordinates\": [[-1.6281831, 41.6570], [-1.6296897, 48.1262971], [-1.6281831, 48.126252]]}"^^xsd:string .
Rejected:
sens-obs:point_C1692
a wgs84:Point ;
wgs84:alt "1995"^^xsd:float ;
wgs84:lat "41.6570"^^xsd:float ;
wgs84:long "-78.900"^^xsd:float ;
<http://www.opengis.net/gml/pos/linestring> "{"type": "LineString","coordinates": [[-1.6281831, 41.6570], [-1.6296897, 48.1262971], [-1.6281831, 48.126252]]}"^^xsd:string .
About the coordinates order : in the coordinates array its [ 'longitude, latitude ]
This is an important thing to notice as some services e.g. Google Maps use the [ latitude, 'longitude ] convention.
By default there is three datatype property which are designed to store GeoJson data into Ziggy:
A datatype property enhanced with a Geo Spatial aspect must be specialized toward either:
The last three ones (MULTIPOINT, MULTILINESTRING, MULTIPOLYGON) will be available later, sorry again ¯_(ツ)_/¯ (one day people will think we're canadians).
You MUST specialize the datatype property into one specific type because there is no generic spatial index available into OrientDB, at least at this moment.
All the details regarding the query language features related to geolocation are given in https://wiki.thinginthefuture.com/en/public/Avatars_search -> Geospatial operators.