Archive for November, 2009

GIS on the iPhone

Sunday, November 1st, 2009

Geographic information systems have arrived: there is not a city, county or state in the developed world which doesn’t use the technology extensively. Utilities use it to manage their lines. Planners use it to project population growth. Environmentalists use it to predict the impact of climate change. GIS is everywhere, and yet, the technology community is still only partially aware of it. Many black-belt geeks (perhaps even some Slashdot readers) have never seen a GIS in action, let alone actually used one.

That’s a real pity because GIS is doing to geographic data what Visicalc did to numeric data 30 years ago. It is bringing static maps to life, enabling discoveries and insights that would otherwise be impossible. And GIS is actually a lot of fun to use.

The iPhone seems like it would be an excellent platform for GIS. It’s mobile. It’s powerful enough to do at least some basic GIS functions. It has a built-in GPS and compass. It has a respectable amount of storage. So why is it that we still have not seen a full-blown GIS for the iPhone?

What’s available now

  • Google Maps, included on every iPhone, is of course the most basic geographic application available. It’s quite powerful, although it does require you to be on a network (no joy if you’re panning for gold in the Sierra Nevada, or surveying the mountains of Kentucky). The iPhone version is a bit limited in that you can only add tiny amounts of information to it. However, with the iPhone 3.0 OS, Google Maps is now available to all applications as an extensible widget, and we can look forward to some clever uses of that widget.
  • Google Earth, freely available, is a limited version of the familiar desktop application. It’s limited in that practically all the extensibility in the desktop version is missing. You cannot add KML files, or any other user-created overlays. And of course, you need to be on a network (and a fast one — 3G doesn’t really cut it).
  • Geology CA and the other apps in the suite are perhaps the closest thing to a GIS we currently have on the iPhone. It’s limited in that it contains a fixed set of layers (users cannot upload their own), and the query capabilities are practically nil. But it is fully self-contained (no network access required), is easily accessible to anyone without any knowledge of GIS, and contains a good selection of data (28 layers). We’ll see if the makers can expand it into a full-fledged GIS.
  • MapPro WMS should be included, although it’s only a display mechanism for data served from a WMS server, and therefore not a true free-standing GIS per se. Sadly, the execution is flawed and the reviews are not good, but the basic idea seems sound.
  • The 800-pound gorilla in the GIS world is ESRI, and they have announced their intention to step into the iPhone market before the end of the year. It’ll be interesting to see what they come up with, and at what price (their enterprise applications are excellent but notoriously expensive).

What’s missing

Easy access to data – There is practically an infinity of GIS data available on the web. Everything from the precise contour of sidewalks in Manhattan to the results of the presidential election, precinct by precinct. The first thing we need is an easy way for the average iPhone user to access that information. By easy, I mean Apple-easy: just a few taps, with no special kung-fu required. The desktop version of Google Earth has already made a lot of this data accessible, but there is still no real solution for the iPhone.

Geographic queries – We also need to see some geographic processing capabilities. GIS becomes truly powerful when it’s not just a static display, but a living, breathing set of information. That’s when data becomes knowledge. I want to see the results of the 2008 presidential election, but I also want to visually correlate them with the crime rate per zip code and the population density per block. This kind of eye-opening query is what makes GIS so valuable. There is no reason why it should not be available on a mobile platform like the iPhone.

True mobility – The value of GIS on the iPhone comes from the fact that it’s a mobile platform. Therefore any GIS solution needs to be able to take full advantage of this mobility. Not only should it be able to use the device’s capabilities (GPS, compass, camera, etc…), but it also needs to work when there is no network available. Users should be able to cache as much data as needed. The average iPhone has gigabytes of unused storage, why not put it to good use?

Data exchange – Of course, being mobile means that you can create geographic data yourself. Map your own backyard. Geotag your photos and link them to your stored waypoints. And you should be able to share all this information with the world. Some apps have begun to appear in this area, such as Oracle’s Enterprise Asset Management, or E-String Technologies’ Logstr, but the exchange of data is still limited.

Integration with existing GIS systems – Any GIS solution will of course need to talk to the existing GIS infrastructure, using proprietary but widespread standards (e.g. ESRI) and open standards such as those defined by the Open Geospatial Consortium.

What’s next?

The long-rumored and still-to-be-confirmed Apple tablet would of course have the potential to be a great GIS platform. More space, more pixels, presumably more processing power. The tactile interface really makes the manipulation and exploration of maps more sensual, more immediate. And the mobility takes it to a whole new level. The iPhone’s screen size restricts its potential as a GIS platform. A tablet would solve that problem. Of course, it’s anyone’s guess as to whether Apple will eventually deliver one, and when.

Augmented reality is very fashionable these days, and it would make an intriguing addition to any GIS. Just imagine looking around you through your iPhone and seeing the sewer pipes under your feet, or cadastral data showing the owner and tax value of every land parcel and building around you. This is not a pipe dream — all the pieces are available, they just need to be put together.

A call to arms

This is my call to iPhone developers: opportunities abound! The iPhone is a brand new platform, and we have only begun to explore its possibilities. Give us a GIS worthy of it (please)!

