Saturday, June 27, 2009

FalconView Open Source Hits the Web

Not only has Georgia Tech published the source code for FalconView 4.3, but we have also published Windows installer binaries for the full application. All of this and more can be found on the FalconView web site. Please keep in mind that FalconView 4.3 is still young. We haven't even reached the beta stage because we're still polishing features that will appear in 4.3. The current build is suitable for developers and for folks who want to evaluate the application.

There are a handful of features for FalconView that should make it useful for the general public. We still support Shapefiles, GeoTIFF, and other popular GIS formats. We have the drawing overlay and the analysis tools for making your maps more useful. Also, we now support Google Earth KML / KMZ and Web Mapping Servers. A list of features, along with screen captures can be found here. Oh, and did I mention that my prized GIS Editor along with its source code is included?

Feel free to contribute to the project by writing plugin extensions for FalconView or by submitting improvements to Georgia Tech. The SDK is available on the web site along with a handful of other developer resources and examples. I'm usually glad to answer quick question for someone interested in coding for FalconView.

Download it and take it for a spin; just treat it gently while we work out the kinks.

Thursday, March 12, 2009

FalconView Interoperability

As I've mentioned here before, a version of FalconView will soon be released to the general public as open-source software.  This is exciting to me not only because the public will be able to contribute to the FalconView code base, but also because the public will be able to download, install and use FalconView.  FalconView scales through charts and images better than any other GIS software I've tried, so I'm expecting that we will see widespread use beyond the our traditional defense community.

Some products do better than FalconView at some GIS tasks: Google Earth is an excellent tool for presenting 3D imagery; ArcGIS is the leading general-purpose GIS tool for advanced GIS users; Quantum GIS makes it easy to connect to PostGIS.  FalconView started in the early 1990s before industry GIS standards were mature.  Because FalconView development has been tailored to government needs, FalconView doesn't do a great job of interoperating with other GIS products.  With the FalconView open-source release, Georgia Tech hopes to change this.

The public version of FalconView 4.3 will include a new common data architecture that more closely aligns FalconView with the industry standards published by the Open Geospatial Consortium.  The data architecture arranges data sources in a format that will be familiar to ArcGIS and OGR users: data sources contain data sets, data sets contain features, and features have a geometry and fields.  Geometries are defined per the OGC simple features specification.

The point of this common data architecture is interoperability.  Using the architecture prototypes Georgia Tech has already demonstrated interoperability with PostGIS, WMS, KML and a few other formats.  The KML functionality will be released with FalconView 4.3, and support for some other formats - WMS for one - will likely be included with other formats forthcoming.

This is exciting stuff.  Hopefully we can continue to improve FalconView's interoperability with industry standards so that the product becomes a useful tool for a wide range of GIS applications.  Here is a link to a slide show that we recently gave to the government to describe what we're doing.  I'm sorry that the slides don't stand too well on their own, but hopefully they get the point across.  If some of our architecture looks familiar, that's good: we're aligning with paradigms that experienced GIS users, analysts and developers are already familiar with.

Friday, February 13, 2009

New FalconView Web Site

In preperation for the upcoming FalconView open source release, Georgia Tech has launched a new web site for the FalconView project.  The new web site pulls together the main web site at falconview.org, as well as the developer wiki.  Check it out here.

Monday, November 3, 2008

Installing FalconView Client Editors

As discussed in the FalconView SDK, in order to install FalconView client editors, it is necessary to add an entry to the client editors registry key (under "HKLM\Software\PFPS\FalconView\Client Editors").  The trick with installing a client editor key is that the installer must determine which client editor number to use for the key.  I recently wrote a new FalconView overlay in C# .NET and thought I'd share some steps that other developers may find useful for installing FalconView overlays.  (I'm working in Visual Studio 2005, so the steps below are for that version.  These steps are somewhat broad as I assume that the developer is experienced enough to fill in some of the details.  I also assume that the overlay is being written in .NET as this example uses all .NET classes and assemblies.)

1.  Create a new Setup Project Using Visual Studio and Add Your Binaries to the Setup

I'll leave most of this work to the reader as this post is not meant to address this part of the setup.  Suffice it to say that you add your project outputs to a new setup project in a conventional fashion so that they get installed to the desired location on the user's PC.

2.  Add an Installer Class to Your Output Assembly

An installer class derives from System.Configuration.Install.Installer.  Installer classes have a number of methods that you can override in order to execute steps at certain points during an install.

3.  Add Code to Your Installer Class to Register Your Assembly for COM

FalconView uses COM to communicate with all its client editors.  This function is a short sample that shows how you can add a method to your installer class that will register your assembly for COM so that FalconView can find your overlay class.

private void RegisterAssembly(string assemblyFile)
{
  Assembly assembly = Assembly.LoadFrom(assemblyFile);
  new RegistrationServices().RegisterAssembly(assembly,
     AssemblyRegistrationFlags.SetCodeBase);
}

4. Add Code to Your Installer Class to Set the Client Editor Key

