Closed webmaven closed 8 years ago
Not that I know about. The USDA's web query system only permits queries by ZIP, and that's the API that's being used to extract this data.
I've been digging in to see if I could find a workaround, but:
So, after some URL simplification, what do you make of this URL?: http://planthardiness.ars.usda.gov/ArcGIS/rest/services/uspz/MapServer/identify?f=json&geometry=%7B%22x%22%3A-11853548.4424554%2C%22y%22%3A4167059.87610599%2C%22spatialReference%22%3A%7B%22wkid%22%3A102100%7D%7D&tolerance=3&returnGeometry=true&mapExtent=%7B%22xmin%22%3A0%2C%22ymin%22%3A0%2C%22xmax%22%3A0%2C%22ymax%22%3A0%2C%22spatialReference%22%3A%7B%22wkid%22%3A102100%7D%7D&imageDisplay=1%2C1%2C1&geometryType=esriGeometryPoint&sr=102100
Oh, that's very interesting. Let's shop this around to some folks who know Esri's RESTful API well enough to weigh in!
(It's funny—I went one level deeper than the website to use their internal API, but it never occurred to me to look one level deeper still. I felt smug enough my initial, minimal accomplishment that I stopped thinking critically.)
I mentioned this to @tmcw and, being @tmcw, he just went ahead and whipped up this solution. :) The next challenge is to either integrate his code (which he's kindly provided under an MIT license) or rewrite it in Python, using Mercantile.
:100: :clap:
Now the code just needs to step through the bounding box at set intervals.
Not sure what the resolution should be if we want to reconstruct shapefiles rather than end up with a huge x,y,zone table.
Thought: A limited POC could do it just within the bounding box for a single Zipcode.
Yeah, the nice thing about using ZIPs is that I didn't have to consider density, how to limit queries to land, or really anything other than getting a list of ZIPs. I might—God help me—have to actually learn something about working with geodata.
:scream:
Due to #7, we have to use a different method now: #8.
AFAIK, the Zipcode query will return the zone at the center (centroid?) of the Zipcode area. For Zipcodes that cover areas with steep slopes (or have other features that create microclimate variations), this ends up not being very useful.
Is there any way to query for specific lat/long coordinates instead, and construct a higher resolution dataset?