Videos

http://pyvideo.org

To Watch Later

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

  • Enthought continues to be the big player in this sector; you can do pretty cool stuff with their Chaco library e.g. developing GUIs (for desktop and web from same py controls) which do ass kicking data visualization. Enthought does consulting and project development; minimum job is about 150k
  • Peter Wang, formerly at Enthought, has founded Continuum Analytics and also does really cool data visualization.
  • One should use mmap module for large arrays.
  • pytables/h5py/pyhdf are all solid libraries for using hdf5 files. h5y has less overhead as it's written in C and is closer to the actual library calls. It's a bit faster on slicing.
  • When discussing R with people, inevitably they would bring up pandas. Need to check this out as people seem to think of it as a good R alternative.

Random Notes

  • Process introspection for GeoServer should be able to be done with jconsole and jstack
  • Parallel python can turn off the GIL and use OpenMP (see final lightning talk session where he uses Multiprocess.map or something)
  • When using the PostgreSQL date type, one should use the with_tz type and store as UTC. You can set the TZ variable on a per connection, per user, or per applications basis such that the client receives the time in whatever TZ they specify. This was recommended by one of the PostgreSQL core developers.
  • Keep both PostgreSQL and TZ database updated! Administrative timezone updates come in almost once a month!
  • scikit-learn looks like an awesome machine learning library. And there is also pyml and mlpy
-----



blog comments powered by Disqus

Published

12 March 2012

Category

work

Tags