Skip to content

Instantly share code, notes, and snippets.

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE Map[
]>
<Map background-color="#FFFFFF" srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs">
<Style name="id-world-1">
<Rule>
<PolygonSymbolizer fill="#88aacc"/>
<PolygonPatternSymbolizer file="../images/dc-paper/noise_15.png"/>
./run.sh
Started TileMill on port 8889.
downloading http://localhost:8889/api/Project/newish?d5219c
/api/Project/newish?d5219c
downloading http://localhost:8889/api/Project/newone?7aefde
/api/Project/newone?7aefde
downloading http://localhost:8889/api/Project/brand_new?cc357f
/api/Project/brand_new?cc357f
downloading http://localhost:8889/api/Project/brand_new?21fc00
/api/Project/brand_new?21fc00
/* River lines */
.river { line-color: #acf; }
/* I am guessing as to the meaning of the CLASS column.
* This style appears mostly correct */
.river[zoom=7][CLASS=1] { line-width: 0.1; }
.river[zoom=8][CLASS=1] { line-width: 0.2; }
.river[zoom=9][CLASS=1] { line-width: 0.4; }
ndistro
... installing connect 0.3.0
######################################################################## 100.0%
... installing express 1.0.0
######################################################################## 100.0%
... installing bin/express
... installing knox 0.0.2
######################################################################## 100.0%
... installing sax-js v0.1.1
######################################################################## 100.0%
<Style name="road-line/__default__">
<Rule>
<MaxScaleDenominator>200000000</MaxScaleDenominator>
<Filter>([SOV_A3] = 'USA') and ([Type] = 'Secondary Highway')</Filter>
<LineSymbolizer stroke-width="0.4"
stroke="#ff0000"/>
</Rule>
<Rule>
<MaxScaleDenominator>200000000</MaxScaleDenominator>
<Filter>([SOV_A3] = 'USA') and ([Type] = 'Major Highway')</Filter>
#road[Type='Major Highway'][zoom>1],
#road[Type='Secondary Highway'][zoom>1] {
line-color:#B33;
}
/*#road[SOV_A3='USA'][Type='Major Highway'][zoom>1],
#road[SOV_A3='USA'][Type='Secondary Highway'][zoom>1] {
line-color:#F00;
}*/
/* Roads - Z2 */
#street::alley[SUBTYPE='STRALY'][zoom >= 13] {
line-color: #ccc;
[zoom=13] { line-width: .25; }
[zoom=14] { line-width: .5; }
[zoom>=15] { line-width: 1; }
}
#!/bin/bash
MERGEDNAME="school_districts"
OUTDIR="/tmp"
for INFILE in *.shp; do
OUTFILE="${OUTDIR}/${MERGEDNAME}.shp"
if test -e "$OUTFILE"; then
echo "Merging $INFILE..."
ogr2ogr -f "ESRI Shapefile" -update -append \
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE Map[
<!-- projections -->
<!ENTITY srs900913 '+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs'>
<!ENTITY srs4326 '+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs'>
]>
<Map>
#!/bin/sh
MERGEDNAME="all_counties"
OUTDIR="."
for INFILE in *.shp; do
OUTFILE="${OUTDIR}/${MERGEDNAME}.shp"
if test -e "$OUTFILE"; then
echo "Merging $INFILE..."
ogr2ogr -f "ESRI Shapefile" -update -append \