Replies: 3 comments 6 replies
-
You probably know this, but I'll point it out just in case someone doesn't: If you use the endpoint of the form https://api.weather.gov/zones/county/MNC053 you will get the geometry as long as you request geo+json (which I believe is the default if you don't specify it in the request header). |
Beta Was this translation helpful? Give feedback.
-
@JJKraw Thanks. Is the geometry returned at the forecast zone level or the entire county? I would expect a similar response from the https://api.weather.gov/zones?id=MNC053&include_geometry=true but would expect the geometry to be at the forecast zone level. Either way using include_geometry=true with the zones api returns no geometry |
Beta Was this translation helpful? Give feedback.
-
If you request a county (zones/county/xxCnnn), you get the county geometry. If you select a forecast zone (zones/forecast/xxZnnn), you get the zone geometry. The amount of data returned can be huge, particularly if a coastline is involved. |
Beta Was this translation helpful? Give feedback.
-
The /zones api has a parameter to include_geometry which when set to true should return the zones geometry. I am expecting it to return the geometry of the polygon(s) of the requested zone(s).
However it appears that geometry is not returned in any case where include_geometry is set to true.
https://api.weather.gov/zones?id=MNC053&include_geometry=true
{
"@context": {
"@Version": "1.1"
},
"type": "FeatureCollection",
"features": [
{
"id": "https://api.weather.gov/zones/county/MNC053",
"type": "Feature",
"geometry": null,
"properties": {
"@id": "https://api.weather.gov/zones/county/MNC053",
"@type": "wx:Zone",
"id": "MNC053",
"type": "county",
"name": "Hennepin",
"effectiveDate": "2019-05-02T18:00:00+00:00",
"expirationDate": "2219-05-02T18:00:00+00:00",
"state": "MN",
"cwa": [
"MPX"
],
"forecastOffices": [
"https://api.weather.gov/offices/MPX"
],
"timeZone": [
"America/Chicago"
],
"observationStations": [],
"radarStation": null
}
}
]
}
Beta Was this translation helpful? Give feedback.
All reactions