Skip to content

Instantly share code, notes, and snippets.

@patchdynamics
Last active August 29, 2015 14:27
Show Gist options
  • Save patchdynamics/8f4105b8e54ce74b6063 to your computer and use it in GitHub Desktop.
Save patchdynamics/8f4105b8e54ce74b6063 to your computer and use it in GitHub Desktop.
Reproject and rasterize HRAP precipitation
+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
["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]]
# problem here is that 30x30 isn't the right resolution for HRAP
find *.shp -exec gdal_rasterize --config GDAL_CACHEMAX 4000 -a Globvalue -tr 1.0 1.0 -co COMPRESS=LZW {} ../precipitation_raster/{}30.tiff \;
find *.shp -exec ogr2ogr -t_srs ../hrap_projection.prj ../reproj/{} {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment