Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# 1) Build every commit on every branch and add the COMMIT SHORT SHA as suffix
maven-build:
stage: build
script:
- export MAVEN_OPTS='-Xmx128m'
- mvn clean package
artifacts:
paths:
- target/*.jar
name: ${CI_PROJECT_NAME}-${CI_COMMIT_SHORT_SHA}

# 2) Copies SNAPSHOT builds on 'master' and 'dm4' branch into download.dmx.systems/ci/ directory
copy-to-ci:
stage: deploy
script:
- CIDIR='/var/www/download.dmx.systems/ci'
- DESTDIR="${CIDIR}/${CI_PROJECT_NAME}"
- JARFILE="$( basename $( ls target/*.jar | tail -n1) )"
- NUNC="$( date +%F )"
- DESTJARFILE="$( basename ${JARFILE} .jar )_${NUNC}_${CI_PIPELINE_ID}.jar"
- if [ ! -d ${DESTDIR} ]; then mkdir ${DESTDIR}; fi
- cp target/${JARFILE} ${DESTDIR}/${DESTJARFILE}
- ln -sf ${DESTDIR}/${DESTJARFILE} ${DESTDIR}/${CI_PROJECT_NAME}-latest.jar
dependencies:
- maven-build
only:
- master
- dm4

# 3) Copies tagged RELEASE builds into download.dmx.systems/plugins/ directory
copy-to-release:
stage: deploy
script:
- RELEASEDIR='/var/www/download.dmx.systems/plugins'
- DESTDIR="${RELEASEDIR}/${CI_PROJECT_NAME}"
- JARFILE="$( basename $( ls target/*.jar | tail -n1) )"
- if [ ! -d ${DESTDIR} ]; then mkdir ${DESTDIR}; fi
- cp target/${JARFILE} ${DESTDIR}/
dependencies:
- maven-build
only:
- tags
619 changes: 619 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

64 changes: 49 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,51 @@

DeepaMehta 4 Geospatial
DMX Geospatial
=======================

A DeepaMehta 4 plugin that provides geospatial "Within Distance" queries.
A DMX plugin that provides geospatial "Within Distance" queries.

DeepaMehta 4 is a platform for collaboration and knowledge management.
<https://github.com/jri/deepamehta>
DMX is a platform for collaboration and knowledge management.
<https://git.dmx.sytems/dmx-platform/dmx-platform>


API
---

Java API:
Java API (Within Distance Example):

List<Topic> getTopicsWithinDistance(GeoCoordinate geoCoord, double maxDistanceInKm)

Returned is a list of Geo Coordinate topics (as defined in the Geomaps plugin).

REST API:
Java API (Query Shapefile Properties by Geo Coordinates):

Object `getGeometryFeatureValueByCoordinate(String coordinates, String key)`

REST API (Within Distance Example):

GET /geospatial/<lon>,<lat>/distance/<km>

The response is an array of Geo Coordinate topics.

If you want include the Geo Coordinate topic's Longitude and Latitude child topics in the result as well append `?include_childs=true` to the request.
If you want include the Geo Coordinate topic's Longitude and Latitude child topics in the result as well append `?include_children=true` to the request.

REST API Get Feature Name:

`/feature/{latlng}`

The response is the `Name` property of the geometry's `Feature` in which a given coordinate pair (WGS-84) is located (using neo4j-spatial shapefile).




Example
-------
Example (Within Distance)
-------------------------

Java API:

import de.deepamehta.plugins.geospatial.GeospatialService;
import de.deepamehta.plugins.geomaps.GeomapsService;
import de.deepamehta.plugins.geomaps.model.GeoCoordinate;
import systems.dmx.geospatial.GeospatialService;
import systems.dmx.geomaps.GeomapsService;
import systems.dmx.geomaps.model.GeoCoordinate;

GeospatialService geospatialService;
GeomapsService geomapsService;
Expand All @@ -49,6 +61,18 @@ Java API:
Version History
---------------

**0.5** -- Upcoming

* Compatible with DMX 5.0 API
* No support for database upgrades for geometry layers in deepamehta-db's (need to re-index)
* Released under the AGPL-3.0 License

**0.4** -- Mar 30, 2018

* Inroduced shapefile-layer capabilities
* Extended service to query shapefile for key, values by geo coordinate
* Compatible with DeepaMehta 4.9.x

**0.3** -- Aug 05, 2016

* Compatible with DeepaMehta 4.8
Expand All @@ -71,6 +95,16 @@ Note: This release is not compatible with one of the previous releases. If you h
* Based on Neo4j Spatial
* Compatible with DeepaMehta 4.4-SNAPSHOT

------------
Jörg Richter & Malte Reißig<br/>
Aug 05, 2016
Licensing
---------

DMX Geospatial software is available freely under the GNU Affero General Public License, version 3.

All third party components incorporated into the DMX Geospatial Software are licensed under the original license provided by the owner of the applicable component.


Copyright
---------
Copyright (C) 2016 Jörg Richter<br/>
Copyright (C) 2017-2018 Malte Reißig<br/>
Copyright (C) 2019 DMX Systems<br/>
94 changes: 73 additions & 21 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,30 @@

<modelVersion>4.0.0</modelVersion>

<name>DeepaMehta 4 Geospatial</name>
<groupId>de.deepamehta</groupId>
<artifactId>dm48-geospatial</artifactId>
<version>0.3</version>
<name>DMX Geospatial</name>
<groupId>systems.dmx</groupId>
<artifactId>dmx-geospatial</artifactId>
<version>0.5.0-SNAPSHOT</version>

<packaging>bundle</packaging>

<parent>
<groupId>de.deepamehta</groupId>
<artifactId>deepamehta-plugin</artifactId>
<version>4.8</version>
<groupId>systems.dmx</groupId>
<artifactId>dmx-plugin</artifactId>
<version>5.0.1-SNAPSHOT</version>
</parent>

<dependencies>
<dependency>
<groupId>de.deepamehta</groupId>
<artifactId>deepamehta-geomaps</artifactId>
<version>4.8</version>
<groupId>systems.dmx</groupId>
<artifactId>dmx-geomaps</artifactId>
<version>0.2.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>de.deepamehta</groupId>
<artifactId>deepamehta-accesscontrol</artifactId>
<version>4.8</version>
<groupId>systems.dmx</groupId>
<artifactId>dmx-accesscontrol</artifactId>
<version>5.0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<!-- Neo4j -->
Expand Down Expand Up @@ -54,7 +55,11 @@
<groupId>org.geotools</groupId>
<artifactId>gt-api</artifactId>
<version>8.0</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-shapefile</artifactId>
<version>8.0</version>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
Expand Down Expand Up @@ -106,6 +111,51 @@
<version>1.0</version>
<scope>provided</scope>
</dependency>
<!-- From here one are all just gt-shapefile dependencies -->
<dependency>
<groupId>org.jdom</groupId>
<artifactId>jdom</artifactId>
<version>1.1</version>
<scope>runtime</scope>
</dependency>
<!-- Excluded: jdom dependency oracle.xml.parsers-->
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-data</artifactId>
<version>8.0</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-main</artifactId>
<version>8.0</version>
<scope>runtime</scope>
</dependency>
<!-- Excluded junit.framework dependency -->
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-cql</artifactId>
<version>8.0</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-geojson</artifactId>
<version>8.0</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.geotools.xsd</groupId>
<artifactId>gt-xsd-kml</artifactId>
<version>8.0</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-wms</artifactId>
<version>8.0</version>
<scope>runtime</scope>
</dependency>
</dependencies>

<repositories>
Expand All @@ -130,26 +180,28 @@
<artifactId>maven-bundle-plugin</artifactId>
<configuration>
<instructions>
<Bundle-SymbolicName>de.deepamehta.geospatial</Bundle-SymbolicName>
<Bundle-Activator>
de.deepamehta.plugins.geospatial.GeospatialPlugin
systems.dmx.geospatial.GeospatialPlugin
</Bundle-Activator>
<Import-Package>
org.neo4j.graphdb, org.neo4j.graphdb.traversal, org.neo4j.kernel, !org.neo4j.*,
!com.tinkerpop.blueprints.*,
!com.tinkerpop.blueprints.*, !oracle.xml.*,
!org.geotools.*, !org.json.simple.*,
!au.com.objectix.jgridshift,
!au.com.objectix.jgridshift, !junit.framework.*,
!groovy.lang, !org.codehaus.groovy.*, !jline,
!org.apache.commons.collections, !org.apache.commons.pool.*, !org.apache.commons.logging.*,
!org.apache.commons.httpclient.*,
!org.apache.commons.lang,
!org.apache.log4j,
!org.apache.xerces.*,
!org.jaxen.*, !org.picocontainer.*,
!javax.vecmath, !javax.media.jai.*, !javax.transaction.*, *
</Import-Package>
<Embed-Dependency>
neo4j-spatial, neo4j-graph-collections,
gt-api, gt-opengis, gt-metadata, gt-referencing,
jts, jscience,
gremlin-java, gremlin-groovy, pipes
gt-api, gt-opengis, gt-metadata, gt-referencing, jdom,
jts, jscience, gt-shapefile, gt-data, gt-main, gt-cql,
gt-xsd-kml, gt-wms, gt-geojson, gremlin-java, gremlin-groovy, pipes
</Embed-Dependency>
</instructions>
</configuration>
Expand Down
Loading