16 April 2007

uDig featured on Very Spatial TV

uDig has just been featured on Very Spatial TV's latest episode as part two of their series about GIS on a mac. It consists of a quick demonstration of downloading and installing uDig, as well as viewing a couple shapefiles and a WMS layer. Some basic editing is also shown.

Check it out if you want to see a quick demo.

Labels:

19 June 2006

uDig and Open Standards

GeoInformatics.com has a recent article about open source and open standards in the GIS world. uDig and Refractions Research are mentioned near the bottom. I enjoy the parts where they mention uDig's user-friendliness:

The "user friendly" part of the name shines through since users can simply drop URLs (Web addresses) of Web services onto the uDig map window and have them added to the map. Refractions takes great pride in its product's role in OGC Web Services Initiative Phase 3. Says Ramsey, "I think I am most impressed by the different usability of the different clients in the final demonstration; simply compare the amount of interaction required to display airports using a feature portrayal service. uDig [required] one drag and drop every thing else was automated others required up to three catalog lookups, and cut-and-paste URLs."

12 April 2006

EasyEclipse is out!

Just a quick note to point out EasyEclipse has been released! Download only one file and you have a fully functional Eclipse workbench. This is really cool, as we use Eclipse quite a bit at Refractions, not just for uDig development, and have often experienced problems setting up Eclipse (downloaded the platform, rather than SDK, etc). We hope to maybe snag the installer they use for the mac and use it for uDig :)

11 April 2006

Debug Tracing for your Eclipse Plug-in

Here is a quick tutorial I wrote because I was sick of trying to figure out how to add tracing support to my plug-ins, as I would forget how to do it each time.

Adding debug tracing in your plug-in:

Debug tracing support allows you to enable debugging during execution inside Eclipse and get more information back. It allows you to pepper your code with helpful information and actions that are not normally executed except while debugging.

The example used in this article is of a plug-in named "org.ossim.renderer" that contains some code to render images. There is a need to print out information about those images while debugging, so tracing support is desirable.

.options file

Create a file named ".options" in the root directory of your plug-in. (This should be in the same directory as plugin.xml, .project and .classpath, and *not* the same directory as manifest.mf)

So:
plugins/org.ossim.renderer/.options

org.ossim.renderer/debug=true
org.ossim.renderer/debug/rendering=true


Each entry is an entry for the tracing menu that is displayed in the Run.../Debug... dialog. They are hierarchical, so the top element here is "debug" that has one child element, "rendering". If "debug" is enabled when the program is being ran, rendering will be enabled too.

The value for each entry can be "true" or "false" and sets the default state for that tracing option. True usually works fine.

Here you can see the debug and debug/rendering options in the Run... dialog:


That is really all that is required, but there are some recommendations to make using tracing easier.

Plugin class

Static isDebugging method:

In your Plugin class, add this method:

/**
* Performs the Platform.getDebugOption true check on the provided trace
*
* @param trace constant, defined in the Trace class
* @return true if -debug is on for this plugin
*/
public static boolean isDebugging( final String trace ){
return getDefault().isDebugging() &&
"true".equalsIgnoreCase(Platform.getDebugOption(trace)); //$NON-NLS-1$
}


Static trace method:

In your Plugin class, also add a method that provides a mechanism for tracing:

/**
* Outputs a message or an Exception if the current plug-in is debugging.
*
* @param message if not null, message will be sent to standard out
* @param e if not null, e.printStackTrace() will be called.
*/
public static void trace( String message, Throwable e) {
if( getDefault().isDebugging() ) {
if( message != null ) System.out.println( message );
if( e != null ) e.printStackTrace();
}
}


Trace contants class

Create a constants class for your tracing constants. I used org.ossim.renderer.Trace:

package org.ossim.renderer;

/**
* Constants for use with Eclipse tracing API.
* Sample use:<pre><code>
* import static org.ossim.renderer.Trace.RENDERING;
*
* if( RendererPlugin.isDebugging( RENDERING ) ){
* System.out.println( "your message here" );
* }
* </code></pre>
*/
public interface Trace {

/** You may set this to "true" in your .options file */
public static final String RENDERING =
"org.ossim.renderer/debug/rendering"; //$NON-NLS-1$
}


Usage

That's it. Now you can use it:

int width = Math.abs(max.x - min.x);
int height = Math.abs(max.y - min.y);

if (RendererPlugin.isDebugging(Trace.RENDERING)) {
System.out.println("Width: " + width + ", height: " + height);
}

24 March 2006

EclipseCon 2006 Day 4

I skipped the Borland keynote so I could pack up my stuff and get ready to return to Victoria. I started the day with a talk on Testing Applications Using the Eclipse Test and Performance Tools Platform (TPTP) which included an amazing demonstration of automated GUI testing. TPTP is definitely something that requires more research and contains many interesting elements including manual testing, performance testing, execution histories.

Next was an Overview of RCP GUI Building Tools for Eclipse, which was a little dry, consisting of PowerPoint slides of point-by-point features of Visual Editor, WindowMaker and Jigloo. I think a demonstration would have been better. I snuck out before the finish, so I probably missed any demo, if there was one.

