Friday, 24 April 2015

Custom GDAL binaries for MapGuide Open Source 2.6 and 3.0

A question that gets normally asked on our mailing list is how do you get the GDAL FDO provider to work with formats like ECW or MrSID. Our normal response would be (provided you are licensed to use ECW, MrSID or any other non-standard GDAL supported format) to point you over to GIS internals and grab one of their custom windows GDAL binaries to replace the GDAL dlls in your current MapGuide installation.

The reason we ask you to do this is because when we build GDAL for use with the FDO provider, we build GDAL using only the standard profile of supported formats. That is to say any format listed here:
Where the Compiled by default option is unconditionally Yes. It is not possible for us logistically to build GDAL/OGR with the proverbial kitchen sink of raster/vector format support, so that's where GIS internals comes in as their builds of GDAL/OGR have greater raster/vector format support. As long as you grab the same release of GDAL and make sure to pick the build that is built with the same MSVC compiler used to build the release of MapGuide/FDO you're using, you should then have GDAL and OGR FDO providers with expanded vector and raster format support.

This suggestion worked up until the 2.5.2 release, where the right version of GDAL built with the right version of MSVC (2010 at the time) was available for download. But for 2.6 and the (pending) 3.0 releases, this suggestion is not applicable because that site does not offer a MSVC 2012 build of GDAL 1.10, which is what MapGuide 2.6 and 3.0 both use for their GDAL FDO provider.

So this leaves some of you in a pickle, being stuck on 2.5.2 and unable to move to 2.6 or 3.0 because you need to support one of these esoteric data formats. Well, I have partially alleviated this issue for you.

Tamas has not only made these custom GDAL binaries for download, but also the development kits used to build these binaries as well. So in these past few days, I grabbed the MSVC 2012 dev kit, paired it with our internal GDAL 1.10 source tree in FDO and made a few tweaks to some makefiles here and there and here's the end result.

A custom build of GDAL 1.10 with support for the following additional raster data formats:
  • ECW (rw): ERDAS Compressed Wavelets (SDK 3.x)
  • JP2ECW (rw+v): ERDAS JPEG2000 (SDK 3.x)
  • FITS (rw+): Flexible Image Transport System
  • GMT (rw): GMT NetCDF Grid Format
  • netCDF (rw+s): Network Common Data Format
  • WCS (rovs): OGC Web Coverage Service
  • WMS (rwvs): OGC Web Map Service
  • HTTP (ro): HTTP Fetching Wrapper
  • Rasterlite (rws): Rasterlite
  • PostGISRaster (rws): PostGIS Raster driver
  • MBTiles (rov): MBTiles
And support for the following additional vector formats:
  • "PostgreSQL" (read/write)
  • "NAS" (readonly)
  • "LIBKML" (read/write)
  • "Interlis 1" (read/write)
  • "Interlis 2" (read/write)
  • "SQLite" (read/write)
  • "VFK" (readonly)
  • "OSM" (readonly)
  • "WFS" (readonly)
  • "GFT" (read/write)
  • "CouchDB" (read/write)
  • "ODS" (read/write)
  • "XLSX" (read/write)
  • "ElasticSearch" (read/write)
  • "PDF" (read/write)
You might notice some omissions from this list. Where's MrSID? Where's Oracle? Where's $NOT_COMPILED_BY_DEFAULT_DATA_FORMAT?

Well I did say I have partially alleviated the issue and not fully alleviated it. The issue is that due to what I gather is licensing restrictions, the development kit can't bundle the necessary headers and libraries needed to build GDAL with driver support for MrSID, OCI, etc. As such the custom build of GDAL I have made available does not include support for such formats.

What can be done about this. For something like Oracle, we already have a dedicated FDO provider for that. For something like MrSID? I'm afraid you're out of luck. You'll either have to stick on the 2.5.2 release for that much longer, or just bite the bullet and gdal_translate those MrSID files to something more accessible. I've heard some good things about RasterLite. I've also heard that you could get some great performance out of carefully prepared GeoTiffs

Any thing to liberate yourself from MrSID because you won't see the right GDAL binaries with this support built in for the foreseeable future.

You can find the download links for the custom GDAL builds in our updated GDAL provider guide for MapGuide 2.6 and 3.0.

