Archive for the 'Geomensch' Category

Wrapping up Gov 2.0 Camp New England

Gov 2.0 Camp New EnglandI had a fantastic time yesterday at Gov 2.0 Camp New England and enjoyed the event a lot. In particular I was very impressed by the interest of the public sector. I wouldn’t say it’s typical that an event, held on a Saturday, which happens to be the first nice spring day in Boston, attracts so many government employees, ranging from the governor’s office to local town administrations, and affiliated organizations. Throughout the event you could feel the commitment to work on better and more inclusive governance at all levels.

My personal highlight was the first session I attended, about Open 311. It’s clearly not my core area, but I’m interested in the current development and felt that I learned a lot in that session. One of the most interesting points during the discussion was the evaluation of “Resistat”. Resistat is an initiative to include residents in 311 statistics in Somerville. It works very simple: a mailing-list facilitates communication and statistics and results are sent out to residents as powerpoint files. Not rocket science, but it’s enough communication technology that even though only about 25% of involved residents have been to in-person meetings, 85% of them say that they feel better engaged with their local government (by sending powerpoints to a mailing list, it’s as simple as that!). Anyway, great insights when talking about the “town hall meeting divide”, can’t wait to read the entire study about the program.

Our session about Open Data Strategies was “merged” together with I think 5 other sessions that had the word “data” in the title. Unfortunately it didn’t really work out as we intended it and the discussion went somehow all over the place. Better luck next time I guess.

The last session I picked was all about data visualization. Two young IBM researchers showed and demoed amazing data visualization tools – Many Eyes and sense.us among them. Their latest project, called “IBM Visual Bill explorer”, should make it easy for citizens to visually explore and analyze legal texts. Tremendously valuable when trying to understand or to find potential pitfalls in 1000+ pages documents written by lawyers, as bills usually are.

On a side note: I had absolutely no idea that IBM is running such a great research department. Where are marketing departments when you really need them?

Happy hour – free beer was involved – went straight to talking GIS and Open Source. As it turned out, there are very similar problems across gov agencies (surprising, huh!). One notion during the discussion was, that, instead of throwing money individually at our problems, why not join forces and contribute to and customize Open Source projects where we all benefit from? Interesting thought, will be continued…

Python Flickr API geo-search example

I just started using the wonderful flickrapi Python interface for, well, searching Flickr for geocoded photos around given locations. It’s fairly easy to use and does most things for you. You start with a Flickr API object…


import flickrapi
api_key = '1234567890'
flickr = flickrapi.FlickrAPI(api_key, cache=True)

…replace some dots with underscores in the Flickr API methods…


photos = flickr.photos_search(tags='boston', lat='42.355056', lon='-71.065503', radius='5')

…and loop through the parsed results…


for photo in photos[0]:
	print photo.attrib['title']
	photoLoc = flickr.photos_geo_getLocation(photo_id=photo.attrib['id'])
	print photoLoc[0][0].attrib['latitude']
	print photoLoc[0][0].attrib['longitude']
	photoSizes = flickr.photos_getSizes(photo_id=photo.attrib['id'])
	print photoSizes[0][1].attrib['source']

…done.

The above code example lists title, latitude, longitude and thumbnail-source of photos found in a 5km radius search around the Boston Common.

Crowdsourcing bicycle routes

If I had to think of a solution to start creating a bicycle routing system, I’d do exactly what The San Francisco County Transportation Authority has done: create smart phone apps, gather information where cyclists are riding, data mine those tracks and build route suggestions on top of that knowledge.

Bicycle routing is in my opinion far more complex than car routing. Car routing is mostly based on well known and documented rules, also known as road traffic regulations. Mix in estimated traffic figures, average speeds and fuel consumptions and you get pretty decent car directions.

For cyclists, a similar rule set exists, but it’s maybe a little more, let’s call it, elastic. Cyclists use short-cuts, turn where cars can’t, go against traffic, ride through parks and on poorly documented trails. High traffic doesn’t mean slowdown for cyclists. They ride by on the bike lane on the right side of a traffic jam at almost the same speed as without traffic. But high traffic creates a security risk some cyclists aren’t comfortable with taking and rather choose a different route.

A perfect route from A to B for speedy messengers doesn’t necessarily mean it’s also an ideal route for kids. For your daily commute you probably pick another route than for weekend rides, even though it connects the same points.

Bicycle routing criteria is manifold, sometimes psychological, hard to measure and to quantify. Researching how cyclists are going, for what purpose and under what conditions, is a very smart way to get started on that topic.

Re-projecting vectors in JavaScript

