Lessons from Maps and Old Code

Taking over someone else’s code is hard. There is probably no better look at how a person thinks than looking at their code. It can be tempting to trash their code and start from scratch. This temptation often runs into conflict with a sunk-cost fallacy that says “The previous person spent so much time on this that they had to understand the problem far better than me and maybe my time would be best spent learning from their code.” The really tough part about this is that it’s not always a fallacy.

My own encounter with this dilemma came early in my career – early enough that the code in question was written in AML. The company I worked for at the time had just transferred me to the offices of a large water utility to take over the development of their cartographic production system from a developer who had recently moved on. I had never met this developer and he was already gone, so I only had his code to work from.

Read more

GeoIQ API Wrappers for .Net

A while back, I built a small interface between GeoIQ/GeoCommons and ArcGIS Desktop. From there, it became more of a full-fledged toolbar for ArcGIS. During that effort, I began developing some .Net classes to wrap the GeoIQ RESTful API. As we progressed with the toolbar, my colleague Hugo Estrada also contributed to the library.

The original intent was to wrap the entire API but it turns out that we were undertaking this in the middle of GeoIQ’s upgrade to version 2.0. In the intervening time, we got some projects implementing the GeoIQ platform for end users (such as the Climascope portal that Andrew Turner recently blogged about).

Read more

CartoDB + Leaflet = Easy

One of the biggest sources of buzz at FOSS4G was CartoDB. It is a hosted solution from Vizzuality that uses PostGIS to allow you to store your spatial data online. I got a beta account a couple of weeks ago but life (i.e. paying work) kept getting in the way but I finally got to play with it recently.

One of the things that intrigued me is that, similar to Google Fusion Tables, CartoDB exposes a SQL interface through a RESTful API (I’m still not sure if the term “API” applies to REST but it’s a convenient shorthand). Essentially, CartoDB exposes PostgreSQL SQL and the spatial SQL extensions of PostGIS. Once your data is loaded, you can query it and return the results as either CartoDB’s JSON syntax, KML or GeoJSON.

With this information, I set out to build a simple application to query property data and display the results on a map in a browser. In addition to CartoDB, I elected to use the Leaflet Javascript library to accomplish the mapping (although I also experimented with OpenLayers). Displaying and styling GeoJSON in Leaflet is very straightforward and this task gave me and excuse to get a little more comfortable with it.

Read more

FOSS4G Quick Hits

I had the distinct pleasure of attending my first FOSS4G conference in Denver last week. Having not attended one previously, I can only rely on the opinions of others that this has been the best FOSS4G yet. For me, this was best geospatial conference I have attended. I’ll probably blog in more detail about some of the things I saw but here are my high-level observations:

It's time to refresh your thinking about open-source geospatial tools.

Read more

Prying Data Open

In the aftermath of Hurricane Irene, I was trying to get information from my local electric cooperative about outages. There were many (including my neighborhood) and I wanted to see the scale of the problem. It turns out, they have a page with a map that shows current outages by zip code.

Old school outage map

It’s pretty old-school as far as web maps go but it gets the job done. Their day job is making electricity, not web maps, so I won’t critique it too much. One thing I did notice is that the map seems to be dynamically generated (as do the tables on the page) from some inaccessible data source. I search and tried to find some kind of feed, to no avail.

Read more

Mapping GISP and PMP Certifications with GeoCommons and the ESRI Silverlight API

Note: The application described in this post is running here. It requires Silverlight 4.

I was perusing my LinkedIn connections and noticed that quite a few had PMP certifications. I also noticed that most of those who did seemed to be in the Washington, DC area. Of course, given that I live in that region, my sample could be a bit skewed but then I started thinking out loud (via Twitter):

I would love to see a heat map showing concentrations of PMPs. I bet the DC area would be white-hot. I suspect others not so much.

Naturally, I could not let this sit. How hard could it be? It turns out it wasn’t that hard so I decided to throw a small app together to look at the data. In the process of working out an approach, I decided to also look at GISP certifications because the data set is smaller and is available as one download from the GISCI. Here’s a blow-by-blow:

Read more

Getting Started With a Python Wrapper For the WeoGeo API

One of my goals for 2011 was to sharpen my Python skills. As if on cue, WeoGeo puts out a Python wrapper for their RESTful API. It can be found here. The good news is that I now have a familiar problem set to sink my teeth into. The bad news (for me) is that it’s so easy to use it’s probably not going to do much for my Python skills.

The wrapper addresses the full WeoGeo API (Datasets, Jobs, Events, etc.) so it exposes pretty much everything you can through through the WeoGeo SaaS. For example, here is a very simple browse operation:

Read more

zigGIS Hotfix Available

Abe announced the availability of hotfix 3 for zigGIS 2.0.5. From the announcement: Hotfix 3 fixes an issue that prevented point layers from being editable; it also includes all prior hotfixes. The hotfix is a free upgrade and is highly recommended for all users. Please go to http://pub.obtusesoft.com > My Order. After logging in you’ll … Read more

Importing Data From GeoCommons Into ArcMap

UPDATE: The code for this post is available at the bottom of the page.

I have been doing a lot of development with the ESRI Silverlight API recently. One of the requirements of my project is to be able to dynamically add KML data at runtime. The incorporation of KML was handled for us through one of the ESRI samples on the resource center so we pretty much just had to integrate that code and test against our use cases. For testing, I typically reached out to GeoCommons since any data set available there can be streamed as KML.

Obviously, this is not my first exposure to GeoCommons but, when discussing it, I found that many of the analysts I spoke with were not aware of it and did not use it much. So I decided to tackle developing a simple ArcMap extension to allow a user to search GeoCommons and then download/add data to ArcMap without the need to manually download, unzip and add the data themselves.

Read more