You are on page 1of 5

Adding the OGR FDO Providers to Map 3D 2007

Ill start with a bit of background in case anyone is unfamiliar with


some of the
terminology. For those people who need to access geospatial
information in Map 3D and Mapguide (the geospatial products),
Autodesk has released an Open Source data access standard (yes,
another standard) referred to as FDO (Feature Data Objects). This
standard makes use of providers to access geospatial data in a
variety of formats. According to the Autodesk Developer website: A
provider is a specific implementation of the FDO API. It is the software
component that provides access to data in a particular DataStore
Without going into too much detail about APIs (Application
Programming Interface), DataStores, and the like, what the FDO allows
you to do is access data in the native format in an Autodesk geospatial
product: NO CONVERSION REQUIRED. Several of the providers ship
with the geospatial products including, but not limited to: Oracle,
ArcSDE, SHP, and MySQL. As stated earlier, this technology is OPEN
SOURCE. That means anyone can write new providers and plug them
into the software. The good people at the Open Source Geospatial
Foundation (https://www.osgeo.org), in combination with the GDAL
folks, have been busy working on some of these providers and have
been generous enough to provide them to the geospatial ecosystem.
They were
written with Mapguide Open Source in mind but you can easily use
them in Map 3D as well, you just need to know how to configure them.
So, heres an example of how to set up the current version of the OGR
provider in Map 3D 2007:
First, you need to go to the following page to get the provider:
https://mapguide.osgeo.org/servlets/ProjectDocumentList?
folderID=94&expandFolder=94&folderID=100
Once you are there, you should be looking for the .dll file, unless you
are prepared to compile it from the source code. Download the file
entitled: GRProvider_bin_win32.zip This file has the .dll you need
(OGRProvider.dll) and a README file that explains a few things about
the provider.
Note: The readme file is not included with the newest dll file. I will post
the original file as a separate file. <Murph>

What you are specifically looking for in the readme file are 3 things:
1. The location that the file should be copied to. In the readme
file it shows the location of the Mapguide folder. In this case
were using Map 3D, so it is incorrect. We want to place the
OGRProvider.dll in the following folder (with the rest of the
providers)
:C:\Program Files\Autodesk Map 3D 2007\FDO\bin
2. The next part we need out of the readme file is the
configuration for the
provider. The following is copied from the readme file:
<FeatureProvider>
<Name>OSGeo.OGR.0.1</Name>
<DisplayName>FDO Provider for OGR</DisplayName>
<Description>Access to OGR data sources</Description>
<IsManaged>False</IsManaged>
<Version>0.1.0.0</Version>
<FeatureDataObjectsVersion>3.1.0.0</FeatureDataObjects
Version>
<LibraryPath>OGRProvider.dll</LibraryPath>
</FeatureProvider>
This defines where the provider is, the version, and a few other
things. You can almost use it as-is but we want to make one
small modification. The Library Path line should read:
<LibraryPath> C:\Program Files\Autodesk Map 3D
2007\FDO\bin
\OGRProvider.dll</LibraryPath>

So, now we can make that modification to the provider


information. We need to edit an xml file and paste that text into
it. The file we need to edit is:
C:\Program Files\Autodesk Map 3D 2007\FDO\bin\providers.xml
Just a small warning:
PLEASE MAKE A BACKUP COPY BEFORE YOU ADD THE OGR
PROVIDER INFORMATION.
When youre finished, the file should look something like this with
the addition:

Make sure you save the file as a plain text file so there are no
formatting codes.
3. There is one other important statement in the readme file:
So far the OGR provider has been tested with:
SHP files
MapInfo files (.TAB)
Oracle Spatial
ESRI personal geodatabase (.mdb)
It does not currently support all of the OGR formats

(https://gdal.osgeo.org/ogr/ogr_formats.html) but it does support


Personal
Geodatabase files, TAB files, and give another option for SHP and
Oracle support.
Once you have copied the dll file to the correct folder and edited
the providers.xml (in plain text format), you should be able to
access the OGR provider in Map 3D. However, there is one small
detail to watch out for and this is not obvious. When you now
open Map 3D, the Add Data box should show the OGR provider in
the list.
However, when you click on it, you may not see any text boxes in
the dialog and therefore, you cant enter the source to the data
files.
The problem is the shortcut on your desktop. By default, the
shortcut is set up to Start in the UserDataCache folder:

You must edit the Start in: box so it starts in the Autodesk Map
3D 2007 folder. The entry should read something like:
"C:\Program Files\Autodesk Map 3D 2007\"

Once you have edited the shortcut, restart Map using the new
shortcut and the OGR provider should work as expected. Also, on
some versions of XP new .dll files copied to a system may be
blocked if the system does not recognize them. Find the file in
Windows Explorer, select it, right click and select the Properties,
then use the Unblock button if it appears.
If all went well, you should see something similar to the image
below. There should be an OGR provider in the list and when you
click on it, you should get a few text boxes to enter the filename
and a few other properties. In this example, I am connecting to
the
Florida Department of Transportation road system. It is a 40 MB
file and the roads load in a few seconds.

Arnold Schwabe

You might also like