Archive for the ‘Software’ Category

Ecotrust in the News: MLPA and Fishing Communities

Wednesday, January 28th, 2009

Thought I would point out another article about Ecotrust’s involvement in the Calfornia marine life protection act initative (MLPAI).  Specifically our work interviewing fisherman in the south coast region.  The goal was to capture which areas are most important to these fisherman, by species and by port, so that people lobbying for the fisherman have the best information available and the impact of marine reserves on their bottom line can be reduced in an analytical way.

I wish I was able to show you the maps we’ve produced, they’re really something, and I really think they’re going to help the decision making process.  I should create some sample maps to display.

It’s important to remember that all of interviews are done under a very strict privacy agreement and only the summarized maps are made available so that individual fishing spots are not identifiable as much as possible.  The maps are also made available to a very small number of people for decision making.  The article doesn’t seem to make this key point very well as you’ll notice from peoples comments.

Ecotrust Software Charts Best Coastal Fishing Grounds

Sunday, December 14th, 2008
Open OceanMap Screenshot

Open OceanMap Screenshot

It’s nice to see some news sources running stories on our software development at Ecotrust.  We received a Mellon Award last week in DC for our work on Open OceanMapOPB and and San Francisco Chronicle were kind enough to interview and run stories presenting the case for our software and its use to capture fishermen’s knowledge to try and minimize the impact of implementing marine reserves on fishing communities.

(more…)

Hot Apps Conference 2008

Tuesday, March 11th, 2008

I cruised down to Eugene on Friday for the Hot Apps conference sponsored by Oregon URISA. Anselm Hook was along for the ride. The theme this year was open source GIS and was focused particularly on the web. Paul Ramsay was invited down to do the morning workshop which was essentially a crash course in web GIS. It included the use of free software and free API’s like Google maps.

There was excitement on the faces of some workshop attendees when we showed up at the end of the morning session.  Most of them work for local and state government agencies and had never had the opportunity to get their hands on this stuff.

I demoed the Inforain watershed locator and Forestland carbon calculator web tools along with the OpenOceanMap desktop tool based on QGIS.  They really liked seeing a web-based GIS being used to do more than just visualization and attribute display.  The carbon calculator is destined for greater things.  Most were also happy to know that OpenOceanMap has been field tested, being used for interviewing fisherman down in California as part of the process of defining marine protected areas.

Carbon Demo Screenshot

Open Source GIS Presentation @ PSU (Round 2)

Thursday, February 21st, 2008

It was time once again tonight to preach the open source GIS gospel to the masses.

I felt much better prepared this time with a variety of new demos using QGIS, PostGIS, and Grass. The students really seemed to respond to the extra dose of demos, much needed I think around 8-9pm at night… Also just three months ago I really had no polished applications from work to show off, tonight I had at least three including the Watershed Locator, ODFW demo and Aaron Racicot’s Open Ocean Map. They really show the progress Aaron and I have made in the last few months.

Download Slides

Download Base Data

Students, your comments on my presentation are more than welcome, you can leave them right on this site. Especially the stuff I can do better. I really enjoyed your questions, it was clear some of you were actually paying attention. I hope I inspired at least a single person to try some of the tools out.

New inforain site goes live

Monday, February 4th, 2008

We’ve been working hard at Ecotrust on a revamped version of Inforain.

There’s a new mapbook interface providing access to high-resolution images of a number of maps Ecotrust has produced. It allows you to search by name, keyword, region and theme. A variety of presentation, reports and datasets are also available.

inforain_snap.png       wsl_snap.png

Finally, we’ve created a Watershed Locator tool for the site, that allows users to explore watersheds within the Coho salmon territory of North America. It allows you to search by address, watershed name or just by clicking around on the map. Watershed boundaries, major rivers and perennial streams are displayed within an OpenLayers mapping client. One of the most useful features is the watershed ‘ladder’ which allows you to move up and down between watershed ‘levels’. Searching for a particular watershed will also bring up a number of statistics. Some of the more interesting ones include miles of anadromous streams, number of minor and major dams within the watershed, the number of LEED certified buildings, sq.miles of development/farmland/forestland/native land, etc.

A number of open source tools are used in the Watershed Locator including OpenLayers, Mapserver, TileCache, PostGIS, Prototype and Sript.aculo.us. A number of free services were also used including the Google terrain layer for the map and the Yahoo! geocoder for converting addresses to latitude/longitude locations. The terrain map layer is particularly useful for overlaying watershed boundaries. It becomes very clear to the user how the terrain delineates those boundaries. Thank you Google for releasing the terrain layer just weeks before Inforain went live!

