Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload the livelihood zones shapefiles to mapbox #33

Closed
2 tasks done
ciatph opened this issue Jan 27, 2021 · 1 comment
Closed
2 tasks done

Upload the livelihood zones shapefiles to mapbox #33

ciatph opened this issue Jan 27, 2021 · 1 comment
Labels
web map Code updates for the web maps.

Comments

@ciatph
Copy link
Owner

ciatph commented Jan 27, 2021

  • Process the raw shapefiles so that it can be uploaded and used as a mapbox TileSet using mapbox's free tier pricing plan.
  • Test rendering the uploaded Tilesets as Styles
@ciatph ciatph added the web map Code updates for the web maps. label Jan 27, 2021
@ciatph ciatph added this to the Livelihood Zones Web Map milestone Jan 27, 2021
@ciatph
Copy link
Owner Author

ciatph commented Jan 28, 2021

The raw livelihood zones shapefiles needs to be processed to avail mapbox's free tier map loads, api and tilesets hosting. The target is to not exceed mapbox's 20 max Tileset upload per month, and to reduce the shapefiles into a smaller but comprehensible resolution so as not to exceed mapbox's now billed hosting. The following steps were done to process the shapefiles:

Shapefile Preparation for Mapbox Tileset Upload

  1. Combine (merge) the province shapefiles into their respective island group in a QGIS layer (i.e., luzon, visayas, mindanao layers).
  2. Check that each merged island group layer is error-free. Run QGIS Toolbox Processing -> Vector Grometry -> Check Validity on each of the merged layers.
  3. Fix errors if there are any reported from step no. 2. Run QGIS Toolbox Processing -> Vector Grometry -> Fix Geometry on the merged layers.
  4. Remove the columns that will not be used on the web map from the Attributes Table . Retain only: ADM2_EN, ADM3_EN, Legend_v2 and layer
  5. Simplify the merged layers to reduce the file size and avail mapbox's free tier. Use the mapshaper cli to simplify the geometries. shapefile-simplify, a nodejs script built on top of mapshaper cli can also be used.
  6. The shapefile output from step no. 5, packaged in a zipped file can now be uploaded as Tilesets to mapbox.

@ciatph ciatph closed this as completed Jan 28, 2021
@ciatph ciatph pinned this issue Sep 4, 2022
This was referenced Sep 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
web map Code updates for the web maps.
Projects
None yet
Development

No branches or pull requests

1 participant