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

Dan Stoica dan.stoica at autodesk.com
Wed Sep 12 10:28:37 EDT 2007


> Also, I can't get geometry to show up (Q2 in my original email)

This might have something to do with the dataset extents:
- does your provider implement SpatialExtents() aggregate function?
- Did you try Map's "Zoom to extents" command?

Dan.


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


Thanks Robert indeed.
I got the dialog working already. More than I expected. nice.
Still, the little icon on the left of the Provider in the Data Connect
dialog shows the Provider as a database. How do I chance that?

Also, I can't get geometry to show up (Q2 in my original email),
although I
think I do return valid geometry in the GetGeometry function of the
Reader.

Thanks so much!
Piet



gregboone wrote:
> 
> Thanks Robert! This will help the community at large.
> 
> Greg
> 
> -----Original Message-----
> From: fdo-users-bounces at lists.osgeo.org
> [mailto:fdo-users-bounces at lists.osgeo.org] On Behalf Of Robert Fortin
> Sent: Tuesday, September 11, 2007 5:51 PM
> To: FDO Users Mail List
> Subject: RE: [fdo-users] New FDO Provider and using it in Map 3D
> 
> 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
> 
> 
> _______________________________________________
> fdo-users mailing list
> fdo-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/fdo-users
> 
> 

-- 
View this message in context:
http://www.nabble.com/New-FDO-Provider-and-using-it-in-Map-3D-tf4421295s
18162.html#a12632087
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


More information about the fdo-users mailing list