I know, it eventually all boils down to maths. But it still blows my mind that you can re-project geographic features on-the-fly with a few lines of JavaScript in a web browser.

How?

There is this great library PROJ.4, that does everything you’d ever want in terms of cartographic projections. A few smart people have ported PROJ.4 to JavaScript, called Proj4js then.

Proj4js works great in combination with OpenLayers, a popular JavaScript web mapping framework, and allows on-the-fly projections between any spatial reference systems browser applications.

<script src="proj4js-compressed.js"></script>
<script src="http://openlayers.org/api/OpenLayers.js"></script>

Define the spatial reference you’re planning to use. Check Spatial Reference for the exact projection parameters and include them in your code.

Proj4js.defs["EPSG:26986"] = "+title=Massachusetts Mainland NAD83 +proj=lcc +lat_1=42.68333333333333 +lat_2=41.71666666666667 +lat_0=41 +lon_0=-71.5 +x_0=200000 +y_0=750000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs";

Adding all desired projections to the OpenLayers script…

projOSM = new OpenLayers.Projection("EPSG:900913");
projWGS84 = new OpenLayers.Projection("EPSG:4326");
projMassGIS = new OpenLayers.Projection("EPSG:26986");

map = new OpenLayers.Map ("map", {
	maxExtent: new OpenLayers.Bounds( -20037508.34, -20037508.34, 20037508.34, 20037508.34),
	maxResolution: 156543.0399,
	units: 'm',
	projection: projOSM,
	displayProjection: projWGS84,
	allOverlays: false
});

osm = new OpenLayers.Layer.OSM(
	"OpenStreetMap",
       "http://tile.openstreetmap.org/${z}/${x}/${y}.png"
);

openspace = new OpenLayers.Layer.WFS("Open space", "http://giswebservices.massgis.state.ma.us/geoserver/wfs", {
	typename: "massgis:GISDATA.OPENSPACE_POLY"
}, {
	projection: projMassGIS
	attribution: "<a href='http://www.mass.gov/mgis/'>MassGIS</a>"
});

…results in an interactive map with MassGIS Open Space WFS vector features overlayed on an OpenStreetMap base layer, using WGS84 lat/lon as display coordinates.

On a sidenote: OpenLayers comes with a Python proxy to retrieve information from remote servers via an XMLHttpRequest. Here is a good how-to get Python play well with IIS 6 on Windows Server 2003, which was quite useful.

Don’t forget to add the domains you’re trying to access to the Python proxy. For MassGIS you would add following string for instance:

allowedHosts = ['giswebservices.massgis.state.ma.us']

Heating up SVG

Last week I came over Raphaël, a great JavaScript library for vector graphics visualizations, and I started playing around with maps and SVG again. Long time no see!

To bring some map content from ArcMap to Raphaël I used the VBA Macro I wrote 4 years ago in ArcMap. It still does the job and gives me clean vector graphics the way I want them. I couldn’t find a decent SVG export option for QGIS, although there are some efforts to improve that kind of functionality.

AsSVG, a Python geoprocessing script for ArcGIS is pretty good too. It provides some nice export options, such as pick style and data attribute fields, and I actually ended up using it a lot.

However, it’s 2009 and there are other ways available for sharing code then just providing a plain text file. So I ended up wrapping a bitbucket repository around it. Just in case if somebody is interested in working on or improving the script…

What can Towns learn from OpenStreetMap?

Last week at the Ignite Spatial: Boston event I gave a short talk – 5min, 20 automated slides, 15sec each – about OpenStreetMap and why I think it can be interesting for town administrations to look at the OpenStreetMap model. In a nutshell:

  • OpenStreetMap is successfully based on open crowdsourcing, a horizontal multi-directional work-flow model, to build and maintain the world’s largest free geospatial database.
  • Open crowdsourcing helps to collect local knowledge across your residents, improve local geospatial data, engage residents and provide a 24/7 feedback loop for them.
  • Wide variety of data and information distribution: OpenStreetMap allows output from raw data access for developers to print map renderings for tourists.
  • Built-in data interoperability: no matter how many or in what part of the world people are contributing to the project, it all fits together to one piece.

Bottom line: towns should take a serious look at OpenStreetMap and the underlying model. It’s proven to work in many places and provides some valid points town administrations can benefit from.

There should be videos of all presentations online at some point. My colleagues Holly and Chris talked about our 3D video game/planning participation project in Chinatown and about the 10 most wanted data sets (and one state GIS department at stake) we would like to see to for better planning decisions in the Metro Boston region.

Update: Videos of Ignite Spatial: Boston are now available on YouTube. That’s me, struggling through the format ;-)

Massachusetts transit data

