Posts Tagged ‘ajax’

Interview with MarineMAP Mashup Developers (Kelso)

Tuesday, April 21st, 2009

marinemapsupporttool

[Editor's note: MarineMAP is a cutting edge mashup built using PostGIS, GeoDjango, Ajax, Flash, OpenLayers, GeoServer and MapServer with Google base map tiles. It assists stakeholders in the design of MPAs (Marine Protected Areas) in mapping oceanographic, biological geological, chemical and human dimensions of the ocean and coastal areas. I talk with Will McClintock and Chad Burt of the Marine Science Institute at University of California at Santa Barbara about the technical underpinnings and development philosophy behind the project. One key to the project's success (rolled out Dec. 2008) has been the hiring of dedicated programmers to implement design ideas and new technology to extend an earlier version's usability and reach. Thanks Melissa and Sebastian!]

Interact with the MarineMAP at marinemap.org/marinemap.

Interactive Map Tool Objective: MarineMap is an internet-based decision support tool that provides the capacity for the SCRSG (South Coast Regional Stakeholder Group) to view data layers, create individual MPA concepts, assemble collections of individual MPA concepts into MPA arrays, receive basic feedback on how well MPA concepts and arrays meet guidelines for MPA design, and submit MPA arrays to staff as MPA proposals. This tool will be the primary way in which MLPA Initiative staff and SCRSG members capture and store information regarding MPA proposals.

marinemapsupporttool2

(Above) Screenshot above showing Marine mammal and Nearshore habitat layers on base map with area Measurement Tool enabled.

(Question) Kelso’s Corner: What technologies are leveraged in MarineMAP?

(Anwer) MarineMAP: We’re not using ArcGIS at all, save for cutting map tiles (using ArcGIS Desktop and Arc2Earth) and, as a non-critical component of the system, ArcSDE / SQL Server. We’re mainly using PostGIS, GeoDjango, Ajax, Flash, OpenLayers, GeoServer and MapServer and will soon switch to the Google Earth API.

We are using OpenLayers, rather than the Google Maps API for our “slippy map”. OpenLayers is pure javascript, as is most of the client application. We are using Flex, but only for the charting component. [Editor's note: OpenLayers is using the Google Maps tiles.]

(Q) Kelso’s Corner: How many programmers do you have on staff to deal with all the software components?

(A) MarineMAP: Currently, two of our developers work full-time on MarineMap, while our other two developers work half time. We also have several GIS analysts and a cartographer to deal with the data end of things. We are now looking for a full-time, in-house Assistant Web Developer to continue working on MarineMap. As we extend MarineMap to different geographies and planning processes, we anticipate that we’ll be looking for one or two more programmers as well.

(Q) Kelso’s Corner: What was the rational for doing this substantial map development in house? Did you evalutate other routes, consultants, off the shelf software before going this route, why was this option preferable? Did you have a good cheat sheet for how to develop / implement this technology? Did you have to hire new staff to do the programming or did you have existing expertise to draw on?

(Anwer) MarineMAP: We did not have a cheat sheet for how to develop / implement this technology. This was a brand new application using some new technologies, and some that we were familiar with. Of course, we had experience developing other applications and some of these technologies overlapped. But, there was a significant amount of learning happening for all of our developers.

The MLPAI is an on-going process that will terminate sometime around 2011. Until then, we need to have a highly functional and stable application that can be adapted to the changing needs of the process. It turned out to be much more cost-effective and time efficient to hire in-house developers to work on the application year-round. Before we built our team, we spent a significant amount of time considering a host of alternatives, including trying to maintain and tweak Doris, contracting out all of the work, etc.  Initially, we felt we did not have enough in-house expertise. Although we already had Chad Burt (UCSB), Jared Kibele (UCSB), Tim Welch (Ecotrust) and, now, Ken Vollmer (Ecotrust) as our in-house crew, we eventually contracted two developers from Farallon Geographics (Dennis Wuthrich and Alexei Peters) for a limited period to  help with developing the database schema. This was particularly nice given that we had only 6 months to get the first version of MarineMap out the door. Dennis and Alexei are no longer working on the project but I am very grateful that we had access to their time and expertise during the initial phases.

(Q) Kelso’s Corner: What was Doris?

(Anwer) MarineMAP: At the beginning of the Marine Life Protection Act Initiative (MLPAI), staff chose to hire consultants to build an application (eventually called “Doris”) that was built on ArcGIS Server 9.1 technologies. It shared some of the features of MarineMap, including drawing MPAs and arrays, and generating reports on what was being captured inside those MPAs. Doris had a poorly designed interface and, perhaps more significantly, it was dreadfully slow. Consequently, few stakeholders used it. Furthermore, because the application was built using technologies with which we had no particular in-house expertise, and because these technologies were proprietary, we had a difficulty updating the application or tweaking it on the fly. (I had been running ArcSDE / ArcIMS and ArcGIS Server applications for a couple years but had no real development expertise in, say, ArcObjects, or VB .Net.)

(Q) Kelso’s Corner: It seems there are many more RubyOnRails developers than Django. Have you found this a hindrance for hiring staff or when looking for trouble shooting advice?

(Anwer) MarineMAP: It does seem to be a bit of a challenge finding Django developers, particularly those that can / will work locally. I have not tried to hire a RubyOnRails expert so I have no direct means comparison.

(Q) Kelso’s Corner: Why will you be switching to the Google Earth API? Is this only for the front end? Have you been happy with GeoDjango?

(Anwer) MarineMAP: GeoDjango has been fantastic. Using the Google Earth API does not mean ditching GeoDjango. Rather, using the Google Earth API represents a shift away from the OpenLayers API. We’ll still be using GeoDjango extensively.

[Our lead developer] was a big proponent of RubyOnRails for quite some time, but Django has taken many of its best ideas to Python. While Ruby is aesthetically a beautiful language, Python is usually much faster and has a more mature set of modules to build on. The only thing I miss after switching over to Django is the database migrations Rails offers. Most open source GIS packages also have bindings for Python, where as there a few similar tools for Ruby.

Switching to the Google Earth API will just mean replacing OpenLayers. OpenLayers is a very good library, but the Earth API is much faster due to the fact that it is a compiled plugin rather than being written in javascript. This allows it to display thousands of placemarks on screen at once, which is one of the primary reasons for switching. Google Earth can also display temporal and 3d data.

(Q) Kelso’s Corner: Besides the change to Google Earth API, what other changes, updates do you plan for this online map?

(Anwer) MarineMAP: Besides switching to the Google Earth API, there is one major upcoming update to MarineMap. Specifically, we will be implementing a map-based (i.e., location based) discussion forum. Users will be able to zoom into a location on a map and tag objects (MPAs, data, places) with a comment. Other users will see these comments (if they have comments “turned on”) as they zoom in to a location or if they load an MPA. Users can then participate in a dialog via a traditional discussion forum that is linked to the map. Furthermore, users will be able to define a geographic region and subscribe to RSS feeds (using GeoRSS) for any activity within that region. One might choose to do this, for example, if they want to be notified by email any time somebody draws a new MPA in, or makes a comment about a data layer in a specific region that he / she cares most about. I believe the map-based discussion forum will go a long way in facilitating discussion about MPAs, particularly outside the in-person monthly stakeholder meetings.

Conclusion: Thanks so much for the informative Q&A session. Please check out the MarineMap project at MarineMap.org/marinemap.

Open Source GIS Stack (Mikel Maron)

Sunday, November 16th, 2008

[Editor's note: If you want to stay away from Google, Microsoft, and ESRI to get your interactive, online map on, here's how. Also check out this interesting PDF article on GeoDjango.]

Republished from Brainoff.com on Oct. 31st, 2008.

There’s a need for a good, high level description of the alternatives within in the “gently settling” stack of open source geoweb application development.

The OpenGeo Stack is the epitome of clarity, breaking down their tool set in a nice executive summary. But the OpenGeo stack only covers their tools, not all the available options. So I’m going to make a quick first pass of a high level overview. It’s useful for me, maybe for others. If you think I’ve done a poor job, help improve it in the comments, or on some wiki somewhere.

OpenGeo breaks things down into FrontEnd, Tiling, ApplicationFramework, Database. I’ll add Rendering, since in other tool sets this is split into different packages.

FrontEnd
the slippy map

* OpenLayers the Ajax gold standard
* ModestMaps for mind blowing Flash, ala Stamen
* Mapstraction don’t want to tax your mind? it looks just like the Google/Yahoo/Microsoft API

Tiling
be nice to your database or WMS and cache map images into tiles, just like Google and friends

* TileCache simple bit of python
* GeoWebCache same thing in Java
* mod_tile it’s kinda OpenStreetMap specific, but an apache module is a good idea too

Rendering
make pretty maps

* Mapnik looks beautiful. getting somewhat less painful to install.
* Mapserver does it all. also a pain to configure. looking better.
* GeoServer

ApplicationFramework
where the the main logic of the app goes. MVC. CRUD. etc.

* GeoDjango making great progress on a complete package.
* GeoRails more a bunch of plugins than a package, but definitely useable
* GeoServer the standard for open geo standards. Java.

Database

* Postgres + PostGIS
* MySQL sure, it has spatial extensions too. just not as fast or fully implemented as PostGIS

Random notes, other good sources

Architect your interfaces on Geo RESTful services. Andrew breaks down the formats and approaches for Neogeography and the GeoWeb in this presentation and book. For Ajax smooveness, use jQuery or prototype. Paul Ramsey has a good deep overview of open source GIS. Mecklenburg County GIS is a nice example of an instance of the stack.

There really is a need for a new book on this stuff, the O’Reilly trio of paper geo titles are great but out of date, and the landscape of osgeowebappdev is stabilising. Of course, no one wants to write it.

Making Flash Behave

Thursday, June 12th, 2008

Nelson showed me two tools today that will come in handy on a interactive map and charting project I’m cooking up for The Washington Post.

I like how Flash gives me a stable platform for mixing graphics and programming, but I don’t like how it breaks web practices like being able to go “back” to the previous view or bookmark the current view. These two tools address these issues.

I’ll need to rewrite parts of SWFAddress since I prefer programming to a single frame, not across multiple, linear frames.

swf address logo

SWFAddress is a small, but powerful library that provides deep linking for Flash and Ajax. It’s a developer tool, allowing creation of unique virtual URLs that can point to a website section or an application state. SWFAddress enables a number of important capabilities which are missing in today’s rich web technologies including:

  • Utilizing browser history and reload buttons.
  • Bookmarking in a browser or social website
  • Sending links via email or instant messenger
  • Finding specific content with the major search engines

SWFObjectis a small Javascript file used for embedding Adobe Flash content. The script can detect the Flash plug-in in all major web browsers (on Mac and PC) and is designed to make embedding Flash movies as easy as possible. It is also very search engine friendly, degrades gracefully, can be used in valid HTML and XHTML 1.0 documents*, and is forward compatible, so it should work for years to come.

This tool makes it easier to setup the FlashVars on the HTML side that will be read in as part of the URL for the Flash movie and initialize the view state to a predefined location or data theme.