Here's the meat of this post.  The following method sets the client editor key so that your overlay becomes visible to FalconView.

private void InstallClientEditorKey(
   string classIdString, int interfaceVersion, bool isStaticOverlay)
{
   // get the FalconView client editors key

   RegistryKey clientEditorsKey = 
      Registry.LocalMachine.OpenSubKey(
      @"SOFTWARE\PFPS\FalconView\Client Editors", true);

   // create a list of taken client editor numbers

   List listTakenNumbers = new List();
   string[] subKeys = clientEditorsKey.GetSubKeyNames();

   foreach (string subKeyName in subKeys)
   {
      try
      {
         listTakenNumbers.Add(Int32.Parse(subKeyName));
      }
      catch (Exception) { } // probably just a key that isn't an integer
   }

   // find the first available client editor number

   int iFirstAvailable = 0;
   while (listTakenNumbers.Contains(iFirstAvailable))
      iFirstAvailable++;

   // create the client editor key

   RegistryKey overlayKey = 
      clientEditorsKey.CreateSubKey(iFirstAvailable.ToString());

   // create the values

   overlayKey.SetValue("classIdString", classIdString,
      RegistryValueKind.String);
   overlayKey.SetValue("interfaceVersion", interfaceVersion,
      RegistryValueKind.DWord);
   overlayKey.SetValue("isStaticOverlay",
      isStaticOverlay ? 1 : 0, RegistryValueKind.DWord);

   // clean up

   overlayKey.Close();
   clientEditorsKey.Close();
}

5. Call Your Methods From an Overridden Method in Your Installer Class

I choose to override the Install method on the installer class.  (For more documentiontation on Installer classes, consult MSDN.)

public override void Install(IDictionary stateSaver)
{
   try
   {
      base.Install(stateSaver);

      // register the assembly for COM
      RegisterAssembly(Context.Parameters["assemblypath"]);

      // install the FalconView client editor key
      InstallClientEditorKey("Server.Overlay", 3, true);
   }
   catch (Exception ex)
   {
      MessageBox.Show(ex.Message,
         "Install Failed", MessageBoxButtons.OK,
         MessageBoxIcon.Error);
   }
}

Note the use of Context.Parameters above.  This dictionary is how all of the install parameters are passed into an Installer class by the installer.

6. Add the Custom Action to Your Setup Project

When you add the custom action, you will need to specify the entry point for the action.


This screen capture shows where to set the EntryPoint property on the custom action.  When your install reaches the custom action, it will call into your Installer class and execute the actions there.

You could add additional logic to your install, such as checking to make sure the overlay isn't already installed and adding uninstall steps, but I'll leave that as an exercise for the reader.

Tuesday, October 28, 2008

Compiling libkml on Windows

Just a quick hint here for anyone searching for information on compiling libkml under Visual Studio. Version 0.4, which I just downloaded, won't compile the libkmlbase project unless you make a small modification to time_util.cc. Just change the order of the includes so that the winsock2.h include comes before the windows.h include. If you don't, you will get compiler errors such as, "error C2011: 'fd_set' : 'struct' type redefinition."

[[ UPDATE: Apparently there are other problems with using libkml in Windows. I just came across a linker issue where the symbol IsIconParent was undefined. To solve this problem, I had to add get_link_parents.cc and get_link_parents.h to the libkmlengine project and recompile. ]]

[[ UPDATE 5 Nov. 08: Both of these issues have been corrected as of version 0.5. ]]

Thursday, October 16, 2008

FalconView Open Source

Beginning with FalconView 4.3, FalconView will become an open source product.  Georgia Tech will distribute the code to FalconView to the general public, and installable binaries will be available.  The open source effort will include the main FalconView application and most of the overlays that come packaged with FalconView.

In order to accomplish this effort, we are reworking major parts of the FalconView architucture.  Historically, FalconView has included a standard set of overlays that built-in to the executible software and a set of "plug-in" overlays that may or may not be installed with FalconView.  Because some of the overlays are export-sensitive, all of the overlays for FalconView 4.3 will be pulled out and made into plug-in overlays.  This architecture will allow us to distribute a version of FalconView for the general public and a version of FalconView for the government.  The versions will be identical, except that the government version will include the threat overlay, the tactical graphics overlay, and some other components not available to the general public.

The FalconView team is excited about this effort.  We feel a great sense of ownership in our work and will be very glad to make the product available to a wider user base.  I'd expect that public betas of FalconView 4.3 will start hitting the internet sometime in the first half of 2009.  Stay tuned as for more news as events unfold.  Feel free to contact me for more details.

Wednesday, August 20, 2008

Geoprocessing in FalconView Using ArcGIS

I recently presented this paper at the 2008 ESRI User's Conference in San Diego. It's about much of what I've discussed on this blog recently, with some added technical details. Here are the slides from the presentation, in case you missed it.

[[ Note that the slides were originally generated in PowerPoint. I've uploaded them to Google for publication on the web. Some of the formating is a bit off, but they should get the point across. ]]