Giter Club home page Giter Club logo

spring-boot-spatial-example's Introduction

A Spring Boot example editing spatial data in relational database

Alt text

This is a small example app that shows how one can use

  • Spring Boot and Spring Data
  • Latest Hibernate with spatial features. At the application API, only standard JPA stuff (and Spring Data) is used.
  • The example also uses QueryDSL spatial query as an example. QueryDSL contain excellent support for spatial types. QueryDSL example replaced with plain JPQL( with Hibernate spatial extensions) as the latest version is not compatible with latest JTS/Hibernate. See querydsl/querydsl#2404. If you want to see the exaple of QueryDSL usage in this setup, check out a bit older version of the example.
  • Relational database, like GeoDB/H2 (default) or MySQL, which supports basic spatial types. If you want to run this example on MySQL, prepare a "spatialdemo" database and change DB credentials in src/main/resources/application.properties. It should be rather easy to switch to another DB supported by Hibernate as well. Geometry types in DB are bit non-standard, that is something you might need to adjust a bit.
  • Vaadin and V-Leaflet add-on to build the UI layer. V-Leaflet is a Vaadin wrapper for Leaflet, the awesome slippy map library. With V-Leaflet we use the Editable extension and its Vaadin Field implementations which make it dead simple to edit JTS data types directly from the JPA entities.
  • As baselayer for maps, OpenStreetMap layer is used, but naturally any common background map can be used.

...to build a full-stack web app handling spatial data efficiently.

As the data is in an optimised form in the DB, it is possible to create efficient queries to the backend and e.g. only show features relevant to the current viewport of the map visualising features or what ever you can with MySQLs spatial queries.

Enjoy!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.