In the future we’d like to allow users to access additional watershed resources including links to watershed councils, information on restoration projects, etc. The watershed locator code is available free and open source on our development site The hope is that the concept of a watershed locator as an exploratory educational tool will be replicated in different regions and possibly for different purposes.

Using py2exe and Inno Setup with PyQT and Matplotlib

Tuesday, January 1st, 2008

Happy New Year! I seem to have some good momentum going into 2008. Hopefully I can keep things rolling along.

I wrapped the 0.2 release of Delphos into an installer yesterday using Inno Setup. I did this by combining my existing py2exe build script with a sample script from the py2exe code repository. This sample first runs py2exe and then generates a build script for Inno Setup on the fly and passes it to the Inno Setup compiler. Source to installer in one shot!

The biggest issue was getting matplotlib to play nice. PyQt, SqlAlchemy and the other modules had no problem. Matplotlib requires additional data files to be packaged into the py2exe build, multiple directories worth in fact with their own subdirectories and files. Matplotlib has a function that tells you exactly what supplementary data files it needs (called get_py2exe_datafiles), but it didn’t work correctly for me (see this thread). So, until now I would just copy them all into a new build by hand but now I needed Inno Setup to know about each of these files too so it could bundle them into the installer. In this case the handoff from py2exe to Inno Setup is automated so the solution was to tell py2exe about the additional data files and that information would get passed on to be included in the Inno Setup build script that’s generated.

One solution was to list every data file by hand in the py2exe portion of the build script, but geez what a tedious waste of time. This kind of stuff changes regularly so it had to be automated as much as possible. Unfortunately, telling py2exe about multiple directories worth of data files to include isn’t easy. It seems distutils, which py2exe runs on top of, can only be given a list of individual files to include with the build. You can’t (that I know of) simply give it a directory path and it will recursively include all directories and files underneath.

Thankfully I found a nice little function on the net from a guy named jt (referenced in the build script) that walks a directory structure and builds a list of file names and paths in the form that py2exe expects. I used that same function to package all of my documentation files and other boilerplate stuff with the build. Very slick. I had to make a quick fix to it though as the function was mistaking directories for files in some cases. Py2exe handled this fine but InnoSetup would error if asked to copy a directory when expecting a file. So, I essentially massacred a sweet little 2 line piece of functional programming goodness and dropped in a ‘quick’ fix. Time is short ya know…

The py2exe/Inno Setup build script can be found here.

Delphos 0.2 Released

Sunday, December 30th, 2007

I’ve been busy at the ‘ol office. I just wrapped up the second release of Delphos (version 0.2). It’s available here free and open source under the GPL license. Windows and mac binaries are available, but you can run it from source on Linux as well.

Here’s the blurb I cooked up about what it is, still tweaking it:
“Delphos is a database management and decision-support tool that utilizes multicriteria analysis (MCA) to select the best alternative from a group. Delphos is developed by Ecotrust in partnership with Comunidad y Biodiversidad (COBI) and World Wildlife Fund (WWF). The documentation included with Delphos is tailored for the selection of fisheries and marine protected areas. However, Delphos is general enough to be used towards the analysis of any type of alternatives.”

Screenshots

Delphos Project View Delphos Analysis Summary Ranking

It’s been a lot of fun using the QT framework for this tool, especially in a Python environment using PyQT. I’ll admit I don’t yet have a Pythonic mindset and I’m not yet correctly using the MVC design pattern, but I’m getting there. Let’s just say that if and when I bust out another release of Delphos I have a list of things to gut and re-implement.

Combining OpenLayers and Ext

Friday, December 7th, 2007

For the last week I’ve been learning the Ext javascript framework and its really been a joy. Version 2.0 is very polished and it “just works”. I put together a very basic tool demo for Oregon Department of Fish and Wildlife and Alaska Department of Fish and Game that uses Ext for the layout, OpenLayers for the mapping component and Mapserver/PostGIS on the backend for serving up map tiles and doing spatial queries. The library is a beast but its everything you want in one place (think jQuery+Prototype+YUI).

Now to find a robust framework for the backend (I’m tired of PHP), maybe Pylons.

ODFW Demo - Try selecting the Coos Bay or Tillamook Bay Coho Population in the menu and then opening the Adult tab to view different metrics queried from the DB.

More tool are in the works, stay tuned.

Demo Screenshot

screenshot_2.png

Open Source GIS Presentation at PSU

Thursday, November 15th, 2007

Tonight, I gave a rousing talk on open source GIS to a group of students at Portland State University.

I have not doubt they will seek out the things of which I spoke! I hope you students enjoyed it, I’ve never talked for 45 minutes straight in my entire life.  Feel free to leave me a comment!

Here is the presentation for your viewing pleasure (download)