Skip to content

alanquintero/openstreetmap_services

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenStreetMap Services

Spring Boot application providing backend services for OpenStreetMap data.

Running OpenStreetMap Services Locally

1. Prerequisites

  • Java 17 or higher installed
  • Maven installed (or use the included Maven wrapper)

2. Build and run the application

# Clean and run the app
mvn clean spring-boot:run

The app will start on http://localhost:8080

3. Access the endpoints

Default endpoint (home): http://localhost:8080/

Example API endpoint: http://localhost:8080/api/v1/geometries

4. Example output

Calling GET /api/v1/geometries will return JSON like:

[
  {
    "id": 1,
    "geometryType": "Polygon",
    "regionName": "MT MEADOWS AREA",
    "zipCode": "00012",
    "stateCode": "CA",
    "arcs": "[[0, 1, 2]]",
    "stateId": 5
  },
  {
    "id": 2,
    "geometryType": "Polygon",
    "regionName": "WEST PIMA COUNTY",
    "zipCode": "00014",
    "stateCode": "AZ",
    "arcs": "[[3, 4, 5, 6, 7]]",
    "stateId": 3
  }
]

Demo

5. Database

The app uses an in-memory H2 database preloaded from data.sql.

The data.sql file was generated using the project jsonToQuery and will reset each time the app restarts.

6. Running Tests

mvn test

About

Spring Boot backend providing OpenStreetMap geometry data via a REST API.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages