API Endpoints

Health Check

GET/actuator/health

Example:

curl -X GET http://localhost:8083/actuator/health

Response:

{"status":"UP"}

Transform Coordinates

GET/api/geo/transform

Transform Berlin coordinates from WGS84 to Web Mercator

Example:

curl -X GET "http://localhost:8083/api/geo/transform?lat=52.520008&lon=13.404954&from=EPSG:4326&to=EPSG:3857"

Response:

{"x":1489199.54,"y":6894746.99,"crs":"EPSG:3857"}

Validate Point

POST/api/geo/validate/point

Validate Brandenburg Gate coordinates

Example:

curl -X POST http://localhost:8083/api/geo/validate/point \ -H "Content-Type: application/json" \ -d '{"latitude":52.516275,"longitude":13.377704,"crs":"EPSG:4326"}'

Response:

{"valid":true,"latitude":52.516275,"longitude":13.377704}

Parse CSV File

POST/api/geo/parse

Convert CSV points to GeoJSON

Example:

curl -X POST http://localhost:8083/api/geo/parse \ -F "file=@/path/to/sample.csv"

Response:

{"type":"FeatureCollection","features":[...]}

Sample files: sample-simple-point.csv, sample-simple-shape.csv, sample.csv

Parse Excel File

POST/api/geo/parse

Convert Excel sheets to GeoJSON

Example:

curl -X POST http://localhost:8083/api/geo/parse \ -F "file=@/path/to/sample.xlsx"

Response:

{"type":"FeatureCollection","features":[...]}

Parse GeoJSON

POST/api/geo/parse

Validate and process GeoJSON

Example:

curl -X POST http://localhost:8083/api/geo/parse \ -F "file=@/path/to/brandenburg-forests.geojson"

Response:

{"type":"FeatureCollection","features":[...]}

Parse Shapefile

POST/api/geo/parse

Convert Shapefile to GeoJSON using GDAL

Example:

curl -X POST http://localhost:8083/api/geo/parse \ -F "file=@/path/to/AAC_2024.zip"

Response:

{"type":"FeatureCollection","features":[...]}

Calculate Area

POST/api/geo/area

Calculate area of a sample polygon

Example:

curl -X POST http://localhost:8083/api/geo/area \ -H "Content-Type: application/json" \ -d '{"coordinates":[[13.0,52.0],[14.0,52.0],[14.0,53.0],[13.0,53.0],[13.0,52.0]],"crs":"EPSG:4326"}'

Response:

{"area":7780.5,"unit":"km²"}

Point in Polygon

POST/api/geo/contains

Check if Berlin is in Brandenburg

Example:

curl -X POST http://localhost:8083/api/geo/contains \ -H "Content-Type: application/json" \ -d '{"polygon":{"coordinates":[[12.0,51.5],[15.0,51.5],[15.0,53.5],[12.0,53.5],[12.0,51.5]]},"point":{"latitude":52.520008,"longitude":13.404954}}'

Response:

{"contains":true}

Analyze State Boundaries

POST/api/geo/analyze-state

Analyze GeoJSON to identify intersecting ISO3166-2 administrative boundaries

Example:

curl -X POST http://localhost:8083/api/geo/analyze-state \ -H "Content-Type: application/json" \ -d '{"geojson":"{\"type\":\"FeatureCollection\",\"features\":[{\"type\":\"Feature\",\"geometry\":{\"type\":\"Polygon\",\"coordinates\":[[[14.2317,51.8445],[14.2451,51.8445],[14.2451,51.8367],[14.2317,51.8367],[14.2317,51.8445]]]}}]}"}'

Response:

{ "success": true, "matchedStates": [{ "gid0": "DEU", "gid1": "DEU.4_1", "hasc1": "DE.BB", "iso1": null, "name": "Brandenburg", "country": "Germany", "bbox": { "minLat": 51.36, "minLon": 11.27, "maxLat": 53.56, "maxLon": 14.77 } }], "geojsonBbox": { "minLat": 51.8367, "minLon": 14.2317, "maxLat": 51.8445, "maxLon": 14.2451 }, "stateBbox": { "minLat": 51.36, "minLon": 11.27, "maxLat": 53.56, "maxLon": 14.77 } }

Features:

  • Matches GeoJSON to GADM 4.1.0 administrative boundaries (3,662 states/provinces)
  • Returns matched states with ISO codes (GID_0, GID_1, HASC_1, ISO_1)
  • Calculates bounding boxes for GeoJSON and matched states
  • Uses Python spatial queries against GADM geopackage

Sample Files

Download sample files to test with your own tools

Description Download
Simple Point
Single coordinate point (latitude, longitude)
CSV XLSX
Simple Shape
Polygon coordinates only (latitude, longitude)
CSV XLSX
Enhanced Mixed
Points and polygons with metadata (name, description, latitude, longitude)
CSV XLSX
Brandenburg Forests
GeoJSON format with Brandenburg forest areas
GeoJSON
AAC Administrative Boundaries
ESRI Shapefile format
ZIP