State borders are not as simple as they look

Sunday, November 1st, 2009
When I was a kid, I would look at maps of the American West and be fascinated by those enormous states. Wyoming! Utah! Colorado! They looked like giant mathematical figures, crisply defined in an otherwise chaotic world. I also thought that the borders really were a dotted line on the ground, but that misconception was quickly disspelled by my parents.
<p/>
Nevertheless, I always carried in my mind the idea that western states were mostly defined by straight lines of whole latitude and longitude (parallels and meridians).
<p/>
So it was with some surprise that, while working on a <a href=”http://www.integrity-logic.com”>GIS app for the iPhone</a>, I discovered that these cherished beliefs were in fact plain wrong.
<p/>
The first misconception was that these straight lines run mostly along whole meridians and parallels. It certainly looks that way at first sight. For instance, the border between Arizona and New Mexico really does look like it’s smack on the 109th west meridian. But when you zoom in, you see that it’s actually off, and by more than a rounding error. What happened? Did the surveyors of yore goof? As a <a href=”http://www.amerisurv.com/content/view/6057/”>fascinating article in The American Surveyor</a> reveals:
<p/>
“In a case of national pride edging out common sense, the dividing line was defined as the 32nd meridian west of Washington”
<p/>
which turns out to be almost three minutes of arc west of the 109th meridian, or roughly three miles. Goodness forbid we should keep things simple. At least we can blame this one on the politicians.
<p/>
OK, so the border between Arizona and New Mexico is a bit strange. But that’s the exception, right?
<p/>
Well, no. The border between Colorado and New Mexico (and a bunch of other states) was originally defined as the 37th parallel. But man proposes, and the surveyor disposes. As it turns out, the surveyors did make a small mistake of 365 feet — not bad at all for late-19th century techniques, but enough to create a problem now. So, as described in <a href=”http://www.waymarking.com/waymarks/WM72RM_Latitude_37_North_the_border_between_six_US_States_Four_Corners”>Waymarking</a>:
<p/>
“Instead of a costly reassessment of the border line, the states affected and the US Supreme Court amended the definition of the state’s border, so now, the border between Utah, Colorado and Kansas in the North and Arizona, New Mexico and Oklahoma in the South is no longer at 37 N but at 36 59’56.34”N. “
<p/>
My belief in the cosmic order thus shaken, you can imagine how perturbed I was when I realized that, not only are these lines not exactly on whole meridians and parallels, but in fact they’re not even straight at all.
<p/>
Colorado, for instance, looks like it’s a perfect rectangle (if we ignore the spheroidal surface of the earth, of course). But if you examine closely the border with Utah, you’ll notice that there are <a href=”http://maps.google.com/?ie=UTF8&ll=38.155617,-109.008408&spn=0.478381,0.632401&z=11″>a few squiggles</a>. Small to be sure, but it is not a straight line. Same thing for the <a href=”http://maps.google.com/?ie=UTF8&ll=40.997537,-108.629014&spn=0.014349,0.019763&z=16″>border with Wyoming</a>. All these slight deviations from the geometrically ideal go back to the 19th century when surveying, although remarkably precise considering the technology available at the time, was not what it is today.
<p/>
In the case of the Colorado/Utah border, it was a <a href=”http://geology.utah.gov/surveynotes/gladasked/gladkink.htm”>surveying oopsie</a> of just over a mile. Still not bad for 1879. The border between California and Nevada was defined as a straight line from what turned out to be the middle of lake Tahoe to the intersection with the Colorado river. But wouldn’t you know it, the river moved, and the surveyor, rather than start from scratch, fudged the line. Ah, contractors!
<p/>
In fact, the closer you look, the worse it gets. All these borders are ultimately defined by monuments which were erected by surveying teams. As Ivars Peterson says in his blog, <a href=”http://mathtourist.blogspot.com/2007/08/rectangular-states-and-kinky-borders.html”>The Mathematical Tourist</a>:
<p/>
“once a border is defined on the ground and accepted by the interested parties, it becomes official, even if it doesn’t follow the written description.”
<p/>
So it’s not just that there are a few errors here and there — these seemingly-rectilinear states are actually polygons with hundreds of side!
<p/>
These vagaries can sometimes have serious consequences. A mini-war was actually fought between California and Nevada over this. Judges were thrown in jail, guns were shot in anger, and blood was shed during the <a href=”http://www.nevadacas.com/rccsawar.htm”>”Sagebrush War”</a> (more of a skirmish, really) in 1863, fought over which state Susanville belonged to. Maybe they felt like they were missing out on the Civil War and needed some excitement of their own. At one point, Susanville was the seat of two counties, one in Nevada, the other in California. They even got to elect a representative in both states.
<p/>
This all seems very quaint and amusing in this era of GPS and laser ranges, so it’s hard to believe that it’s not yet over. As recently as 1980, there was a <a href=”http://www.altlaw.org/v1/cases/384566″>lawsuit between the states of California and Nevada</a> regarding the exact location of the border. That is a long-running feud between the two states, mostly because the line has been <a href=”http://www.waymarking.com/waymarks/WM2X8Z_California_Arizona_and_Nevada”>redefined so many times</a>. And even today, in 2009, there are <a href=”http://www.nobleco.org/surveyor/index.php?q=all-in-the-meridian”>legal maneuverings between the U.S. and Canada</a> over the exact location of the Alaska border. It looks like the surveyors were a few hundred feet off (and, really, would could blame them?). A few hundred feet doesn’t sound like much until you multiply it by 647 miles. Add some oil and gas, and you can keep a sizeable herd of lawyers fat and happy for a long time.
<p/>
So this is what I’ve learned: borders are not on neat meridians and parallels, they’re not straight lines, and sometimes we’re not even completely sure where they are. Apparently, the world is not as neat and orderly as I imagined when I was a child.

