So, I’ve been trying to stick precipitation data from NOAA’s Advanced Hydrologic Precipitation Service (AHPS) into GIS. You can view this data online and you can download it. So all you’ve got to do is load it into your preferred GIS software (I’m using QGIS 2.4), right?
Nope. The downloadable data is in an oddball format that is not directly usable for much of anything. Instead, you get point shapefiles in a one-off projection, Hydrologic Rainfall Analysis Project (HRAP). These shapefiles consist of a grid of points, each basically representing a pixel, and come with prj files defining a geographic coordinate system. If you load them in QGIS, they look like this:
The prj file looks like this:
GEOGCS["HRAP_Sphere",DATUM["",SPHEROID["",6371200.0,0.0]], PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]
That’s nice, but you can’t rasterize it very well because the grid is not regular in this projection. It’s tilted and does not have even spacing across its extent. The points can’t be reasonably converted to raster pixels. The coordinate system the shapefile ships with isn’t really good for anything. I tried poking around online to figure out what you’re supposed to do with these AHPS shapefiles and did not come up with anything helpful. So I emailed AHPS to try to figure out what to do. I got a quick and very helpful response–a pdf with instructions for converting these shapefiles into a usable projection using ArcGIS. Although this solved my problem (luckily, I do have access to ArcGIS), it raises several questions: Why aren’t the data downloadable in a format that is directly usable–if not a raster, at least a shapefile in an appropriate projection? Why aren’t instructions on using the downloadable shapefiles readily available to users of this data? The instructions exist, they work, but I don’t know how you get them without emailing AHPS and saying, “Help, what am I supposed to do with this?” What about those who don’t have access to ArcGIS? Most people can’t afford ESRI’s absurdly high prices and don’t work at institutions that can. So far as I can tell, the answer for people in this situation is, at present, “Sorry, you’re SOL.”
So… if you follow the directions I got from AHPS, this is what happens:
1) You delete the prj file that comes with a shapefile, and create a new one that looks like this:
GEOGCS["HRAP_GCS",DATUM["D_HRAP",SPHEROID["HRAP_Sphere",6371200.0,0.0]], PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]
In proj4 format (which is accepted by QGIS for the creation of a custom CRS), the coordinate system looks like this:
+proj=longlat +a=6371200 +b=6371200 +no_defs
2) You create a custom CRS and transform the shapefile into that CRS, which results in a prj file that looks like this:
PROJCS["HRAP_Projected",GEOGCS["HRAP_GCS",DATUM["D_HRAP",SPHEROID ["HRAP_Sphere",6371200.0,0.0]],PRIMEM["Greenwich",0.0],UNIT ["Degree",0.0174532925199433]],PROJECTION["Stereographic_North_Pole"], PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0], PARAMETER["Central_Meridian",-105.0],PARAMETER["Standard_Parallel_1", 60.0],UNIT["HRAP_Grid",4762.5]]
Or, in proj4:
+proj=stere +lat_0=90 +lat_ts=60 +lon_0=-105 +k=1 +x_0=0 +y_0=0 +a=6371200 +b=6371200 +to_meter=4762.5 +no_defs
Once you’ve done that, you have a nice regular grid that is ready to be rasterized. In QGIS, it looks like this:
Then you can just go to Raster –> Conversion –> Rasterize, set “Attribute field” to “Globvalue”, “Raster resolution in map units per pixel” to “1” for both horizontal and vertical, and Bob’s your uncle. You get something like this:
And then you can play with the style, get it pretty, and you have a usable precipitation layer. Wonderful! However: The folks at AHPS know how to do this. The rest of us don’t. The information needed is not readily available and the process somewhat convoluted. Why isn’t that information readily available and, more to the point, why aren’t the data provided in a form that doesn’t require a bunch of hassle? We’re all paying for the creation of this data. Why don’t we get a usable product? If they know how to generate such a product, why don’t they just… do it? Give us a raster that is already in a well-defined and documented coordinate system with a prj file that works. Really, it should also come with nice, readily-interpretable styling, so that I don’t need to create that as well. Let me just load it and use it. Compared to the effort and expense involved in generating this data, providing it in a simple plug-and-play format is utterly trivial. So, AHPS, just do it. You know how, you can do it in your sleep. Don’t give the rest of us a bunch of pointless hoops to jump through. Just give us a product we can use.