geopandas / xyzservices

Source of XYZ tiles providers
https://xyzservices.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
165 stars 30 forks source link

What would the process be for adding a new tile service like NowCoast #77

Closed ahuang11 closed 5 months ago

ahuang11 commented 3 years ago

https://new.nowcoast.noaa.gov/help/#!section=rest-usage

It would unlock a lot, a lot of new tiles (see list @ https://new.nowcoast.noaa.gov/help/#!section=rest-layer-ids)

giswqs commented 3 years ago

See https://xyzservices.readthedocs.io/en/latest/contributing.html#providers

giswqs commented 3 years ago

You can also add it to https://qms.nextgis.com, and then use xyzservices.TileProvider.from_qms("service_name") to load tiles. https://github.com/geopandas/xyzservices/issues/63

martinfleis commented 3 years ago

@ahuang11 If you can get XYZ URL for NowCoast services, the best option is to follow contributing guide linked by @giswqs and add the metadata to xyzservices-providers.JSON. That way it is easier to find than having it only remotely on QMS (you need to know it is there).

That said, having it in both is the optimal solution for a wider community.

ahuang11 commented 2 years ago

Before I find a programmatic way to fill out the json with all the services, does this look right? (from https://new.nowcoast.noaa.gov/help/#!section=rest-layer-ids) image

I am not sure what {s} stands for in the example, and whether {xmin},{ymin}, etc are accepted (since the example only shows {X},{Y},{Z}. image

Example full URL https://new.nowcoast.noaa.gov/arcgis/rest/services/nowcoast/radar_meteo_imagery_nexrad_time/MapServer/export?transparent=true&format=png8&layers=show:3&bbox=-15578640.92640406,2182661.2789739748,-6557848.596303097,7299661.700495453&bboxSR=3857&imageSR=3857&size=922,523&f=image

{
  "analysis_meteohydro_sfc_qpe_time": {
      "1_hr_quantitative_precipitation_accumulation": {
            "url": "https://new.nowcoast.noaa.gov/arcgis/rest/services/nowcoast/analysis_meteohydro_sfc_qpe_time/MapServer/export?transparent=true&format=png8&layers=show:3&bbox={xmin},{ymin},{xmax},{ymax}&bboxSR=3857&imageSR=3857&size=256,256&f=image",
            "max_zoom": 19,
            "attribution": "(C) nowCOAST™",
            "html_attribution": "&copy; <a href=\"https://new.nowcoast.noaa.gov/help/#!section=abstract\">OpenStreetMap</a> contributors",
            "name": "NOAA Quantitative Precipitation Estimates (Time Enabled) 1-Hr Quantitative Precipitation Accumulation (inches)"
      },
      "3_hr_quantitative_precipitation_accumulation": {
            "url": "https://new.nowcoast.noaa.gov/arcgis/rest/services/nowcoast/analysis_meteohydro_sfc_qpe_time/MapServer/export?transparent=true&format=png8&layers=show:7&bbox={xmin},{ymin},{xmax},{ymax}&bboxSR=3857&imageSR=3857&size=256,256&f=image",
            "max_zoom": 19,
            "attribution": "(C) nowCOAST™",
            "html_attribution": "&copy; <a href=\"https://new.nowcoast.noaa.gov/help/#!section=abstract\">OpenStreetMap</a> contributors",
            "name": "NOAA Quantitative Precipitation Estimates (Time Enabled) 3-Hr Quantitative Precipitation Accumulation (inches)"
      },
   },
}
martinfleis commented 2 years ago

@ahuang11 this is a WMS data source, not XYZ, that is why the placeholders are different. We currently don't support those but as said in https://github.com/geopandas/xyzservices/issues/49#issuecomment-891856934 we could, in theory, do that. It would need some thinking though to ensure we don't mix XYZ and WMS (and potentially other types) together in a confusing way.