The EOT here in Massachusetts does it (very well btw) and is receiving much attention: sharing raw governmental data and information.

Their motivation is quite simple: as public agency they collect, produce and hold lots of data and information. Eventually they want to see this information and data out there used by and helping people through services and applications. Instead of putting to much energy in internal developments, they decided to approach developer communities and ask what they’d need to build applications around EOT data. A very smart move if you ask me. They save costs on their side and attract a big creativity and innovation potential from a broad developer community at the same time.

The first result of that initiative several open data feeds, posted on the EOT developers page. If you’re interested in (Massachusetts) transit data you should do two three things:

  1. check out the EOT developers page
  2. join their Google Group for getting support or leaving feedback
  3. and sign-up for the Open Government Hack Day held on Sep 27th, hosted by BetaHouse in Cambridge.

Public transit mock-ups

Ever wanted to know what your local subway map would look like?

The designers at Transit Authority Figures might provide an answer. They did some great work in designing subway maps for small towns without public transportation. One interesting map detail is actually the wording: the station names are well chosen, with good local knowledge, not one of those “funny” naming schemas, and it almost makes you believe you’re viewing a real one.

Cape Cod & The Islands Metropolitan Area

Adventures in Nokia Maps pt. 4: pedestrian navigation

The tricky part of pedestrian navigation is, that it actually involves a lot of refinement work on current base maps in order to provide a good service. Using regular digital road maps, as we know them in Google Maps for instance, is just not possible. Pedestrians need different information. Most maps currently used in navigation devices are made by and for people in cars, moving at 35km/h and faster. As pedestrian you move slower, on other paths and parts of the street, your orientation senses work differently, you notice other landmarks, signs, use short-cuts, cross streets randomly and can make u-turns whenever you want to.

Nokia Maps 3.0 has some enhancements aimed to help pedestrians. I especially found the 3D-like landmark drawings on the map and the continuous reverse geocoding very helpful. I think I already mentioned in an earlier post the very well done cartography, optimized for smaller displays.

Walking directions work in most cases well. Nokia Maps knows the park next to the subway station I often use and shows me the shortest path to it.

Nokia Maps pedestrian navigation

Seems an easy task, but Google Maps, based on TeleAtlas’ road network in that area, shows some fantasy foot paths inside the park and suggests another route circling around.

Google Maps pedestrian navigation

OpenStreetMap shows the real layout of all foot paths in the park and provides good walking directions (by OpenRouteService) too.

Bruno-Kreisky-Park in OpenStreetMap with walking directions

The quality of the returned walking directions depend on the strength of the GPS signal in some cases. If it’s weak, Nokia Maps doesn’t dare to send you out to take a walk on a three lane street full with speeding cars.

Imagine you step out the subway station and ask Nokia Maps for the shortest way walking to your destination. If you’re lucky and the signal is good, Nokia Maps snaps you to the right street and returns good results.

Nokia walking directions

Let’s assume it’s a bad GPS day and your signal is about 10m off, happens quite frequently in urban areas. Nokia snaps you on a 3 car-lane street and suggest you start walking there. Not good.

Nokia walking directions problem

That’s what the situation looks like on the aerial. The subway station was under construction then, but there is an exit next to the containers. Anyways, a pedestrian navigation service should never propose walking on that road.

Aerial

Other services I tried in that area had some problems too. Google Maps sent you on the same road. OpenRouteService basically returned a good walking route, but didn’t know that you had to jump off a 3m wall to reach the nice foot path along the canal.

Digitalks GeoServices

A week ago Helge and I were invited to host a Digitalks session about GeoServices. Digitalks is an interesting event series in Vienna, aimed to explain recent media and technology developments to a “normal”, not so tech-savvy audience. Meral, the woman behind Digitalks, usually tries to invite early adopters or enthusiasts who are passionate about media and technology to host a session. There’s no PowerPoint in Digitalks, only live demos and hands-on are allowed, which is good and makes the presentations very lively, although it doesn’t always work as expected.

Anyways, I felt honored to be invited and talk a little about GeoServices. Helge did a brilliant job in presenting OpenStreetMap and explaining the revolutionary aspects of the project. I tried to give an overview of the grown variety of geographic applications in the internet since the first appearance of map mashups in 2005 and showing some recent location based services on a mobile device. If I’d have had a closer look at the attendees list first, I probably would’ve had chosen a few other things to demo. The ratio expert/novice of the audience was actually more leaning towards expert, so I hope it wasn’t too obvious for most people.

Thanks again to Meral for inviting us and many thanks to Luca for taping the session on video!

PS: the next Digitalks is about Microblogging, hosted by Twitter, should be interesting!