Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces a new model class
Territory
that contains a geometry property of typeMultiPolygon
(JTS). This new class may be very helpful in project solutions, for example if you want to store information about spatial restrictions for a certain user or user group.Currently, the geometry property will be saved as binary data in the database (Java serialized representation), which is not a very smart, but working solution. For the future, we could think about using Hibernate Spatial to persist the geometry, but this would require that the underlying SHOGun2 database is always a spatial database.
As we are using the Java Topology Suite, this PR also introduces a new dependency on
jackson-datatype-jts
, which provides aJtsModule
that is now registered in theShogun2JsonObjectMapper
. By doing this, JTS-geometries will always be serialized as GeoJSON (and vice versa).