When I was a kid, I would look at maps of the American West and be fascinated by those enormous states. Wyoming! Utah! Colorado! They looked like giant mathematical figures, crisply defined in an otherwise chaotic world. I also thought that the borders really were a dotted line on the ground, but that misconception was quickly disspelled by my parents.

Nevertheless, I always carried in my mind the idea that western states were mostly defined by straight lines of whole latitude and longitude (parallels and meridians).

So it was with some surprise that, while working on a GIS app for the iPhone, I discovered that these cherished beliefs were in fact plain wrong.

The first misconception was that these straight lines run mostly along whole meridians and parallels. It certainly looks that way at first sight. For instance, the border between Arizona and New Mexico really does look like it’s smack on the 109th west meridian. But when you zoom in, you see that it’s actually off, and by more than a rounding error. What happened? Did the surveyors of yore goof? As a fascinating article in The American Surveyor reveals:

In a case of national pride edging out common sense, the dividing line was defined as the 32nd meridian west of Washington

which turns out to be almost three minutes of arc west of the 109th meridian, or roughly three miles. Goodness forbid we should keep things simple. At least we can blame this one on the politicians.

OK, so the border between Arizona and New Mexico is a bit strange. But that’s the exception, right?

Well, no. The border between Colorado and New Mexico (and a bunch of other states) was originally defined as the 37th parallel. But man proposes, and the surveyor disposes. As it turns out, the surveyors did make a small mistake of 365 feet — not bad at all for late-19th century techniques, but enough to create a problem now. So, as described in Waymarking:

Instead of a costly reassessment of the border line, the states affected and the US Supreme Court amended the definition of the state’s border, so now, the border between Utah, Colorado and Kansas in the North and Arizona, New Mexico and Oklahoma in the South is no longer at 37 N but at 36 59’56.34”N.

My belief in the cosmic order thus shaken, you can imagine how perturbed I was when I realized that, not only are these lines not exactly on whole meridians and parallels, but in fact they’re not even straight at all.

Colorado, for instance, looks like it’s a perfect rectangle (if we ignore the spheroidal surface of the earth, of course). But if you examine closely the border with Utah, you’ll notice that there are a few squiggles. Small to be sure, but it is not a straight line. Same thing for the border with Wyoming. All these slight deviations from the geometrically ideal go back to the 19th century when surveying, although remarkably precise considering the technology available at the time, was not what it is today.

In the case of the Colorado/Utah border, it was a surveying oopsie of just over a mile. Still not bad for 1879. The border between California and Nevada was defined as a straight line from what turned out to be the middle of lake Tahoe to the intersection with the Colorado river. But wouldn’t you know it, the river moved, and the surveyor, rather than start from scratch, fudged the line. That’s contractors for you.

In fact, the closer you look, the worse it gets. All these borders are ultimately defined by monuments which were erected by surveying teams. As Ivars Peterson says in his blog, The Mathematical Tourist:

once a border is defined on the ground and accepted by the interested parties, it becomes official, even if it doesn’t follow the written description.

So it’s not just that there are a few errors here and there — these seemingly-rectilinear states are actually polygons with hundreds of side!

These vagaries can sometimes have serious consequences. A mini-war was actually fought between California and Nevada over this. Judges were thrown in jail, guns were shot in anger, and blood was shed during the “Sagebrush War” (more of a skirmish, really) in 1863, fought over which state Susanville belonged to. Maybe they felt like they were missing out on the Civil War and needed some excitement of their own. At one point, Susanville was the seat of two counties, one in Nevada, the other in California. They even got to elect a representative in both states.

This all seems very quaint and amusing in this era of GPS and laser ranges, so it’s hard to believe that it’s not yet over. As recently as 1980, there was a lawsuit between the states of California and Nevada regarding the exact location of the border. That is a long-running feud between the two states, mostly because the line has been redefined so many times. And even today, in 2009, there are legal maneuverings between the U.S. and Canada over the exact location of the Alaska border. It looks like the surveyors were a few hundred feet off (and, really, would could blame them?). A few hundred feet doesn’t sound like much until you multiply it by 647 miles. Add some oil and gas, and you can keep a sizeable herd of lawyers fat and happy for a long time.

So this is what I’ve learned: borders are not on neat meridians and parallels, they’re not straight lines, and sometimes we’re not even completely sure where they are. Apparently, the world is not as neat and orderly as I imagined when I was a child.