Had lunch with Martin, and we took the jFire, jLibrary and uDig placards and merged them all into one "Open Source" table. The table actually filled up and we met a couple new people, including Ira Heffan, who gave a talk titled "Getting your Plug-in Legal: A Primer for Eclipse Developers" which I wish I had attended rather than the GUI tools one. We all chatted about open source projects and the reasons for choosing licenses. Also met Dicky Johan from hippojump.com who is working on interesting agent software. Also at the table was Jens (didn't catch his last name or what he worked on) from Denmark and we had a great exchange on the issue of Hans Island.

I then shadowed Philippe Ombrédanne from room to room. This guy gives great talks! His first one was a nine minute long rant about Eclipse entitled Top ten Eclipse Annoyances. He then briefly talked about ten great, strange or weird open source plug-ins and RCP applications. Applications that he noted that I think warrant further investigation are Mylar (of course), eclipseutils, abbot, RSSOwl and anyedit. He then joined John Kaplan and gave a long talk about Contributing to Eclipse that detailed the process of successfully reporting, fixing and submitting bugs and feature enhancements to Eclipse.

Last was a talk by Jeff McAffer regarding best practices for programming Eclipse and OSGi. I was fairly tired at this point and had trouble following along, but of the topics I did notice, we are following them already in uDig. I said good bye to Alex, Daniel and Martin, had some Thai food and made my way to the airport. The flight itself was quite an ordeal. Despite numerous setbacks, I made it to Seattle early.

That was a fantastic conference and I am looking forward to hopefully attending next year.

23 March 2006

EclipseCon 2006 Day 3

Comparing Apache and Eclipse

This keynote speech was given by Greg Stein of Apache/Google. Ed Burnette has a good summary.

Morning

I spent the first half of the day giving more demonstrations of uDig. It was fairly quiet in the morning but picked up quite a bit later on. I became acquainted with Alexander Bieber and Daniel Mazurek of jFire. Billy Biggs and Ben Konrath of GNOME both helped me diagnose some of the problems we have been running into with uDig and GNOME. I also met Vladimir Varnica of Omondo. Mark Powell of NASA's Jet Propulsion Laboratory stopped by, as he was interested in how uDig converts the AWT BufferedImage generated by GeoTools to an SWT image.

Building a Community For Your Open Source Project

After the exhibit hall closed, I attended Ian Skerret's talk about open source communities. Some good information there, and I can say that his recommendations have been very successful in the uDig community. He is interested in using uDig as a case study as a successful use of RCP.

Short Talks

I then attended a series of short talks:
Eclipse and GCJ/GIJ for Linux: About packaging up Eclipse so that it can be provided in Linux distributions. I should try running uDig in GCJ sometime :)
Managing APIs with the Eclipse API Scanner: This one was quite interesting, and seemed to be a very powerful tool to ensure that an API is always functional and documented, and helps prevent API breakage.

I then attended the poster reception (food and free beer!) with Alex, Daniel, and Martin. I chatted a bit with Duane Ellis, who has run into more internationalization problems than uDig could ever hope to.

BOFs

I attended the BIRT (Business Intelligence and Reporting Tools) BOF. I didn't get much out of it, as it was fairly advanced and I haven't even really looked at BIRT before. There is a possibility that we could use it for printing in uDig.

More interesting was the later Update Manager and Repository BIRT, with several interesting people. A lot of issues about the current update manager in Eclipse were raised, and further discussion will continue on the platform-update mailing list.

I got back to the hotel near midnight and pretty much collapsed.

21 March 2006

EclipseCon 2006 Day 2

So today was the start of the Open Source Pavilion at EclipseCon, I spent almost the entire day there. I decided to head back to the hotel once it was finished rather than participate in any of the BOFs. My feet are quite tired and I am feeling quite tired myself.

Morning

The Pavilion opened at 9:30 and I was there right as it opened. My neighbours included Colin Samplaneau of Spring, Martin Perez of jLibrary, Carsten Pfeiffer of KDE, as well as the two guys from jFire whom I hope to speak with more tomorrow. Also nearby was GNOME and RadRails.

We were all located in the back corner of the exhibit hall, and we did not receive very much traffic in the morning. Around lunch a large wave of people came in as the other talks ended.

Mylar: A Task Focused UI For Eclipse

At 13:00 we had a break for two hours, so found a comfortable chair and just relaxed and at some food for a while, then I attended Mik Kersten's talk on Mylar. Us uDiggers know about the Mylar project, but I had never seen it in action before, and it is much larger than I thought. It seems capable of making development in Eclipse much more usable. I will definitely try it out when I return.

We implement a small Mylar-like feature in Eclipse that, when enabled, brightens the selected layers in contrast to the others. I am hoping he might stop by tomorrow and I can give him a demo and perhaps receive some input.

Evening Reception

At 15:00 we were all back at the pods and demoing away. Traffic steadily increased until there were actually people crowding around the pod and the laptop staring at uDig. It probably helped that they stationed an alcohol bar and food table nearby (Free beer! And delicious food - tempura vegetables, fruit, and miso tofu. Very delicious!). There was a fairly steady flow of people until closing time.

Some of the people who stopped by include:
Nick Edgar, one of the leader developers for the Eclipse RCP who asked for feedback on our experience with RCP, but I am afraid I did not give a very useful answer; Bruce Donald Campbell from the University of Washington, who was interested in UVic's Neptune project, as well as deep-sea research in the Juan de Fuca Strait; Lorenz Maierhofer of Logic Mind Guide; Anna Griffith of Discovery Machine who wanted to know if uDig could assist her with her gardening; and Dag Rende of Total Eclipse.

Some interesting notes:

Two people asked if we had thought about having the framework aspect of uDig hosted as an actual Eclipse project. I hadn't even thought of that before.

Jody's location view was a big hit. Combined with NASA's JPL satellite imagery, people were able to look at the area around their houses.

The update manager and community space also seemed very popular.

It looks like some photos have been posted. I saw Ed Burnette take a picture of the uDig pod, so hopefully it will be posted at some point.

I have also thought that it might be a fun idea to start an open-source BOF for tomorrow night, although it might be more interesting for me to attend some of the other ones.