This file contains hidden or 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
#! /bin/bash | |
# Forked from: Andy Mason https://gist.github.com/andymason/6780828 | |
# Convert Landsat 8 GeoTIFF images into RGB pan-sharpened JPEGs. | |
# | |
# Requirements: | |
# * gdal http://www.mapbox.com/tilemill/docs/guides/gdal/ | |
# * convert (image-magick) | |
# * dans-gdal-scripts https://github.com/gina-alaska/dans-gdal-scripts |
This file contains hidden or 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
--#lowecase table and field names scripts: | |
--(generates the sql needed; best to do in psql command line) | |
SELECT 'ALTER TABLE ' || quote_ident(c.table_schema) || '.' | |
|| quote_ident(c.table_name) || ' RENAME "' || c.column_name || '" TO ' || quote_ident(lower(c.column_name)) || ';' As ddlsql | |
FROM information_schema.columns As c | |
WHERE c.table_schema NOT IN('information_schema', 'pg_catalog') | |
AND c.column_name <> lower(c.column_name) | |
ORDER BY c.table_schema, c.table_name, c.column_name; |