项目作者: ancore

项目描述 :
A demo of the geojson-serializer with Spring Boot
高级语言: Java
项目地址: git://github.com/ancore/geojson-serializer-demo.git
创建时间: 2019-06-24T18:26:20Z
项目社区:https://github.com/ancore/geojson-serializer-demo

开源协议:Apache License 2.0

下载


Build Status

geojson-serializer-demo

An example Spring Boot project that demonstrates the usage of geojson-serializer to
create GeoJSON from a PoJo with a RestController.

REST Calls

http://localhost:8080/api/places

  1. {
  2. "type": "FeatureCollection",
  3. "features": [
  4. {
  5. "type": "Feature",
  6. "id": 1,
  7. "geometry": {
  8. "type": "Point",
  9. "coordinates": [
  10. 2.2944313287734985,
  11. 48.85826523681466
  12. ]
  13. },
  14. "properties": {
  15. "name": "Eiffel Tower",
  16. "description": "Champ de Mars, 5 Avenue Anatole France, 75007 Paris, France"
  17. }
  18. },
  19. {
  20. "type": "Feature",
  21. "id": 2,
  22. "geometry": {
  23. "type": "Point",
  24. "coordinates": [
  25. -74.04455244541168,
  26. 40.68925173681689
  27. ]
  28. },
  29. "properties": {
  30. "name": "Statue of Liberty",
  31. "description": "Isla de la Libertad, New York, NY 10004, USA"
  32. }
  33. }
  34. ]
  35. }

http://localhost:8080/api/places/1

  1. {
  2. "type": "Feature",
  3. "id": 1,
  4. "geometry": {
  5. "type": "Point",
  6. "coordinates": [
  7. 2.2944313287734985,
  8. 48.85826523681466
  9. ]
  10. },
  11. "properties": {
  12. "name": "Eiffel Tower",
  13. "description": "Champ de Mars, 5 Avenue Anatole France, 75007 Paris, France"
  14. }
  15. }

http://localhost:8080/api/places/2

  1. {
  2. "type": "Feature",
  3. "id": 2,
  4. "geometry": {
  5. "type": "Point",
  6. "coordinates": [
  7. -74.04455244541168,
  8. 40.68925173681689
  9. ]
  10. },
  11. "properties": {
  12. "name": "Statue of Liberty",
  13. "description": "Isla de la Libertad, New York, NY 10004, USA"
  14. }
  15. }

Credits

Copyright (c) 2019 Andreas Cordsen

Please refer to the LICENSE file for details.