This fork of the Esri Geometry API for Java exists in order to run the geo-grpc geometry-operators-service.
The Esri Geometry API for Java can be used to enable spatial data processing in 3rd-party data-processing solutions. Developers of custom MapReduce-based applications for Hadoop can use this API for spatial processing of data in the Hadoop system. The API is also used by the Hive UDF’s and could be used by developers building geometry functions for 3rd-party applications such as Cassandra, HBase, Storm and many other Java-based “big data” applications.
- API methods to create simple geometries directly with the API, or by importing from supported formats: JSON, WKT, WKB, and Shape
- API methods for spatial operations: union, difference, intersect, clip, cut, and buffer
- API methods for topological relationship tests: equals, within, contains, crosses, and touches
This library depends on the JNI enabled Proj.4 repo maintained here. You must build the JNI version of Proj.4 before you can build and run this geometry library locally. After building Proj.4 you can build the jars by using the gradle script:
./gradlew build install
As of right now I've only debugged this library using Intellij. The .idea file is included in the repo, so if you'd like you can call /usr/local/bin/idea .idea
to open up the project. You might have to go into your preferences Build, Execution, Deployment
-> Build Tools
-> Gradle
-> Runner
and for the "Run Tests using" drop down select Gradle Test Runner
To compile the protobuf code you'll need to follow the below instructions https://github.com/grpc/grpc-java/blob/master/COMPILING.md#build-protobuf
For Intellij set the java.library.path
, this StackOverflow post describes debugging and building with it. And in the case of Gradle, I don't know where to set the following:
-Djava.library.path=<path to the libproj, if needed>
for example on my mac, in Intellij, I have set the VM Options
in my test configuration to:
-ea -Djava.library.path=/usr/local/lib/
The Docker images are based off of the openjdk images. You can build a jdk image or a jre image, you can use Java 8 or 10 (maybe 11, haven't tested), and you can use debian or alpine.
To build the latest debian 11 jdk image:
docker build -t echoparklabs/geometry-api-java:11-jdk-slim .
The latest debian 11 jre image
docker build --build-arg JRE_TAG=11-jre-slim -t echoparklabs/geometry-api-java:11-jre-slim .
At this time, the resulting Alpine docker image is about 50% smaller than the slim debian images (but right now we've only got 12 ea). The default Alpine image uses the 12-jdk-apline
image
To build the latest Alpine JDK 12 image:
docker build -t echoparklabs/geometry-api-java:12-jdk-alpine -f Dockerfile.alpine .
- Java JDK 9 or greater.
- Gradle (Gradle required for development, for build, you only need to execute ./gradlew)
Find a bug or want to request a new feature? Please let us know by submitting an issue.
Copyright 2013-2018 Esri
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
A copy of the license is available in the repository's license.txt file.
Copyright 2017-2018 Echo Park Labs
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
A copy of the license is available in the repository's license.txt