Coder Social home page Coder Social logo

spain-cities-geojson's Introduction

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.

spain-cities-geojson's People

Contributors

amoraschi avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.