diff --git a/.gitignore b/.gitignore index 35ff231..01da23b 100644 --- a/.gitignore +++ b/.gitignore @@ -11,4 +11,5 @@ include/*.inc *.pyc errors.log geodata -tile \ No newline at end of file +tile +temp \ No newline at end of file diff --git a/README.md b/README.md index f18a985..1f7c9f5 100644 --- a/README.md +++ b/README.md @@ -131,8 +131,6 @@ To render a PDF, use renderToPdf() in toposm.py ## Credits ## -Created by Lars Ahlzen (lars@ahlzen.com), with contributions from Ian Dees (hosting, -rendering and troubleshooting), Phil Gold, Kevin Kenny (patches and style improvements), -Yves Cainaud (legend), Richard Weait (shield graphics) and others. +Created by Lars Ahlzen (lars@ahlzen.com), with contributions from Ian Dees (hosting, rendering and troubleshooting), Phil Gold (patches and style improvements), Kevin Kenny (improved NHD rendering, misc patches), Yves Cainaud (legend), Richard Weait (shield graphics) and others. License: GPLv2 diff --git a/custom-symbols/gaging-station.svg b/custom-symbols/gaging-station.svg new file mode 100644 index 0000000..537ada8 --- /dev/null +++ b/custom-symbols/gaging-station.svg @@ -0,0 +1,97 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/include/nhd.inc.templ b/include/nhd.inc.templ index 1318d34..be22214 100644 --- a/include/nhd.inc.templ +++ b/include/nhd.inc.templ @@ -1,166 +1,325 @@ + - - + + + - - - - - + + + + diff --git a/include/nhdfcodes.inc.templ b/include/nhdfcodes.inc.templ new file mode 100644 index 0000000..934fdb3 --- /dev/null +++ b/include/nhdfcodes.inc.templ @@ -0,0 +1,51 @@ + + + + + + + + + + + + diff --git a/templates/features.xml.templ b/templates/features.xml.templ index d8a42a5..653ca1a 100644 --- a/templates/features.xml.templ +++ b/templates/features.xml.templ @@ -2,23 +2,25 @@ + - - - - - - - - - - - - - - - %utils; - %colors; + + + + + + + + + + + + + + + %utils; + %colors; + %nhdfcodes; ]> @@ -236,83 +238,141 @@ - - - water-outline-lowzoom - - &dbsettings; &extents; - (SELECT way, fcode, ftype, areasqkm as size FROM ${NHD_TABLE_PREFIX}_area_major) AS nhdarea - - - - water-outline-lowzoom - - &dbsettings; &extents; - (SELECT way, fcode, ftype, areasqkm as size FROM ${NHD_TABLE_PREFIX}_waterbody_major) AS nhdwaterbody - - - - water-outline-lowzoom - - &dbsettings; &extents; - (SELECT way, fcode, ftype, lengthkm as size FROM ${NHD_TABLE_PREFIX}_flowline_major) AS nhdarea - - - - water-fill-lowzoom - - &dbsettings; &extents; - (SELECT way, fcode, ftype, areasqkm as size FROM ${NHD_TABLE_PREFIX}_area_major) AS nhdarea - - - - water-fill-lowzoom - - &dbsettings; &extents; - (SELECT way, fcode, ftype, areasqkm as size FROM ${NHD_TABLE_PREFIX}_waterbody_major) AS nhdwaterbody - - + - - - water-outline - playas - wetlands - - &dbsettings; &extents; - (SELECT way, fcode, ftype, areasqkm FROM ${NHD_TABLE_PREFIX}_waterbody) AS nhdwaterbody - - - - water-outline - - &dbsettings; &extents; - (SELECT way, fcode, ftype, areasqkm FROM ${NHD_TABLE_PREFIX}_area) AS nhdarea - - - - water-outline - - &dbsettings; &extents; - (SELECT way, fcode, ftype, lengthkm FROM ${NHD_TABLE_PREFIX}_flowline) AS nhdflowline - + + + + nhd-flowline-lowzoom + + &dbsettings; &extents; + + (SELECT way, fcode, gnis_name, lengthkm AS size + FROM ${NHD_TABLE_PREFIX}_flowline_major + WHERE fcode = 55800) AS areafeature + + - - water-fill - ice - - &dbsettings; &extents; - (SELECT way, fcode, ftype, areasqkm FROM ${NHD_TABLE_PREFIX}_waterbody) AS nhdwaterbody - + + nhd-flowline + + &dbsettings; &extents; + + (SELECT way, fcode, gnis_name, lengthkm AS size + FROM ${NHD_TABLE_PREFIX}_flowline + WHERE fcode = 55800) AS areafeature + + - - water-fill - - &dbsettings; &extents; - (SELECT way, fcode, ftype, areasqkm FROM ${NHD_TABLE_PREFIX}_area) AS nhdarea - + + + + nhd-water-fill-lowzoom + + &dbsettings; &extents; + + (SELECT way, fcode, gnis_name, areasqkm AS size + FROM ${NHD_TABLE_PREFIX}_area_major + UNION + SELECT way, fcode, gnis_name, areasqkm AS size + FROM ${NHD_TABLE_PREFIX}_waterbody_major) AS areafeature + + + + + nhd-water-fill + + &dbsettings; &extents; + + (SELECT way, fcode, gnis_name, areasqkm AS size + FROM ${NHD_TABLE_PREFIX}_area + UNION + SELECT way, fcode, gnis_name, areasqkm AS size + FROM ${NHD_TABLE_PREFIX}_waterbody) AS areafeature + + + + + + + nhd-water-outline-lowzoom + + &dbsettings; &extents; + + (SELECT way, fcode, gnis_name, areasqkm AS size + FROM ${NHD_TABLE_PREFIX}_area_major + UNION + SELECT way, fcode, gnis_name, areasqkm AS size + FROM ${NHD_TABLE_PREFIX}_waterbody_major) AS areafeature + + + + + nhd-water-outline + + &dbsettings; &extents; + + (SELECT way, fcode, gnis_name, areasqkm AS size + FROM ${NHD_TABLE_PREFIX}_area + UNION + SELECT way, fcode, gnis_name, areasqkm AS size + FROM ${NHD_TABLE_PREFIX}_waterbody) AS areafeature + + + + + + + nhd-nonwater-fill + + &dbsettings; &extents; + + (SELECT way, fcode, gnis_name, areasqkm AS size + FROM ${NHD_TABLE_PREFIX}_area + WHERE fcode IN ( 34300, 34305, 34306, 36400, 37300, + 43100, 45400, 45403, 45500, 46100 ) + ORDER BY size DESC) AS areafeature + + + + + + nhd-flowline-lowzoom + + &dbsettings; &extents; + + (SELECT way, fcode, gnis_name, lengthkm AS size + FROM ${NHD_TABLE_PREFIX}_flowline_major + WHERE fcode <> 55800) AS linefeature + + + + + nhd-flowline + + &dbsettings; &extents; + + (SELECT way, fcode, gnis_name, lengthkm AS size + FROM ${NHD_TABLE_PREFIX}_flowline + WHERE fcode <> 55800) AS linefeature + + + + + + nhd-nonwater-line + + &dbsettings; &extents; + + (SELECT way, fcode, gnis_name, lengthkm AS size + FROM ${NHD_TABLE_PREFIX}_line) AS linefeature + + + nature-areas @@ -351,6 +411,17 @@ + + nhd-point + + &dbsettings; &extents; + + (SELECT way, fcode, gnis_name FROM ${NHD_TABLE_PREFIX}_point) + AS pointfeature + + + + buildings