Skip to content

Instantly share code, notes, and snippets.

View wboykinm's full-sized avatar

Bill Morris wboykinm

View GitHub Profile
@wboykinm
wboykinm / IRC log
Created September 10, 2012 21:25
SQL API Call
[13:28:43] <wboykinm> tokumine: This is getting a bit down the PostGIS rabbit hole, but is it possible to make a call to the SQL API that:
[13:28:51] <wboykinm> tokumine: 1.) selects a single polygon feature
[13:29:02] <wboykinm> 2.) buffers out from that feature by x distance
[13:29:25] <wboykinm> 3.) "Differences" the buffer and the feature
[13:29:47] <wboykinm> 4.) returns the geometry of the buffer outside the feature
[13:29:48] <wboykinm> ?
[13:31:13] <wboykinm> tokumine: i.e. the API call would return this sort of geometry: http://flic.kr/p/d9umR3
[14:09:15] <wboykinm> tokumine: A better way of phrasing the above:
[14:09:42] <wboykinm> tokumine: Does the SQL API support using both ST_Buffer() and ST_Difference() in one call?
[15:14:16] <strk> yes :)
@wboykinm
wboykinm / tilemill.log
Created September 11, 2012 14:48
crash followed by success (with some plugins loaded in between)
[tilemill] Started [Server Core:20009].
[tilemill] Client window created (pass --server=true to disable this)
[tilemill] path.exists is now called `fs.exists`.
[tilemill] [tilemill-ui] Note: Unknown option "updatesVersion" in config file.
[tilemill] [tilemill-ui] Note: Unknown option "updatesTime" in config file.
[tilemill] [tilemill-ui] path.exists is now called `fs.exists`.
[tilemill] [tilemill-ui] Rendering export
[tilemill] [tilemill-ui] Persisting state in C:\Users\William Morris\Documents\MapBox\export\bluemarble2.export every minute
[tilemill] [tilemill-ui] Completing export process
[tilemill] [tilemill-ui] Exiting process [tm-bluemarble2.mbtiles]
@wboykinm
wboykinm / tilemill.log
Created September 13, 2012 19:44
Tilemill Log 091312
Starting TileMill...
Note: Unknown option "updatesVersion" in config file.
Note: Unknown option "updatesTime" in config file.
[tilemill] Note: Unknown option "updatesVersion" in config file.
[tilemill] Note: Unknown option "updatesTime" in config file.
[tilemill] Started [Server Tile:20008].
[tilemill] Plugin [carto] loaded.
[tilemill] Plugin [editor] loaded.
[tilemill] Plugin [fonts] loaded.
[tilemill] Plugin [templates] loaded.
@wboykinm
wboykinm / index.html
Created September 14, 2012 13:46
Raw HTML of blog post re: Buffalo Tinting
Since the ancient days - well, since late 1993 or so - production cartographers have been been stuck in an awkward technical limbo between GIS and art. <a href="http://www.gsd.harvard.edu/gis/manual/illustrator/index.htm" target="_blank">Two platforms</a> were required to get a map from vector geoprocessing to publication-quality graphics: Mostly ESRI's ArcGIS for the former and mostly Adobe's Creative Suite for the latter. Sure the two tried to overlap each other as time went on ("Seven hours to export a 900dpi TIFF and I can still see the pixels? Thanks ArcMap!"), but the basic math was tough to overcome: with finite memory on a workstation, ArcGIS focuses its resources on geoprocessing at the expense of the graphic outputs, and vice-versa.<br />
<br />
This was the way of it when I started mapping. And the classic example of "You can't do that in GIS" is the buffalo tint <a href="http://maps.nationalgeographic.com/maps/print-collection/sagarmatha-national-park-map.html" target="_blank">popularized and used
@wboykinm
wboykinm / awesome.sql
Created September 17, 2012 00:47
month qualifier
UPDATE btv_burg SET month = 'February' WHERE substring(date2 from 4 for 7) = '02-2012'
@wboykinm
wboykinm / config.dist.xml
Created September 18, 2012 05:24
Config file for BTV DB
<!-- The application element that contains all other elements. -->
<DistrictBuilder>
<!-- Define legislative bodies referenced in the system. -->
<LegislativeBodies>
<!-- A Legislative body has an ID (for referencing in GeoLevel
definitions later), a name, and a label for plan items
("District" for Council, etc) -->
<LegislativeBody id="council" name="Burlington City Council" member="Ward %s" maxdistricts="7"/>
</LegislativeBodies>
@wboykinm
wboykinm / config1.xml
Created September 20, 2012 15:14
DB config examples
<LegislativeBodies>
<!-- A Legislative body has an ID (for referencing in GeoLevel
definitions later), a name, and a label for plan items
("District" for Council, etc) -->
<LegislativeBody id="council" name="Burlington City Council" short_label="%(district_id)s" long_label="Ward %(district_id)s" maxdistricts="7" sort_key="1"/>
</LegislativeBodies>
@wboykinm
wboykinm / setup.log
Created September 20, 2012 15:37
DB setup
root@ip-10-80-85-229:/projects/DistrictBuilder/django/publicmapping# ./setup.py -v2 ../../docs/config.xsd ../../docs/config.xml
The data does not conform to the provided schema.
../../docs/config.xml:32:0:ERROR:SCHEMASV:SCHEMAV_ELEMENT_CONTENT: Element 'Scoring': Missing child element(s). Expected is ( ScoreFunctions ).
../../docs/config.xml:302:0:ERROR:SCHEMASV:SCHEMAV_ELEMENT_CONTENT: Element 'GeoLevelCharacteristics': This element is not expected. Expected is ( Description ).
../../docs/config.xml:460:0:ERROR:SCHEMASV:SCHEMAV_CVC_COMPLEX_TYPE_3_2_1: Element 'BardConfig', attribute 'temp': The attribute 'temp' is not allowed.
../../docs/config.xml:460:0:ERROR:SCHEMASV:SCHEMAV_ELEMENT_CONTENT: Element 'BardConfig': Missing child element(s). Expected is ( RatioVars ).
../../docs/config.xml:234:0:ERROR:SCHEMASV:SCHEMAV_CVC_IDC: Element 'Score': No match found for key-sequence ['a_council_plan_equipopulation_validation'] of keyref 'CriterionScore'.
../../docs/config.xml:238:0:ERROR:SCHEMASV:SCHEM
@wboykinm
wboykinm / setup.log
Created September 20, 2012 16:46
DB config errors
root@ip-10-80-85-229:/projects/DistrictBuilder/django/publicmapping# ./setup.py -v2 ../../docs/config.xsd ../../docs/config.xml
The data does not conform to the provided schema.
../../docs/config.xml:49:0:ERROR:SCHEMASV:SCHEMAV_ELEMENT_CONTENT: Element 'ScorePanels': This element is not expected.
../../docs/config.xml:57:0:ERROR:SCHEMASV:SCHEMAV_ELEMENT_CONTENT: Element 'Criteria': Missing child element(s). Expected is ( Criterion ).
../../docs/config.xml:113:0:ERROR:SCHEMASV:SCHEMAV_ELEMENT_CONTENT: Element 'GeoLevelCharacteristics': This element is not expected. Expected is ( Description ).
../../docs/config.xml:44:0:ERROR:SCHEMASV:SCHEMAV_CVC_IDC: Element 'ScoreDisplay': No match found for key-sequence ['ward'] of keyref 'ScoreDisplayLegislativeBody'.
../../docs/config.xml:45:0:ERROR:SCHEMASV:SCHEMAV_CVC_IDC: Element 'ScorePanel': No match found for key-sequence ['panel1'] of keyref 'ScoreDisplayScorePanel'.
../../docs/config.xml:57:0:ERROR:SCHEMASV:SCHEMAV_CVC_IDC: Element 'Criteria': No ma
@wboykinm
wboykinm / config.dist.xml
Created September 20, 2012 16:54
DB current status config
<!-- The application element that contains all other elements. -->
<DistrictBuilder>
<!-- Define legislative bodies referenced in the system. -->
<LegislativeBodies>
<!-- A Legislative body has an ID (for referencing in GeoLevel
definitions later), a name, and a label for plan items
("District" for Council, etc) -->
<LegislativeBody id="council" name="Burlington City Council" short_label="%(district_id)s" long_label="Ward %(district_id)s" maxdistricts="7" sort_key="1"/>
</LegislativeBodies>