[fdo-users] New FDO Provider and using it in Map 3D

Robert Fortin robert.fortin at autodesk.com
Tue Sep 11 17:50:31 EDT 2007


Hi Piet!

You could have expected the Map FDO Data Connect Dialog to look for the
properties IsPropertyFileName or IsPropertyFilePath from the
IPropertyDictionary interface to figure out if a connection property is
a file or a path and, base on that, show proper control to select either
a file or a path.  But it is not the case!  The default dialog that you
see doesn't make use of those properties.  

BUT There is a solution to your problem: define a custom connection
control specific to your provider that would show into the Data connect
dialog.  It is documented in the document help/sdk.dev.net.gis.chm
under Map install path.  Look for Data Connect and follow the
instructions.

To help you get started, I have attached a sample that work with the SDF
provider renamed to OSGeo.MYSDF.3.2.  Just update the reference to the
FDO, Autodesk and Map dlls and build it.  Then put the dll under
<Map>/Plugins/DataConnect. Edit the providers.xml file and change or
create a copy of the SDF info and change the name to
<Name>OSGeo.MYSDF.3.2</Name>.

After that, when you start Map, a special UI will let you pick the name
of an SDF file by selecting the MYSDF provider. 

Hope it helps.

RF

-----Original Message-----
From: fdo-users-bounces at lists.osgeo.org
[mailto:fdo-users-bounces at lists.osgeo.org] On Behalf Of Piet Bibber
Sent: Tuesday, September 11, 2007 5:20 AM
To: fdo-users at lists.osgeo.org
Subject: [fdo-users] New FDO Provider and using it in Map 3D


I have just created a new FDO Provider (supporting Nen1878) and
struggling
with 2 items:

1) the icon in the 'data connect'-dialog indicates a database, yet the
GetProviderDatastoreType returns FdoProviderDatastoreType_File
1a) what do I need to implement to get the browse for file and browse
for
directory buttons?

2) The Geometry column shows a 0 (zero) for Geometric Types, albeit I
return
a 'FdoGeometryType_Point' primitive in CreateCachedGeometry (called by
'virtual FdoByteArray* GetGeometry (FdoString* identifier)')

extract:
FdoGeometryType fdoGeomType  = FdoGeometryType_Point;
FdoInt32        dimensionality = FdoDimensionality_XY;
FdoInt32        numPointOrds = 2; // Always 2. (No Z or M)
FdoInt32        numPositions = 1;

fgfByteArray->Clear();

fgfByteArray = FdoByteArray::Append(fgfByteArray, sizeof(fdoGeomType),
(FdoByte *) &fdoGeomType);

DoublePoint dp(0.,0.);

numBytesForOrdinates = numPointOrds * sizeof(double) * 1; 
fgfByteArray = FdoByteArray::Append(fgfByteArray,
sizeof(dimensionality),
(FdoByte *) &dimensionality );
fgfByteArray = FdoByteArray::Append(fgfByteArray, numBytesForOrdinates,

(FdoByte *)&dp );


Q1: When is the Geometric Type set? During schema creation or when
passing
the geometry (I think the latter)

Thanks up front
// Piet
-- 
View this message in context:
http://www.nabble.com/New-FDO-Provider-and-using-it-in-Map-3D-tf4421295s
18162.html#a12610933
Sent from the fdo-users mailing list archive at Nabble.com.

_______________________________________________
fdo-users mailing list
fdo-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/fdo-users

-------------- next part --------------
A non-text attachment was scrubbed...
Name: MySDFPlugin.zip
Type: application/x-zip-compressed
Size: 6901 bytes
Desc: MySDFPlugin.zip
Url : http://lists.osgeo.org/pipermail/fdo-users/attachments/20070911/d2dcf5e7/MySDFPlugin.bin


More information about the fdo-users mailing list