1

This is a conceptual question I've been trying to implement for a while, and not being very good at raster/data processing or python I'd like to hear best practices in dealing with an extent such as the ConUSA.

Problem: I would like to create a tool which would allow me to append csv files with latitude and longitude with values from raster layers and polygons. Basically a spatial join tool but for standard layers...

Ideas: I've been struggling with whether to deal with shapes in postgis or flat files. The problem I have with postgis is I suck at the whole SQLAlchemy engine and such and never know how to properly apply it in a loop when pulling out chunks of shapes by county or state or things like that

My current thought process is this: Take the NLCD2014 in EPSG:5071, and create band with NED 1arc second after doing a gdal_translate of the that gives me 2 bands. Few concerns:

1 - Would it be best to keep the NED in it's 1 degree tiles, project them to 5071 and layer everything into 1 degree x 1 degree tiles. I know it would be easier to process than a merged tif... Are there any good resources or examples of this type of work?

2 - I believe it wouldn't be difficult to import a country wide layer of DFIRM polygons and export as 1 degree by 1 degree tiles... right? Is there a better way?

UPDATE WORKFLOW EXAMPLE:

Setup: I get a set of Latitude / Longitudes that I need to sift through and assign a height, floodplain, and our own proprietary flood depths from raster files we create. I'm trying to find the best way to loop through, I believe if I group into counties or HU10 or something and loop that way it would be best, the following is implemented in crappy python:

1) NED tiles - I created a vrt and then created a compressed .tif (lzw) and clipped to the ConUSA, this becomes one raster band I use as lookup for DTM on a country wide basis through gdal and geotransformations and pixels and stuff.

2) DFIRM - I use the polygon shapes as for point in polygon , been experimenting with trying to rasterize but I believe a PostGIS DB with a county or census block index would be quickest, I just struggle with PostGIS engine connection and such

3) Flood Raster - Depth of flood water on HU2 basis, right now we run 2D models, create return periods and I go through and stack the 10yr 50yr 100yr 250yr 500yr and 1000yr rasters into a 6 band stack by HU2 and pull out the depths

So after writing it all out it seems probably best to group everything into HU2 stacks right? Rasterize the DFIRM polys with integers corresponding to floodplains and do the same?

4
  • Do you have an example or a workflow for your very special question?
    – huckfinn
    Commented Nov 30, 2015 at 23:28
  • @huckfinn updated. you could try and sound a bit less patronizing. Commented Dec 2, 2015 at 16:34
  • Sorry for that, I'm not a patron and also not first language speaker, so sometimes I dont know how it sounds like, but try to understand your question.
    – huckfinn
    Commented Dec 3, 2015 at 23:53
  • thanks for understanding and asking for clarification, sorry for getting defensive. Commented Dec 11, 2015 at 15:55

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.