wiki:FdoGdalNotes

Version 8 (modified by jbirch, 17 years ago) ( diff )

Minor formatting. Info on current status

FDOGDAL Raster Provider

The fdogdal provider is the open source raster provider for FDO (and hence MapGuide). It is implemented on top of the GDAL raster library. Frank Warmerdam (warmerdam at pobox.com) is the primary author of fdogdal. Questions about the provider may asked on the fdo or mapguide users lists.

Documents

For MapGuide Users

Using fdogdal in Autodesk MapGuide Studio

To publish rasters using the open source raster provider with Autodesk MapGuide Studio use the following steps:

  1. Start Studio and connect to your MapGuide Open Source 1.1.0 server.
  2. Then do File > New > Data Connection...
  3. In the Connect To Data dialog that comes up, select OSGeo FDO Provider for Raster, then press OK. An editor that says "Configure a Feature Resource using the Generic Editor" will display.
  4. In the Connection Properties grid, there is a DefaultRasterFileLocation property. Click in the value column and enter the directory where your image files are. On Linux it has the form /home/thf/myimages and on Windows it has the form C:\myimages.
  5. The configuration of the raster source is now complete, save the resource and start using it.

Notes:

  • The layer definition preview will not show the raster. In order to preview the data, create a map definition and set the extents of the map to contain the raster data. If the extents are set correctly the raster data should show in the preview.

Debugging with Rasters

It can be instructive to run MgServer.exe at the command line in interactive mode, with the CPL_DEBUG environment variable set to ON. This will report various GDAL level debugging output. At the very least this should give an idea of the files that GDAL is trying to open.

eg.

  cd \"Program Files"\MapGuideOpenSource\server\bin
  set CPL_DEBUG=ON
  mgserver stop
  mgserver run

Frank's fdogdal Downloads

MapGuide 1.1.0

Visit the Frank's fdogdal 3.2.0 updates for MapGuide 1.1.0 download site for ecw, and mrsid support, as well as several bug fixes and features improvements:

http://home.gdal.org/dl/mapguide/

There are instructions in these packages, but basically you just unzip into the C:\Program Files\MapGuideOpenSource\Server\Bin directory.

MapGuide 1.2.0

MapGuide 1.2.0 uses FDO 3.2.2, and requires a slightly different procedure. Do not download the mg_fdogdal_110.zip file from Frank's site. First, download and apply the ECW and MrSID packages from Frank's site as above. Second, obtain the MapGuide 1.2.0 gdalfdo patch and apply it in the same manner.

Raster performance enhancements

Raster performance in the current released provider degrades when accessing many image files for a single layer. This is because there was no way of referencing the spatial bounds of each image without opening the image and asking it "Image, what are your bounds?".

In order to address this problem, the raster provider's config file schema was extended (initially to meet the same need with the proprietary Autodesk raster provider) to store bounding boxes for the images in the feature source. Using this new schema as a guideline, Frank has added preliminary bounds support to the fdogdal provider, and this has been sucessfully tested in several environments. Further testing is encouraged.

Downloads

These files are required to test the bounds functionality:

  • Jason's php script for generating an image FeatureSource and config file from images in a directory on the server Source | TXT ZIP

Usage

  1. Install the new fdogdal package into the C:\Program Files\MapGuideOpenSource\Server\Bin directory (make a backup of the gdal.dll and GRFP*.dll in the FDO directory first)
  1. Place Jason's script in the C:\Program Files\MapGuideOpenSource\WebServerExtensions\www directory. Check the user-defined variables at the top of the script to ensure that they match your configuration
  1. Run this script in your web browser (e.g. http://localhost:8008/mapguide/configbuilder.php ). Enter the path to your images and the location you want the new FeatureSource created. If all goes well, you will be informed of the sucessful creation of the FeatureSource

Please, let us know how this works on the MapGuide users, or FDO users mailing lists.

Status

Currently, most of these modifications have been applied to the FDO 3.2.x branch. An official package has not yet been created. Haris was experimenting with a couple changes to help with stability under concurrent access, but we have to wait until he gets back in a couple weeks to find out what those were...

Note: See TracWiki for help on using the wiki.