How bedla/praguehacks-realreality works
Project type and purpose
• This is a Java-based microservice (mock server) whose sole responsibility is to serve geospatial data (converted ESRI Shapefiles) over HTTP as a REST API.
• A Chrome-extension-based frontend (hosted in a separate repo) consumes this API.
File structure
• Top-level: Maven project (pom.xml, .mvn/, mvnw).
• src/main/java/cz/bedla/praguehacks2016/realreality:
• Application.java – entry point, boots embedded HTTP container
• config/JerseyConfig.java – registers REST endpoints & providers
• endpoint/Rest.java – JAX-RS resource with HTTP paths
• service/Service.java – business logic layer
• db/Database.java – data access façade to shapefile “database”
• geotools/GeoToolsFeatureCollectionSupport.java – adapter between GeoTools FeatureCollections and JSON output
• utils/GeoUtils.java & Utils.java – coordinate helpers, JSON serialization helpers
• src/main/resources/application.properties – runtime configuration (file‐paths, server port)
README for additional insights
• Describes manual pre-processing of .shp files in QGIS for reprojection to EPSG:3857 and adding an integer my_id field.
• Lists the datasets to download and convert.