OrbisData is a library that offers a unique access point to query, manage and retrieve data dedicated to Groovy scripting.
It is based on Groovy specific syntax and aims to provide an elegant and fluent framework to work with geospatial data.
OrbisData need at least Java 11 to work.
OrbisData is organized around two modules : Data and Process.
The Data module are dedicated to the creation, the access and the
requesting of databases.
Currently, two spatial database are supported H2/H2GIS
and Postgresql/Postgis
.
It provides also a module to manage dataframe as R language proposes, thanks to the Smile (Statistical Machine Intelligence and Learning Engine) library (https://haifengl.github.io/).
The Process module are dedicated to the creation of processes with the definition of the in/output. Processes can be executed with input values and can also be chained.
To add OrbisData to a Maven project, add the nexus repository to the pom :
...
<repositories>
<repository>
<id>orbisgis-release</id>
<url>https://oss.sonatype.org/content/repositories/releases/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</repository>
<repository>
<id>orbisgis-snapshot</id>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>false</enabled>
</releases>
</repository>
</repositories>
...
and add the desired module :
...
<build>
...
<plugins>
...
<plugin>
<groupId>org.orbisgis</groupId>
<artifactId>data</artifactId>
<version>2.1.1</version>
</plugin>
...
</plugins>
...
</build>
...
Using Grab annotation :
@Grab(group='org.orbisgis.data', module='h2gis', version='2.1.1')
@Grab(group='org.orbisgis.data', module='postgis', version='2.1.1')
OrbisData encapsulates rows,columns from a database to a table or spatial table.
The following code shows how to get the column names from an H2GIS table.
def h2GIS = H2GIS.open('/tmp/myh2gis_db')
println h2GIS.getTable("myTableName").columns
The next code shows how to iterate over the geometry stored in a table and apply a buffer on them. the_geom refers to the column name and the object returned is a JTS geometry object (https://github.com/locationtech/jts).
def h2GIS = H2GIS.open('/tmp/myh2gis_db')
h2GIS.getSpatialTable("myTableName").each(it ->
println it.the_geom.buffer(10)
)
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests.
This project is licensed under the LGPL v3 License - see the LICENSE.md file for details
OrbisData has been developed within the following frameworks :
-
PAENDORA (Planification, Adaptation et Energie des DOnnées territoriales et Accompagnement, 2017-2020), ADEME Programme: MODEVAL-URBA 2017
-
URCLIM (URban CLIMate services, 2017-2020), JPI Climate Programme
-
ANR CENSE (Caractérisation des environnements sonores urbains : vers une approche globale associant données libres, mesures et modélisations, 2016 -2020)