<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.0.12-alpha" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>From the Labs</title>
	<link>http://labs.metacarta.com/blog</link>
	<description>MetaCarta Labs Weblog</description>
	<pubDate>Wed, 06 Aug 2008 14:01:08 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.12-alpha</generator>
	<language>en</language>
			<item>
		<title>Join MetaCarta</title>
		<link>http://labs.metacarta.com/blog/29.entry/join-metacarta/</link>
		<comments>http://labs.metacarta.com/blog/29.entry/join-metacarta/#comments</comments>
		<pubDate>Wed, 06 Aug 2008 13:55:34 +0000</pubDate>
		<dc:creator>crschmidt</dc:creator>
		
		<category>Uncategorized</category>

		<guid isPermaLink="false">http://labs.metacarta.com/blog/29.entry/join-metacarta/</guid>
		<description><![CDATA[MetaCarta Labs is looking for a new employee again. 
MetaCarta Labs is a small team of enthusiastic, fast paced developers working directly under the CTO to develop prototypes and new products and facilitate developer outreach. MetaCarta Labs is taking a key role in geo-enabling the Web &#8212; helping existing content owners to add geographic information [...]]]></description>
			<content:encoded><![CDATA[<p>MetaCarta Labs is <a href="http://labs.metacarta.com/join/">looking for a new employee</a> again. </p>
<blockquote><p>MetaCarta Labs is a small team of enthusiastic, fast paced developers working directly under the CTO to develop prototypes and new products and facilitate developer outreach. MetaCarta Labs is taking a key role in geo-enabling the Web &#8212; helping existing content owners to add geographic information to their content &#8212; and has a long history of working with external developer communities through open source projects and conferences.</p></blockquote>
<p>I&#8217;ve been working at MetaCarta for two years, and I&#8217;ve really had a great time there. Some of the smartest people I know are my coworkers, and I&#8217;ve learned more working with them than I have anywhere else. I&#8217;ve travelled to conferences in other countries, met people from around the world, worked on several open source projects, and directly participated in a number of interesting revenue-building things within the company.</p>
<p>Interest in geo a must: experience in geo optional. We&#8217;re looking for a web hacker, primarily: interest and experience in HTML and JS is pretty much a prerequisite for what we&#8217;re looking for at the moment. </p>
<p>It&#8217;s a cool gig: if you know anyone who might be interested, feel free to send them our way: Contact information is available in the link above.
</p>
]]></content:encoded>
			<wfw:commentRss>http://labs.metacarta.com/blog/29.entry/join-metacarta/feed/</wfw:commentRss>
		</item>
		<item>
		<title>GeoJSON 1.0 Release</title>
		<link>http://labs.metacarta.com/blog/28.entry/geojson-10-release/</link>
		<comments>http://labs.metacarta.com/blog/28.entry/geojson-10-release/#comments</comments>
		<pubDate>Mon, 16 Jun 2008 18:02:56 +0000</pubDate>
		<dc:creator>crschmidt</dc:creator>
		
		<category>Uncategorized</category>

		<guid isPermaLink="false">http://labs.metacarta.com/blog/28.entry/geojson-10-release/</guid>
		<description><![CDATA[From the GeoJSON mailing list:
The GeoJSON Authors are proud to announce the finalization of the GeoJSON 1.0 Specification.
Representing more than a year&#8217;s worth of community discussion and development, the GeoJSON specification describes an easy to use, extensible format for transferring geographic data over the web. With support in more than 20 different applications, GeoJSON is [...]]]></description>
			<content:encoded><![CDATA[<p>From the <a xhref="http://lists.geojson.org/pipermail/geojson-geojson.org/2008-June/000454.html">GeoJSON mailing list</a>:</p>
<blockquote><p>The GeoJSON Authors are proud to announce the finalization of the GeoJSON 1.0 Specification.</p>
<p>Representing more than a year&#8217;s worth of community discussion and development, the GeoJSON specification describes an easy to use, extensible format for transferring geographic data over the web. With support in more than 20 different applications, GeoJSON is already quickly becoming a de facto standard for transferring geographic data in a JSON format. The finalization of the spec represents the final step in formalizing the GeoJSON format for encoding this data.</p>
<p>More information on GeoJSON can be found at http://geojson.org/ , or from the GeoJSON mailing list at http://lists.geojson.org/listinfo.cgi/geojson-geojson.org .</p></blockquote>
<p>FeatureServer and OpenLayers, two pieces of software originally created with MetaCarta Labs, are both heavy supporters of GeoJSON, and have been following the spec for more than a year now. It&#8217;s great to finally have this done and published as a &#8216;final&#8217; 1.0 release.
</p>
]]></content:encoded>
			<wfw:commentRss>http://labs.metacarta.com/blog/28.entry/geojson-10-release/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Geographic Queries on Google App Engine</title>
		<link>http://labs.metacarta.com/blog/27.entry/geographic-queries-on-google-app-engine/</link>
		<comments>http://labs.metacarta.com/blog/27.entry/geographic-queries-on-google-app-engine/#comments</comments>
		<pubDate>Wed, 28 May 2008 15:11:48 +0000</pubDate>
		<dc:creator>crschmidt</dc:creator>
		
		<category>Uncategorized</category>

		<guid isPermaLink="false">http://labs.metacarta.com/blog/27.entry/geographic-queries-on-google-app-engine/</guid>
		<description><![CDATA[Google App Engine is an interesting platform. It allows for you to run Python applications on Google&#8217;s platform, using BigTable based datasources as a backing store. Publishing applications to App Engine is trivial, and if you&#8217;ve written your application to support WSGI, porting to getting things running on App Engine is pretty easy.
However, there are [...]]]></description>
			<content:encoded><![CDATA[<p>Google App Engine is an interesting platform. It allows for you to run Python applications on Google&#8217;s platform, using BigTable based datasources as a backing store. Publishing applications to App Engine is trivial, and if you&#8217;ve written your application to support WSGI, porting to getting things running on App Engine is pretty easy.</p>
<p>However, there are some limitations placed on BigTable datastources that make doing geographic queries more difficult than it might otherwise be. Understanding of querying/indexing two-dimensional/geographical data is something that is typically a database extension &#8212; in Postgres, this is the PostGIS extension to the database, for example. BigTable has no inherent understanding of this type of data, so we have to drop to a more naive implementation. A first pass approximation at bounding box queries might be to create a four-tuple of columns in your datasource: left, bottom, right, top, and store the extent in that datasource. In a typical relational database, this would work reasonably well, though your database wouldn&#8217;t truly be indexing both dimensions at once: instead, you&#8217;d be using a single dimensional index, and then filtering the result as a second pass.</p>
<p>App Engine doesn&#8217;t allow this type of query, however: an application can&#8217;t perform inequality queries on more than one field at once. The naive implementation, of x < right and x > left, then, will fail: left and right are different fields, and you can&#8217;t do queries of that type.</p>
<p>So, the key is clearly to encode the bounding box of features in a way that embeds the data into a single string, which represents the bounding box accurately, but is also &#8216;ordered&#8217; &#8212; such that a point represented by &#8216;123&#8242; is near a point represented by &#8216;1234&#8242;. </p>
<p>The default response to this &#8212; for points &#8212; is to use <a href="http://geohash.org/">Geohash</a> (<a href="http://en.wikipedia.org/wiki/Geohash">Wikipedia</a>). Geohash embeds location information for a point into a single, ordered string, for which you can drop precision by simply dropping bits off the end of the string. For points, this actually works relatively well: a given point will be between two geohash values for the corners of a bounding box. So, if you have -71,42, and a Geohash of &#8216;drmwbmg7sp6yf&#8217;, and you do a query for -72,41 -> -70, 43, you have limits of &#8216;drkc1xg4q3uy8&#8242; and &#8216;drwhx5gt1ubzk&#8217;. Clearly, the former is between the latter two: You can simply do a database query of (hash < 'drwhx5gt1ubzk' AND hash > &#8216;drkc1xg4q3uy8&#8242;), which App Engine has no problem with.</p>
<p>However, this doesn&#8217;t scale equally to non-point features. You can find the &#8216;union&#8217; of two Geohashes by taking the bits that are the same from each and putting them together: in the case above, the bounding box of -72,41,-70,43 is the bitstring &#8216;01100101111&#8242;: however, because bboxes are not infinitely precise (/infinitely small) as points are, there is no way to assign precision to the string. This means that the &#8216;cutoff&#8217; results in queries that don&#8217;t match up:</p>
<pre>
>>> a = str(geohash.Geostring((-72.01,40.99)))
>>> b = str(geohash.Geostring((-69.99,43.01)))
>>> c = str(geohash.Geostring((-72,41)) + geohash.Geostring((-70,43)))
>>> c >= a
False
>>> c <= b
True
</pre>
<p>Clearly, these should both return true: the bounding box of C is contained within the points, but because of the &#8216;infinite accuracy&#8217; of points, this doesn&#8217;t actually work.</p>
<p>Instead, we need to add an additional mode to each of our bits: instead of just storing 0 or 1, we need to store an &#8216;inbetween&#8217; bit to indicate that there is &#8216;no known data&#8217;. (This fixes the problem that the null string is less than 0.) In order to do sorting properly, we need this to be between &#8216;0&#8242; and &#8216;1&#8242;, so we instead move to &#8216;0&#8242;, &#8216;2&#8242;, and &#8216;1&#8242; for inbetween. We call this class the Geoindex class.  For our &#8216;c&#8217; above, this turns 01100101111 into:</p>
<p>0220020222211111111111111111111111111111111111111111111111111111</p>
<p>Now, we do the same test as before, with the new Geoindex class:</p>
<pre>
>>> a = str(geohash.Geoindex((-72.01,40.99)))
>>> b = str(geohash.Geoindex((-69.99,43.01)))
>>> c = str(geohash.Geoindex((-72,41)) + geohash.Geoindex((-70,43)))
>>> c >= a
True
>>> c <= b
True
</pre>
<p>Hooray! It worked as we expect.</p>
<p>Geohash here is a public-domain Python module created by Schuyler Erle, available from <a href="http://mappinghacks.com/code/geohash.py.txt">Mapping hacks Code: Geohash</a>.  Schuyler was the brainchild behind all the Geohash work: I just told him what did and didn&#8217;t work <img src='http://labs.metacarta.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>In this way, I was able to put together a geographic bounding box query, on top of Google App Engine, using a Geohash-like algorithm as a storage format, and use that query to power a <a href="http://featureserverdemo.appspot.com/browser/index.html">FeatureServer Demo</a> App Engine application, doing geographic queries of non-point features on top of App Engine/BigTable. Simply create a Geoindex object of the bounding box of your feature, and then use lower-left/upper-right points as bounds for your Geohash when querying.</p>
<p>(A later post will detail how to set up your own copy of this App Engine app: I&#8217;m still working out a number of kinks with it.)</p>
<p>App Engine provides a number of interesting capabilities; for geographic applications, bounding box queries are very important, and using this solution, you can do queries against this type of data with some success.
</p>
]]></content:encoded>
			<wfw:commentRss>http://labs.metacarta.com/blog/27.entry/geographic-queries-on-google-app-engine/feed/</wfw:commentRss>
		</item>
		<item>
		<title>OpenLayers 2.5 RC1</title>
		<link>http://labs.metacarta.com/blog/26.entry/openlayers-25-rc1/</link>
		<comments>http://labs.metacarta.com/blog/26.entry/openlayers-25-rc1/#comments</comments>
		<pubDate>Mon, 17 Sep 2007 05:16:34 +0000</pubDate>
		<dc:creator>crschmidt</dc:creator>
		
		<category>Uncategorized</category>

		<guid isPermaLink="false">http://labs.metacarta.com/blog/26.entry/openlayers-25-rc1/</guid>
		<description><![CDATA[OpenLayers 2.5 RC1 has been released, according to the OpenLayers Blog. Anyone who is able to should test their applications with it in hopes of finding the remaining bugs&#8230;

]]></description>
			<content:encoded><![CDATA[<p>OpenLayers 2.5 RC1 has been released, according to the <a href="http://openlayers.org/blog/2007/09/17/ol25-rc1/">OpenLayers Blog</a>. Anyone who is able to should test their applications with it in hopes of finding the remaining bugs&#8230;
</p>
]]></content:encoded>
			<wfw:commentRss>http://labs.metacarta.com/blog/26.entry/openlayers-25-rc1/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Browser Based AtomPub GIS Client</title>
		<link>http://labs.metacarta.com/blog/25.entry/browser-based-atompub-gis-client/</link>
		<comments>http://labs.metacarta.com/blog/25.entry/browser-based-atompub-gis-client/#comments</comments>
		<pubDate>Thu, 06 Sep 2007 15:16:44 +0000</pubDate>
		<dc:creator>crschmidt</dc:creator>
		
		<category>Uncategorized</category>

		<guid isPermaLink="false">http://labs.metacarta.com/blog/25.entry/browser-based-atompub-gis-client/</guid>
		<description><![CDATA[Q: What do you get when you combine:

Atom
GeoRSS
FeatureServer
OpenLayers

A: The world&#8217;s first Open Source Browser-Based Atom Pub GIS Client.

]]></description>
			<content:encoded><![CDATA[<p>Q: What do you get when you combine:</p>
<ul>
<li>Atom</li>
<li>GeoRSS</li>
<li>FeatureServer</li>
<li>OpenLayers</li>
</ul>
<p>A: The world&#8217;s first <a href="http://labs.metacarta.com/atompub/">Open Source Browser-Based Atom Pub GIS Client</a>.
</p>
]]></content:encoded>
			<wfw:commentRss>http://labs.metacarta.com/blog/25.entry/browser-based-atompub-gis-client/feed/</wfw:commentRss>
		</item>
		<item>
		<title>FlickrBrowse: Flickr + FeatureServer in Action</title>
		<link>http://labs.metacarta.com/blog/24.entry/flickrbrowse-flickr-featureserver-in-action/</link>
		<comments>http://labs.metacarta.com/blog/24.entry/flickrbrowse-flickr-featureserver-in-action/#comments</comments>
		<pubDate>Tue, 05 Jun 2007 15:29:17 +0000</pubDate>
		<dc:creator>crschmidt</dc:creator>
		
		<category>Uncategorized</category>

		<guid isPermaLink="false">http://labs.metacarta.com/blog/24.entry/flickrbrowse-flickr-featureserver-in-action/</guid>
		<description><![CDATA[One of the cool things about FeatureServer is its ability to load data from other APIs, even when those APIs are not really &#8216;geo&#8217; related. The main example of this in the existing code is the Flickr datasource, which allows you to load data from Flickr as all the formats that FS supports, like WFS.
Last [...]]]></description>
			<content:encoded><![CDATA[<p>One of the cool things about FeatureServer is its ability to load data from other APIs, even when those APIs are not really &#8216;geo&#8217; related. The main example of this in the existing code is the Flickr datasource, which allows you to load data from Flickr as all the formats that FS supports, like WFS.</p>
<p>Last night, I sat down with the intention of using this in some way. I was able to hack together half of what I wanted in about an hour, and I hacked together the other half this morning in another hour.</p>
<p>Announcing&#8230;</p>
<p><a href="http://labs.metacarta.com/flickrbrowse/">FlickrBrowse: Browsing the World&#8217;s Interesting Flickr Images via OpenLayers</a></p>
<p>
Using Flickr&#8217;s &#8216;interestingness&#8217; sort, I&#8217;ve put together a map of the recent flickr geo photos, ordered by interestingness. You can limit photos by username/user id, and clicking the photos gives you little infobubbles with a link to the original photo.</p>
<p>The code is quite simple (view source to see it), and it provides a relatively cool service.</p>
<p>I think this is the kind of thing that OpenLayers and FeatureServer are all about: making it easier to integrate disparate datasets into a single interface. In this case, doing the transformation on the client would be difficult, so we do it on the server, and the client sees it as &#8216;just another WFS&#8217;.
</p>
]]></content:encoded>
			<wfw:commentRss>http://labs.metacarta.com/blog/24.entry/flickrbrowse-flickr-featureserver-in-action/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Where 2.0: Stamen Design</title>
		<link>http://labs.metacarta.com/blog/23.entry/where-20-stamen-design/</link>
		<comments>http://labs.metacarta.com/blog/23.entry/where-20-stamen-design/#comments</comments>
		<pubDate>Tue, 29 May 2007 21:50:07 +0000</pubDate>
		<dc:creator>crschmidt</dc:creator>
		
		<category>Uncategorized</category>

		<guid isPermaLink="false">http://labs.metacarta.com/blog/23.entry/where-20-stamen-design/</guid>
		<description><![CDATA[Stamen Design just presented a lot of really cool visualization demos. I&#8217;m always happy to see people doing something a bit more than points, and even more than lines and polygons: they&#8217;re making really fun looking maps with map data.
Hindsight

]]></description>
			<content:encoded><![CDATA[<p>Stamen Design just presented a lot of really cool visualization demos. I&#8217;m always happy to see people doing something a bit more than points, and even more than lines and polygons: they&#8217;re making really fun looking maps with map data.</p>
<p><a href="http://hindsight.trulia.com/">Hindsight</a>
</p>
]]></content:encoded>
			<wfw:commentRss>http://labs.metacarta.com/blog/23.entry/where-20-stamen-design/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Where 2.0, Morning 1</title>
		<link>http://labs.metacarta.com/blog/22.entry/where-20-morning-1/</link>
		<comments>http://labs.metacarta.com/blog/22.entry/where-20-morning-1/#comments</comments>
		<pubDate>Tue, 29 May 2007 16:51:08 +0000</pubDate>
		<dc:creator>crschmidt</dc:creator>
		
		<category>Uncategorized</category>

		<guid isPermaLink="false">http://labs.metacarta.com/blog/22.entry/where-20-morning-1/</guid>
		<description><![CDATA[Schuyler, from here at MetaCarta: Mapping the Maximum City. How architectures of participation make it possible to create the geodata that we *all* need. OpenStreetMap leading the way with tag-style geodata creation, but long way to go for all of us. We need to solve the problems of a structured data geowiki, and there&#8217;s lots [...]]]></description>
			<content:encoded><![CDATA[<p>Schuyler, from here at MetaCarta: Mapping the Maximum City. How architectures of participation make it possible to create the geodata that we *all* need. OpenStreetMap leading the way with tag-style geodata creation, but long way to go for all of us. We need to solve the problems of a structured data geowiki, and there&#8217;s lots of work to do, and it will help everyone from the slumdwellers of mumbai to the residents living under the OSGB reign.</p>
<p>Topix: Creating local news pages by tagging documents on the web. &#8220;We don&#8217;t do NLP&#8221; &#8212; describing the different ways to disambiguate, from city mayor names, to names that residents attibute to themselves (Bay Stater, Nutmegger). Creating 32000 zip-code based news pages.</p>
<p>Google:  <a href="http://maps.google.com/maps?f=q&amp;hl=en&amp;q=San+Francisco&amp;ie=UTF8&amp;ll=37.781027,-122.45636&amp;spn=0.141372,0.242386&amp;z=12&amp;om=0&amp;layer=c">Google Street Map View</a>, Google Mappletts, now indexing and providing search access to GeoRSS feeds (as of this morning).
</p>
]]></content:encoded>
			<wfw:commentRss>http://labs.metacarta.com/blog/22.entry/where-20-morning-1/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Cool Map Tools &#8212; MetaCarta + OpenLayers Demo</title>
		<link>http://labs.metacarta.com/blog/21.entry/cool-map-tools-metacarta-openlayers-demo/</link>
		<comments>http://labs.metacarta.com/blog/21.entry/cool-map-tools-metacarta-openlayers-demo/#comments</comments>
		<pubDate>Sun, 27 May 2007 18:46:57 +0000</pubDate>
		<dc:creator>crschmidt</dc:creator>
		
		<category>Uncategorized</category>

		<guid isPermaLink="false">http://labs.metacarta.com/blog/21.entry/cool-map-tools-metacarta-openlayers-demo/</guid>
		<description><![CDATA[This week, John presented at the MetaCarta Users Group meeting, showing off the integration between OpenLayers, FeatureServer, and MetaCarta APIs.
MetaCarta + OpenLayers: Cool Map Tools
Of course, this video will also be available from the MetaCarta Labs on a Stick  
Check it out!

]]></description>
			<content:encoded><![CDATA[<p>This week, John presented at the MetaCarta Users Group meeting, showing off the integration between OpenLayers, FeatureServer, and MetaCarta APIs.</p>
<p><a href="http://labs.metacarta.com/presentations/cool-map-tools.html">MetaCarta + OpenLayers: Cool Map Tools</a></p>
<p>Of course, this video will also be available from the MetaCarta Labs on a Stick <img src='http://labs.metacarta.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Check it out!
</p>
]]></content:encoded>
			<wfw:commentRss>http://labs.metacarta.com/blog/21.entry/cool-map-tools-metacarta-openlayers-demo/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Labs on a Stick: 0.5</title>
		<link>http://labs.metacarta.com/blog/20.entry/labs-on-a-stick-05/</link>
		<comments>http://labs.metacarta.com/blog/20.entry/labs-on-a-stick-05/#comments</comments>
		<pubDate>Sun, 27 May 2007 07:12:24 +0000</pubDate>
		<dc:creator>crschmidt</dc:creator>
		
		<category>Uncategorized</category>

		<guid isPermaLink="false">http://labs.metacarta.com/blog/20.entry/labs-on-a-stick-05/</guid>
		<description><![CDATA[By the time I finished working on the USB drive distribution last night, I realized that there was actually a lot more that I wanted to share (and I still have about 50MB free on the USB drive). The software I put on it had gradually changed from being &#8220;FeatureServer demo and associated parts&#8221; to [...]]]></description>
			<content:encoded><![CDATA[<p>By the time I finished working on the USB drive distribution last night, I realized that there was actually a lot more that I wanted to share (and I still have about 50MB free on the USB drive). The software I put on it had gradually changed from being &#8220;FeatureServer demo and associated parts&#8221; to being &#8220;MetaCarta Labs demos&#8221;. The version I published last night took that into account insofar as the actual software included in the distribution, but not in the frontend and supporting materials.</p>
<p>To that end, I spent today rethinking how I wanted to do it, and I think I&#8217;ve come up with something I like better. You can check out the new labs-on-a-stick is available from the <a href="http://labs.metacarta.com/on-a-stick/">Labs on a Stick homepage</a>, as a <a href="http://labs.metacarta.com/on-a-stick/labs-on-a-stick-0.5.tar.gz">.tar.gz</a> and a <a href="http://labs.metacarta.com/on-a-stick/labs-on-a-stick-0.5.zip">.zip</a> file. This distribution is much bigger &#8212; ~9MB &#8212; because it includes video demonstrations of OpenLayers and MetaCarta&#8217;s geographic search engine. In addition, the homepage (instead of being a FeatureServer demo) is a list of all the things available, including four demos, software downloads, and video presentations.</p>
<p>Although this is probably not ideal for downloads by users on dialup, that&#8217;s not the target of the distribution, so for now I&#8217;m happy with that.</p>
<p>Now I can go back to concentrating on picking out what URLs I want to demo for my OpenLayers presentation. Hopefully (assuming I get it done in time), I&#8217;ll have that made into a video too, adding more material onto this nifty USB distribution.
</p>
]]></content:encoded>
			<wfw:commentRss>http://labs.metacarta.com/blog/20.entry/labs-on-a-stick-05/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
