Notes from PyCon 2012
Videos
To Watch Later
- Python for Open Data Lovers
- Fast tests/slow tests and Eric Rose's testing talk (when available)
Web mapping notes
Tutorial completely built up a working "map sandwhich" in 3 hour with live coding. It was amazing. The instructor used GeoDjango as a web service framework, Cloudmade to offload the basemap creation and tile rendering and Leaflet as a front-end JavaScript library.
Random GeoDjango stuff from the talk
- $ python manage.py syncdb
- syncs up the model with the database, creating the tables as it goes
- >>> objects.filter == awesome
- Subclassing a model is a PITA, b/c you have to override all of the defaults.
- A reminder that Django URL patterns make it hella-easy to write a good web-app that does a variety of things.
- Uses its object relational model (ORM) for rendering tiles
In HTML/JS land
- Leaflet doesn't require jquery (I can't remember why that was important)
- Leaflet was written by the folks at Cloudmade so it probably has pretty good integration with their tools
- "console.log"
- One has the ability to set the "clickable" attribute on features loaded into Leaflet to allow client-side interaction with them.
Basemaps
- The Mapquest API apparently gives you an API for downloading OSM data while specifying an arbitrary bounding box
- Instructor used Cloudmade's "Midnight Commander" for a basemap that stay's out of your way
- TileMill provides a "nice front-end on top of Mapnik". Turns out that it's a really good looking GUI for stylizing the base maps... _way_ better than hacking at SLD XML.
- Acetate (?) is a carto/CSS repository for providing a baseline of different map styles
TileStash
- This can be the glue between everything
- May render GDAL datasources in the future
- Does caching, could be an excellent replacement for GeoWebCache
- would need to use some cache busting strategy like adding a get variable on the end of the URL with timestamp or something
- Can define own projections
- Can do compositing of multiple layers, however you specify it
- Looks really good
With respect to other projections, Paul Smith gave a nice example</a. of rendering mapnik in other projections
Scientific Python
Random Notes
-----
blog comments powered by Disqus