Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce a territory class #198

Merged
merged 1 commit into from
Jun 13, 2016
Merged

Conversation

buehner
Copy link
Member

@buehner buehner commented Jun 13, 2016

This PR introduces a new model class Territory that contains a geometry property of type MultiPolygon (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 a JtsModule that is now registered in the Shogun2JsonObjectMapper. By doing this, JTS-geometries will always be serialized as GeoJSON (and vice versa).

@marcjansen
Copy link
Member

So currently it would be impossible to actually visualize the territories, right? Or can we e.g. point a GeoServer towards the generated table and have it visualize the territories?

Can we please at least add a TODO and probably also an associated github issue? Also a detailed example (in the archetype?) would be cool. If we cannot have this, an issue and/or TODO is much appreciated.

Otherwise this looks good to me, please merge.

@buehner
Copy link
Member Author

buehner commented Jun 13, 2016

I opened a corresponding issue and will merge this PR now: #199

@buehner buehner merged commit 0067f61 into terrestris:master Jun 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants