Archive

Archive for the ‘GIS Tools’ Category

MirrorMap

February 17th, 2009

Another QGIS plugin idea I have had is to create a method of splitting the map canvas within QGIS to have two side-by-side maps that can track and interact with each other.  There are lots of possibilities for this type of “reconfiguring” of the QGIS interface on the fly via plugins, so I decided to dive in and give it a go.

Here is a link to a video showing some of the basic operation of the MirrorMap plugin.

*** This plugin is very “Alpha” in that it makes the size of the map canvas static after invoking the plugin (until you launch QGIS again), does not handle layers of differing projections, does not allow for re-ordering layers in the mirror canvas, and many other deficiencies I am sure.  But hey, its just a test!

MirrorMap in action

MirrorMap in action

GIS Tool Dev, General

Debugging QGIS Plugins…

February 6th, 2009

Well, the title might better read “debugging PyQt applications…”, but much of my PyQt foo happens when developing QGIS plugins.  In general I am old school… emacs and gdb are my friends.  When it comes to developing in PyQt there is one life saving code snip that will make your life much easier:

from PyQt4 import QtCore
import pdb
...
QtCore.pyqtRemoveInputHook()
pdb.set_trace()

This not only sets a trace (breakpoint) in your code, but it stops the PyQt event loop.  The call to pyqtRemoveInputHook() is a tasty little tidbit in PyQt to allow for this “stop it in it’s tracks” behavior. This is a must have for debugging PyQGIS or Python based plugins.

Once you are in pdb, you are set to go with interactive debugging:

--Return--
> /home/aaronr/.qgis/python/plugins/refmap/refmap.py(101)__init__()->None
-> pdb.set_trace()
(Pdb) bt
<string>(1)<module>()
/home/aaronr/.qgis/python/plugins/refmap/refmap.py(144)initGui()
-> self.refmap_gui = ReferenceMapWindow(self.iface,flags,self)
> /home/aaronr/.qgis/python/plugins/refmap/refmap.py(101)__init__()->None
-> pdb.set_trace()
(Pdb) print self
<refmap.refmap.ReferenceMapWindow object at 0x8cc6c2c>
(Pdb) print self.iface.mainWindow().windowTitle()
Quantum GIS - 1.1.0-Unstable-trunk
(Pdb)

Happy debugging!!!

GIS Tool Dev, General

New python qgis plugin… raster file path info…

January 14th, 2008

http://blog.qgis.org/?q=node/104

As I noted over on the QGIS blog I have started to organize my python plugins and will be adding more soon.

GIS Tool Dev, General

Updated install notes for Mapserver 5.0 with AGG on FC8

January 14th, 2008

Had the need to install Mapserver/PostGIS/GDAL etc on a FC8 box.  While 99% of what I do now is on Ubuntu (here are some notes and vids on installing there)… I occasionally need to play on a Fedora box.  So, here are some recent install notes from a bare bones FC8 box to get it all going from source…

GIS Tool Install, General

QGIS on the eee…

January 6th, 2008

Well, I got Ubuntu 7.10 installed on an 8 gig SDHC card and away I go…

4.5 gigs used for the base Ubuntu system as well as the base GIS software:

1) Proj4 (4.6.0)
2) GDAL/OGR (1.5.0)
3) GEOS (3.0.0)
4) Postgresql (8.2.5)
5) PostGIS (1.3.2)
6) QT dev environment (4.3.2)
7) QGIS svn (0.9.2)

What do you get? Well, an ultra portable GIS workstation weighing in at less than 2 lbs that is very fun!

Check out a video:

http://www.reprojected.com/presentations/Videos/eee_qgis_install/eee_qgis_install.html

GIS Tool Dev, GIS Tool Install, General

Getting QGIS to install on windows AND support Python apps…

October 11th, 2007

So here are the simple (kind of) steps as of today to get a windows install of QGIS working that supports PyQt and the python bindings to QGIS… all with out having to compile anything:

1) Make sure you have Python 2.5 or newer installed on your machine… if you don’t have it you can download it from HERE (official) or HERE (my archive).

2) Install PyQt4.3.1 from HERE (official) or HERE (my archive)

3) Download and unpack THIS zip file. Copy the PyQt4 directory unpacked from the zip into your Python 2.5 site-packages directory. Make sure to save the old PyQt4 directory in the site-packages by renaming it in case something goes wrong!

