Last active
August 26, 2015 17:36
-
-
Save creg-ny-baa/ed3d482102b3d9ca3515 to your computer and use it in GitHub Desktop.
A semi-automated sql script to remove map collars from FEMA FIRM Panel rasters.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Removes map collars from FEMA FIRM Panel rasters. | |
================================================= | |
Output the query results to a batch file and run inside the directory | |
with the FIRM tiffs. Assumes that the table with panel footprints has | |
been projected to the same coordinate system as the rasters. | |
The MIT License (MIT) | |
2015-08-26 Tom Arnold - Walker Associates, Inc. | |
*/ | |
SELECT | |
'gdal_translate -projwin ' || | |
st_minx("Geometry") || ' ' || | |
st_maxy("Geometry") || ' ' || | |
st_maxx("Geometry") || ' ' || | |
st_miny("Geometry") || ' ' || | |
"FIRM_PAN" || '.tif ' || "FIRM_PAN" || '_NoCollar.tif' | |
AS "REM Remove map collars" | |
from s_firm_pan_26916 | |
where "FIRM_PAN" like '01125%' | |
order by "FIRM_PAN" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment