Skip to content

Instantly share code, notes, and snippets.

View mzaglia's full-sized avatar

Matheus C. Zaglia mzaglia

  • Geopixel
  • São José dos Campos, SP - Brazil
View GitHub Profile
@bergmannjg
bergmannjg / rearct-native-app-in-wsl2.md
Last active July 26, 2024 08:55
Building a react native app in WSL2
@woodbri
woodbri / get-wind.py
Last active July 16, 2024 18:44
Python script to fetch GFS wind data and create a JSON file
#!/usr/bin/env python3
'''
get-winds.py
- get the latest data from nomads.ncep.noaa.gov unless we have it already
- generate file /maps/wms/data/windy.json
- generate windy.latest file with time stamp
'''
@rclark
rclark / Issues.md
Last active July 9, 2024 20:16
Leaflet WMS + GetFeatureInfo

There are a bunch of reasons why this is convoluted, mostly in building the URL to make the request:

  1. You have to rely on an AJAX request, this example uses jQuery
  2. To make a GetFeatureInfo request, you must provide a BBOX for a image, and the pixel coordinates for the part of the image that you want info from. A couple of squirrely lines of Leaflet code can give you that.
  3. Output formats. The info_format parameter in the request. We don't know a priori which will be supported by a WMS that we might make a request to. See Geoserver's docs for what formats are available from Geoserver. That won't be the same from WMS to WMS, however.
  4. WMS services return XML docs when there's a mistake in the request or in processing. This sends an HTTP 200, which jQuery doesn't think is an error.