4) Download and install QGIS from HERE (my archive). This is the latest release candidate from what_nick that is based on the Qt4.3.1 series.

5) In the QGIS install there are some GRASS documentation files that are missing and can cause warning dialogs to pop up when using the GRASS toolbox. You can unzip the contents of THIS archive into the QGISDIR\grass\docs\html directory to stop the warnings.

You can still follow the instructions HERE to build QGIS yourself and play to your hearts content, but I know that there are many windows users out there that really would just like to get moving without the hassle of compiling. This post is for you.

GIS Tool Install

New Open Source Paper Submitted

March 2nd, 2007

CZ07

Just posted an extended abstract for Coastal Zone 07 to take place in Portland OR July 22nd-26th. Great to get some more Open Source geospatial published…

Conferences, GIS Projects, GIS Tools, OSGeo

New build notes for a web-based OSGIS stack on FC3 and FC4

January 11th, 2007

I went ahead and added some build notes that I have created in the past for setting up new Fedora based machines with a web GIS stack. Currently building on FC6 and will post soon. Hope this helps some folks out.

FC3 and FC4

Also, added a couple more historical presentations for archiving!

GIS Tool Install, General

FREE web hosting for non-profits

December 9th, 2006

Man you cant get any better than this:

http://wiki.dreamhost.com/index.php/Non-profit_Discount

We at Ecotrust just signed up… can’t beat 1/2 terabyte of storage and 5 terabytes of bandwidth… FREE!

This personal blog is hosted there as well under my personal account, but if you are a non-profit interested in playing with Mapserver/PostGIS/GMT/GRASS you can check out my post on installation in this environment to get up and running with web mapping… FOR FREE!!!

Enjoy

UPDATE (12/09/06): For those who are not in the non-profit world but are still interested in Dreamhost for cheap hosting I just created a promo code that gives the FULL $97 discount to you… Nothing to me.  Dreamhost works on this crazy “reward” system for getting people to use you as a referal, offering a finders fee to the current customer.  I have created this code to apply all of the finders fee to your discount… I get NOTHING.  It is ZPULLEYFULL , enjoy!

GIS Projects Ecotrust, GIS Projects Personal, GIS Tool Install

New Open Source based web mapping app – Map-Fu

December 8th, 2006

A local group here at Portland State University has just announced a new mapping interface into the mix. Check out the live demos and download the code. Looks to be a great resource! Thanks guys…

We are delighted to announce a new open source framework for web-mapping, your personal Ninja of web-mapping, ladies and gentlemen, it’s:

*Map-Fu*

Available for download, contribution of code, or reporting of bugs at our not-so-secret location on sourceforge: http://sourceforge.net/projects/map-fu/

It features a true object-oriented PHP-Mapscript backend, with a variety
of classes and interfaces, ease of extensibility, and other
configuration zoink-zoink.

On the front end is a fat Javascript client, using XMLHttpRequest to communicate with the server for updating the map and map-related data. It employs JSON for messaging and goes for a Web 2.0 feel. Some features on the front-end include pop-up tabs for reference map, legend, map information and query results. We try to maximize screen area for the map, since that’s what we are interested in visually!

Based on Minnesota Mapserver (of course) and PostGIS, we developed this interface to satisfy actual needs of clients for creating web-mapping applications that served SPECIFIC needs and required SPECIFIC tools.

Some production sites that are using the Map-Fu or related codebase (formerly known as YAMI (Yet Another Map Interface)):

http://glaciers.us – A database of glacier change in the Western US, including a linked assets database of aerial and oblique photos from the last century

http://www.oregongeology.com/sub/ogdc/index.htm – The most up-to-date geology compilation for Oregon, soon to be used for other states!

http://oscdl.research.pdx.edu/ – Oregon Sustainable
Communities Digital Library, a temporal database of regional planning for the Portland Metro area (ten years of regional planning data, plus links to documents tied to spatial objects)

We look forward to collaborating with a larger group of developers, and receiving feedback on our efforts! We’re interested in incorporating the OpenLayers interface, and “through the web” feature editing via WFS-T.

In the current vacuum of viable enterprise GIS solutions, we see this as a ripe time for rapid development!

The Map-Fu development team,
Morgan, Cris, Tim, Percy & Will
Portland State University
—-

GIS Projects, GIS Tools, Uncategorized