Skip to content

GeoJSON road files for spanish provinces capital cities

Notifications You must be signed in to change notification settings

amoraschi/spain-cities-geojson

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spain Cities GeoJSON

GeoJSON road files for spanish provinces capital cities

Madrid

More renders here

This repository contains numerous and heavy json files that represent roads in spanish provinces capital cities. They can be used to visualize, like in spain-cities-webpage, or study the actual roads.

How to Use

Data can be retrieved by fetching the Github API, like this:

const response = await fetch('https://raw.githubusercontent.com/amoraschi/spain-cities-geojson/master/cities/madrid.geojson')
const geojson = await response.json()

Or the local script can be used to download the data directly from the Overpass API, to do this, follow these steps:

  1. Clone the repository, or download the src directory and the package.json file if you don't want to download all GeoJSON files:
> git clone https://github.com/amoraschi/spain-cities-geojson/
  1. In the folder, run the NPM command to install the dependencies:
> npm install
  1. Run the NPM command followed by the name of the city you want to download (e.g. Madrid):
> npm start Madrid

Once it finishes, you will find a download folder containing 2 geojson files, one that contains the raw GeoJSON data from Overpass, and one that only contains the way s of a city.

Known Issues

The following cities present no data when fetched through the Overpass API, for an unknown reason:

  • Alicante
  • Castellón de la Plana
  • Donostia
  • Huesca
  • Palma de Mallorca
  • Pamplona
  • Valencia

Resources

OpenStreetMap - For retrieving the province names and their capital cities.

Overpass Turbo - For retrieving the actual data of the roads.

About

GeoJSON road files for spanish provinces capital cities

Topics

Resources

Stars

Watchers

Forks