Skip to content

Upload the livelihood zones shapefiles to mapbox #33

Closed

Description

@ciatph
  • 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

Activity

  1. ciatph commented on Jan 28, 2021

    @ciatph
    OwnerAuthor

    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.
  2. pinned this issue on Sep 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    web mapCode updates for the web maps.

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions