[fdo-users] Improving performance for NEN1878 provider, howto?

Badreddine Karoui badreddine.karoui at autodesk.com
Mon Oct 1 10:17:11 EDT 2007


Yes.

 

Badreddine

 

From: fdo-users-bounces at lists.osgeo.org
[mailto:fdo-users-bounces at lists.osgeo.org] On Behalf Of Piet Bibber
Sent: Monday, October 01, 2007 10:16 AM
To: FDO Users Mail List
Subject: Re: [fdo-users] Improving performance for NEN1878 provider,
howto?

 

Robert, Badreddine, Gavin

 

I do provide the extends and counts in Nen1878OptimizedAggregateReader.
Is that what you refer to?

Piet



 

On 10/1/07, Robert Fortin <robert.fortin at autodesk.com> wrote: 

Badreddine,

Isn't it the combination of count and spatialExtents that need to be
optimized?
I believe Map looks for the equivalent of

Select SpatialExtents(geometry), count(*)  from <class>

RF


-----Original Message-----
From: fdo-users-bounces at lists.osgeo.org 
[mailto:fdo-users-bounces at lists.osgeo.org] On Behalf Of Badreddine
Karoui
Sent: Monday, October 01, 2007 9:42 AM
To: fdo-users at lists.osgeo.org
Subject: RE: [fdo-users] Improving performance for NEN1878 provider,
howto?

Hi,

You may want to implement the FdoISelectAggregates command plus the
SpatialExtents and Count functions. If these two functions are not 
implemented, then Map will scan all the geometries to find the minimum
bounding rectangle of all the data.

Badreddine

-----Original Message-----
From: fdo-users-bounces at lists.osgeo.org
[mailto:fdo-users-bounces at lists.osgeo.org] On Behalf Of Piet Bibber
Sent: Monday, October 01, 2007 7:46 AM
To: fdo-users at lists.osgeo.org
Subject: [fdo-users] Improving performance for NEN1878 provider, howto?


Hello,

My NEN1878 provider is almost done, but performance is not so fantastic
when
reading the geometry; reading the schema is alright. 
That is stange, as I cache in the geometry when I read the schema
(NEN1878
schema discovery requires a full file scan; no seperate schema header).
(The
schema is read within 3 seconds for a 2.3MB file, including the geometry

and
attributes (all in memory (using STL)).
The SDF and SHP all seem so fast :-)

Map 3D seem to spend most of his time caching in the geometry (see
source
code below)

I based my provider on the SHP provider, the reader seem to use 
FDO_READER
template, but I can't find where that points to. Maybe there are better
optimized readers.

Thanks.
Piet

Excerpt from the source files:

   FdoByteArray * CreateCachedGeometry(FdoByteArray* fgfByteArray_I) 
   {
       FdoByteArray*   fgfByteArray = fgfByteArray_I; // it may be
reallocated
       int             count = mFeature->GetNumPoints();
       FdoInt32        numPointOrds = 2;
       FdoInt32        numBytesForOrdinates = numPointOrds * 
sizeof(double)
* count;
       FdoInt32        numParts = 0;
       FdoGeometryType fdoGeomType  = GetFdoGeometryType();
       FdoInt32        dimensionality = FdoDimensionality_XY;
       FdoInt32        numPositions   = mFeature->GetNumPoints(); 

       fgfByteArray->Clear();

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

       switch (fdoGeomType)
       {
       case FdoGeometryType_None: 
           break;

           case FdoGeometryType_Point:
           fgfByteArray = FdoByteArray::Append(fgfByteArray,
sizeof(dimensionality), (FdoByte*)&dimensionality);
           fgfByteArray = FdoByteArray::Append(fgfByteArray, 
numBytesForOrdinates,   (FdoByte*)mFeature->GetPoints());
                   break;

           case FdoGeometryType_LineString:
           fgfByteArray = FdoByteArray::Append(fgfByteArray,
sizeof(dimensionality), (FdoByte *) &dimensionality); 
           fgfByteArray = FdoByteArray::Append(fgfByteArray,
sizeof(count),
(FdoByte *)&count);
           fgfByteArray = FdoByteArray::Append(fgfByteArray,
numBytesForOrdinates, (FdoByte *)mFeature->GetPoints()); 
                   break;

           default:
           throw
FdoException::Create(FdoException::NLSGetMessage(FDO_NLSID(FDO_10_UNSUPP
ORTEDGEOMETRYTYPE)));
       }

           return (fgfByteArray); 
   }


// Returns pointer to vector of DoublePoints
inline DoublePoint* Nen1878Feature::GetPoints()
{
   return (&mCoordinates[0]);
}

--
View this message in context:
http://www.nabble.com/Improving-performance-for-NEN1878-provider%2C-howt
o--tf4547817s18162.html#a12977669
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 

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

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/fdo-users/attachments/20071001/6e918837/attachment-0001.html


More information about the fdo-users mailing list