Git Product home page Git Product logo

philippines-json-maps's Introduction

Philippines Administrative Boundaries JSON Maps

License: MIT

Philippine administrative boundaries in geojson and topojson format at various resolution.

Demo

This repository contains Philippines vector maps suitable for use on web applications either as an overlay to interactive map services (ex. Leaflet) or rendered on HTML canvas (ex. d3js).

You can download the map files in the following directories.

2023
├── topojson
├── geojson
└── ...

Low resolution topojson files are well suited for resource-constrained scenarios such as rendering dynamic maps using slow network connection. For optimal performance use medium resolution or low resolution maps.

Sample Maps

Files are generated for all locations in the Philippines at different administrative levels.

For example, the regions map will show regional boundaries on the entire country. Shown below rendered using geojson.io.

While the each of the provinces map will show provincial boundaries in a region.

Same with municipalities and cities and barangays.

Source Files

Maps are using EPSG:32651, Lat/Long projection.

The shapefiles used as source for this project is available from altcoder/philippines-psgc-shapefiles.

The administrative level shapefiles uses PSGC data updated as of 31 December 2023.

Previous Maps

Output from a 2019, 2011 versions is available under 2011/ and 2019/ directory.

Files Available

Raw shapefiles, geojson and topojson for all political boundary are made available. Please feel free to file issues found.

Level Name
Level 0 Country
Level 1 Region
Level 2 Province/District
Level 3 Municipality/Cities
Level 4 Barangays/Sub-Municipalities

GeoJSON and Topojson formats are available in high, medium and low resolution files.

Conversion Process

Shapefiles to GeoJSON conversion with high fidelity was done using ogr2ogr.

The high fidelity GeoJSON file is "downsampled" using mapshaper with -simplify flag at 10% (hires), 1% (medres), 0.1% (lowres) settings and coverted to a more compact topojson format.

Using the Scripts (OPTIONAL)

You can modify and run the scripts on your own. For example if you want to have your own settings for mapshaper simplify algorithm.

  1. Install Dependencies
brew install gdal
npm install -g mapshaper
  1. Modify scripts under scripts/

  2. Run the scripts (running barangays-topojson.sh might take a few minutes to finish)

cd scripts
./topojson-country.sh
./topojson-regions.sh
./topojson-provdists.sh
./topojson-municities.sh

Contributing

Contributions are always welcome, no matter how large or small. Before contributing, please read the code of conduct.

Kindly report data errors by filing issues.

philippines-json-maps's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

philippines-json-maps's Issues

Missing `GeoJSON` prov files for `NCR`

Description

I trying to create an interactive map based from leaflet and I'm testing out this project of yours and I encounter a missing GeoJSON files particularly only for NCR region.

Steps to reproduce

  1. Click Region:
    image
  2. Click a province
    image
  3. Click a municities (on the picture below, I'm clicking NCR, Second District (Not a Province))
    image
  4. Checking console (checking console reveals that the geometry has 0 length array)
    image

Expected behavior
The expected output should show places/municities under the NCR region.

Reading the Shapefiles with geopandas getting a driver error

First of all, thanks for providing this repository. I've been looking for something like this. However, I am having problems reading the shapefile with geopandas.

Description

geopandas readfile not recognizing a legit shape file

Steps to reproduce

  1. Attempt to read with geopandas.read_file() command:
    gpd.read_file('https://github.com/altcoder/philippines-psgc-shapefiles/blob/master/source/2015/Municities.zip')
  2. I get a driver error:
    DriverError: '/vsimem/dff0663a4e584987848e40266f6b73e8' not recognized as a supported file format.
  3. Searching google and stack overflow unfortunately did not produce useful clues.

Expected behavior
A GeoDataFrame object.

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.