global-electrification-platform / explorer

Global Electrification Platform (Web)
https://electrifynow.energydata.info/
MIT License
11 stars 7 forks source link

Add Education Facilities as contextual layer #221

Closed vgeorge closed 4 years ago

vgeorge commented 4 years ago

Originally posted by @akorkovelos in https://github.com/global-electrification-platform/explorer/issues/201#issuecomment-533649850

akorkovelos commented 4 years ago

@vgeorge Schools shp are now uploaded on S3. Is it possible to generate map keys for those (similar to healthsites)? I will then add on config files as before.

PS. This will be the last change on #201 before the launch.

vgeorge commented 4 years ago

@akorkovelos the following config has type, URL and vectorLayer properties set, you can change the others:

    - id: schools
      label: Schools (OpenStreetMap)
      type: 'vector'
      url: mapbox://devseed.5hgjq12r
      description: This dataset shows the schools from OpenStreetMap.
      source:
        label: OpenStreetMap
        url: https://www.openstreetmap.org
      vectorLayers:
        - schools

For the record, I've generated the tileset by running:

ogr2ogr -select osm_id -f GeoJSON gep-schools.geojson schools.shp
tippecanoe -zg -o gep-schools.mbtiles -l schools gep-schools.geojson

Some properties from OSM data were causing enconding issues, so I just kept osm_id.

vgeorge commented 4 years ago

Layer created and added to the platform.