global-electrification-platform / explorer

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

Health site facilities do not overlay for 7 countries #170

Closed akorkovelos closed 4 years ago

vgeorge commented 5 years ago

This is not a bug. Unfortunatelly the Explorer will not be able to fetch vector tiles from https://data.humdata.org because it doesn't have CORS enabled, which blocks third-party access to their vector tile service.

A work arround would be to parse the source GeoJSON file into MBTiles and serve it from GEP's Mapbox account.

akorkovelos commented 5 years ago

@vgeorge apologies for miss-labeling. Is this how it works for Malawi using https://data.humdata.org/gis/services/postgis/pre_c2970f98_f65f_4a11_b717_c8018dffc94f/wkb_geometry/vector-tiles/{z}/{x}/{y}.pbf ? If yes, all I meant with this issue is to note down that source needs to be updated for the rest of the countries.

vgeorge commented 5 years ago

No problem, @alekordESA. I believe the best approach here is to upload the dataset to the Mapbox account and update the model configuration to fetch the layer from there.

vgeorge commented 4 years ago

@akorkovelos here is the issue related to the Health Sites layer.

akorkovelos commented 4 years ago

Health sites from HDX are available for 43 countries. Country files were downloaded and compiled into a single shapefile. It is available now on S3 under the name Healthsites.

@vgeorge does this work?

vgeorge commented 4 years ago

@akorkovelos I confirm I was able to generate a tileset and upload to our Mapbox account. You can update the fields accordingly, keeping "url", "vectorLayers" and "type" as they are.

    - id: healthsites
      label: Healthsites
      type: 'vector'
      url: mapbox://devseed.ajv4fl8l
      description: This dataset shows the list of operating health facilities.
      source:
        label: Global Healthsites Mapping Project
        url: https://data.humdata.org
      vectorLayers:
        - healthsites
akorkovelos commented 4 years ago

@vgeorge healthsites updated on config files. Uploaded on S3 under YML files 22Sep.

vgeorge commented 4 years ago

Model configs were updated and this layer was included.

vgeorge commented 4 years ago

@akorkovelos regarding your comment in https://github.com/global-electrification-platform/explorer/issues/201#issuecomment-533885290, I don't believe its a problem with layers overlay, because simplification happens also in areas where there is no settlements.

This is probably related with the way we generated the tileset with tippecanoe. We will explore the optiosn available here and we will review it and regenerate the tilesets accordingly.

vgeorge commented 4 years ago

I've updated the layer now with the following command:

tippecanoe -zg -f -o gep-healthsites.mbtiles -l healthsites gep-healthsites.geojson

Some tiles seems more complete, but it may take a while to all tiles be affected.

vgeorge commented 4 years ago

Healthsites are showing at all levels now.