One more thing before I finish that is worth re-iterating. Some formats like ECW, require you to be have a license to use ECW technology in a server environment. Other formats carry their own licensing shenanigans, so make sure you are properly licensed to use any of the the additional formats that are made available with this custom build of GDAL. The GISInternals build system repo on GitHub has all the applicable licenses in RTF format for your perusal.

Also worth pointing out is that this custom build of GDAL is not supported by me or anyone on the MapGuide development team. I only make this build available to you so you have the ability to access these additional data formats should you so choose and nothing more. There is no obligation by us to provide support for any issues that may arise as a result of using this custom GDAL release (inferred or otherwise). Use this custom build of GDAL at your own discretion.

/end lawyer-y talk. Enjoy!

Thursday, 2 April 2015

Announcing: MapGuide Maestro 6.0M4

Just so I don't scare you people off with the "alpha" label, I'll be calling these releases "milestones" instead :)

So here's the 4th milestone release of Maestro 6.0, here's the goodies you can find in this release.

MapGuide 3.0 support

Maestro now supports the new resource types and schema revisions introduced with MapGuide Open Source 3.0

The new Tile Set Definition resource has specialized editor support.

Map Definitions using the new schema, have the option of the choice of tile source

An inline tile source will be as before, where you can define base map groups and layers within the Map Definition.

An external tile source, will replace the base map UI with a new UI that simply asks for the Tile Set Definition you want to link against.

When linking against a Tile Set Definition, it is important to note that its coordinate system will take precedence

Also important to note is that you can only link to Tile Sets using the Default tile provider. Linking against XYZ tile providers is not supported in MGOS 3.0 and Maestro will prevent such an action from taking place.

MgCooker has also been updated to support tile seeding of Tile Set Definitions.

However, only Tile Set Definitions using the Default tile provider are supported. For Tile Set Definitions using the XYZ provider, consider using other tile seeding mechanisms for now.

FDO Expression and Filter support

Maestro now supports the ability to parse FDO Expression and Filter strings in pure 100% managed .net code without needing to use FDO itself. This feat was made possible through the use of the Irony language implementation library which made implementing the grammar and appropriate parsers for the FDO expression and filter syntax a dead simple affair.

With the ability to parse FDO Expressions and Filters, our Expression Editor is enhanced as follows:

We now have the ability to validate the given filter or expression for syntax validity.

With the ability to analyse the structure of FDO filters and expressions, we can now also ensure you are referencing valid identifiers in your filter or expression. Such invalid identifiers will be caught by the validation process.

Finally, a new tool is included that lets you see the parse tree of the given filter or expression.

As a developer, this functionality is accessible in its own 100% managed .net class library (OSGeo.FDO.Expressions.dll) should you have a need to parse FDO filters and expressions in your application without using FDO itself.

Reading user input from IronPython console

The IronPython script console now supports reading user input from stdin with Python's input() and raw_input() functions. Previously, you would've had to construct your own input GUIs and display them in order to capture any user input from your IronPython scripts.

With this in place, such workarounds are no longer required and allows for more flexible Maestro automation scripts as a result.

Advanced Stylization editor improvements

We've improved the Composite Symbolization editor to better work with component symbols.

Firstly, component symbols now show the applicable geometry context.

Secondly, component symbols can be re-ordered as ordering affects how the final composite style will look, so having the ability to re-order component symbols is important.

Finally, the best bit of these improvements is that now you can export a component symbol out to its own Symbol Definition.

This promotes better re-use of Symbol Definitions within layers as you can already use an external Symbol Definition as a component symbol. This new feature helps to make this process much more streamlined.

mapguide-rest support

Maestro now includes a dedicated addin to easily author up, upload and manage restcfg.json files in mapguide-rest.

This addin takes advantage of new authoring APIs introduced in mapguide-rest 1.0 RC1, and thus this is the minimum required version of mapguide-rest that this addin will work with.

This feature deserves its own blog post so stay tuned.

Other stuff

We've now moved to .net Framework 4.5. This means Maestro will no longer run on Windows XP.

From a developer perspective, we've done some major re-structuring to allow for better developer scenarios. The most pertinent example being that all the various ObjectModels assemblies have now been combined into a single assembly. Referencing this single assembly gives you the ability to work with every supported resource and schema revision from MapGuide 1.0 to MapGuide 3.0 as strongly-typed classes instead of XML.