Another release already? Yes indeed!
There were 2 reasons for this new release.
Firstly, the previous 1.4 release had a major oversight where the windows installer did not bundle a required dll needed for the new
FdoCmd tool to work, so it was totally broken out of the box in both the 1.4 and 1.4.1 releases. This release now properly bundles the missing dll, making this tool finally operational for the first time for you all.
Secondly, this release include a new major feature that was originally slated to be part of the 1.4 release, but got shelved due to
stability issues around the FDO .net wrapper that was resolved with
the 1.4.1 release. And for this announcement post, I'll be talking about this feature in great detail.
That feature, is the long overdue integration of MgCoordinateSystem from the MapGuide API for
coordinate system support. Here's how we use the MgCoordinateSystem integration in FDO Toolbox.
Transforming Features in Bulk Copy
Let''s start with the obvious place, bulk copying now supports optional transformation of geometry features. This is expressed in several different ways.
In the main bulk copy editor, when specifying a spatial context override with a different coordinate system WKT like so.
There is now a new flag that you can toggle to indicate that this override should be interpreted as an instruction to transform geometries for the source coordinate system WKT to the coordinate system indicated by the override WKT.
This method of enabling transformation may look a bit un-intuitive if you're accustomed to using tools like ogr2ogr where you state upfront what the source CS is and what target CS you want to transform to. The reason for this is due to the concept of spatial contexts in FDO. In FDO, coordinate systems are not set explicitly, they are
inferred through its spatial context. Thus the UI to enable transformation stems from the constraint imposed by FDO's spatial contexts. We can't set a source or target CS, we have to
override what is inferred by FDO.
When using the SDF/SQLite dump context menu command, the UI has an option to allow transforming the dumped features to the specified coordinate system.
When you click the
Pick CS button, a dialog appears that you should be familiar with. It's the same coordinate system picker dialog from MapGuide Maestro and fulfills the same purpose here in FDO Toolbox as it does in Maestro.
Streamlining Various UI
Any UI that deals with spatial contexts now take advantage of the newly integrated coordinate system picker to help auto-fill most, if not, all of the fields in question.
For example, creating a spatial context now can use the coordinate system picker to auto-fill in most of the fields in the UI
Similarly, when creating a new RDBMS data store, you can use the coordinate system picker to pre-fill the sections about the coordinate system and extents
And from the previous bulk copy example, you can easily override a source spatial context by picking an existing coordinate system.
FdoCmd enhancements
Not only will you finally get a functional FdoCmd tool in this release, it has also been enhanced with various integrations with the new coordinate system functionality.
- Any command that outputs geometry data will have new options to allow transforming it to a target coordinate system
- Creating spatial contexts can use an existing coordinate system to fill in most of the required spatial context information.
- The bulk copy commands has support for transformation and can use an existing coordinate system as the basis for specifying the WKT of any override spatial context
- When listing spatial contexts, we'll now use the new coordinate system facilities to resolve/display the corresponding mentor/EPSG code for any coordinate system displayed
Also FdoCmd receives a whole series of new commands for interacting with the coordinate system facilities:
- enumerate-cs-categories for listing all categories from the coordinate system catalog
- enumerate-cs for listing all coordinate systems for a given category
- find-cs-by-code for fetching and displaying details of a coordinate system from an input mentor CS code
- find-cs-by-epsg for fetching and displaying details of a coordinate system from an input EPSG code
- wkt-to-cs-code for obtaining a mentor CS code from an input coordinate system WKT
- wkt-to-epsg for obtaining an EPSG code from an input coordinate system WKT
- cs-code-to-wkt for the inverse of wkt-to-cs-code
- epsg-to-wkt for the inverse of wkt-to-epsg
- is-valid-wkt for validating coordinate system WKT strings
A small caveat
If you've used CS-MAP (or its MgCoordinateSytem wrapper in MapGuide), you'll know about its legendary support for nearly every coordinate system in existence on Planet Earth.
But that support comes at a price: The size of our installers/installation suffers as a result.
To support so many coordinate systems requires country-specific grid data files that are:
- Huge
- Difficult to compress due to their binary nature
So to avoid making this installer a 300MB file, and making it a 30MB file instead, this release of FDO Toolbox only bundles the core CS-MAP dictionary data files and omits all of the country-specific grid files. Such files are available for download as a separate zip file on the 1.5 release page.
If you need these grid files for your coordinate system transformation (most likely, you are transforming from one CS to another and it is failing because it is looking for a certain grid file), just download the zip file (from the releases page) and extract the contents into the Dictionaries directory of your FDO Toolbox installation.
Other changes
- FDO Toolbox now ships with libpq.dll and libmysql.dll (dlls courtesy of the VS2015 build of GDAL/OGR from gisinternals) allowing for the MySQL and PostgreSQL providers to work out of the box without having to source these dlls yourself. King Oracle provider still requires you to source the Oracle 11g Instant Client binaries yourself.
- When bulk copying, we no longer try to create spatial contexts for names that already exist on the target connection
- More cases are handled when trying to convert an incompatible feature class when applying a schema to a target connection
In Closing
Barring bug fix releases to address any critical issues that show up after this release, I believe that FDO Toolbox 1.5 will be the last major release of FDO Toolbox I will be putting out for a while and the project will most likely return back to hibernation.
I had restarted this journey a few months ago to address some long standing pain points that had built up and with the completion of this coordinate system integration in this release, I feel this journey is now complete ...
... Until another series of annoyances and pain points builds up to critical mass in 5/10 years time perhaps :)