<div>Robert, Badreddine, Gavin</div>
<div>&nbsp;</div>
<div>I do provide the extends and counts in <font size="2">Nen1878OptimizedAggregateReader. Is that what you refer to?</font></div>
<p>Piet</p>
<div><br><br>&nbsp;</div>
<div><span class="gmail_quote">On 10/1/07, <b class="gmail_sendername">Robert Fortin</b> &lt;<a href="mailto:robert.fortin@autodesk.com">robert.fortin@autodesk.com</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Badreddine,<br><br>Isn&#39;t it the combination of count and spatialExtents that need to be<br>optimized?<br>
I believe Map looks for the equivalent of<br><br>Select SpatialExtents(geometry), count(*)&nbsp;&nbsp;from &lt;class&gt;<br><br>RF<br><br><br>-----Original Message-----<br>From: <a href="mailto:fdo-users-bounces@lists.osgeo.org">fdo-users-bounces@lists.osgeo.org
</a><br>[mailto:<a href="mailto:fdo-users-bounces@lists.osgeo.org">fdo-users-bounces@lists.osgeo.org</a>] On Behalf Of Badreddine<br>Karoui<br>Sent: Monday, October 01, 2007 9:42 AM<br>To: <a href="mailto:fdo-users@lists.osgeo.org">
fdo-users@lists.osgeo.org</a><br>Subject: RE: [fdo-users] Improving performance for NEN1878 provider,<br>howto?<br><br>Hi,<br><br>You may want to implement the FdoISelectAggregates command plus the<br>SpatialExtents and Count functions. If these two functions are not
<br>implemented, then Map will scan all the geometries to find the minimum<br>bounding rectangle of all the data.<br><br>Badreddine<br><br>-----Original Message-----<br>From: <a href="mailto:fdo-users-bounces@lists.osgeo.org">
fdo-users-bounces@lists.osgeo.org</a><br>[mailto:<a href="mailto:fdo-users-bounces@lists.osgeo.org">fdo-users-bounces@lists.osgeo.org</a>] On Behalf Of Piet Bibber<br>Sent: Monday, October 01, 2007 7:46 AM<br>To: <a href="mailto:fdo-users@lists.osgeo.org">
fdo-users@lists.osgeo.org</a><br>Subject: [fdo-users] Improving performance for NEN1878 provider, howto?<br><br><br>Hello,<br><br>My NEN1878 provider is almost done, but performance is not so fantastic<br>when<br>reading the geometry; reading the schema is alright.
<br>That is stange, as I cache in the geometry when I read the schema<br>(NEN1878<br>schema discovery requires a full file scan; no seperate schema header).<br>(The<br>schema is read within 3 seconds for a 2.3MB file, including the geometry
<br>and<br>attributes (all in memory (using STL)).<br>The SDF and SHP all seem so fast :-)<br><br>Map 3D seem to spend most of his time caching in the geometry (see<br>source<br>code below)<br><br>I based my provider on the SHP provider, the reader seem to use
<br>FDO_READER<br>template, but I can&#39;t find where that points to. Maybe there are better<br>optimized readers.<br><br>Thanks.<br>Piet<br><br>Excerpt from the source files:<br><br>&nbsp;&nbsp; FdoByteArray * CreateCachedGeometry(FdoByteArray* fgfByteArray_I)
<br>&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FdoByteArray*&nbsp;&nbsp; fgfByteArray = fgfByteArray_I; // it may be<br>reallocated<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; count = mFeature-&gt;GetNumPoints();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FdoInt32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;numPointOrds = 2;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FdoInt32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;numBytesForOrdinates = numPointOrds *
<br>sizeof(double)<br>* count;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FdoInt32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;numParts = 0;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FdoGeometryType fdoGeomType&nbsp;&nbsp;= GetFdoGeometryType();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FdoInt32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dimensionality = FdoDimensionality_XY;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FdoInt32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;numPositions&nbsp;&nbsp; = mFeature-&gt;GetNumPoints();
<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fgfByteArray-&gt;Clear();<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fgfByteArray = FdoByteArray::Append(fgfByteArray,<br>sizeof(fdoGeomType), (FdoByte *) &amp;fdoGeomType);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; switch (fdoGeomType)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; case FdoGeometryType_None:
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; case FdoGeometryType_Point:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fgfByteArray = FdoByteArray::Append(fgfByteArray,<br>sizeof(dimensionality), (FdoByte*)&amp;dimensionality);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fgfByteArray = FdoByteArray::Append(fgfByteArray,
<br>numBytesForOrdinates,&nbsp;&nbsp; (FdoByte*)mFeature-&gt;GetPoints());<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; case FdoGeometryType_LineString:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fgfByteArray = FdoByteArray::Append(fgfByteArray,<br>sizeof(dimensionality), (FdoByte *) &amp;dimensionality);
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fgfByteArray = FdoByteArray::Append(fgfByteArray,<br>sizeof(count),<br>(FdoByte *)&amp;count);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fgfByteArray = FdoByteArray::Append(fgfByteArray,<br>numBytesForOrdinates, (FdoByte *)mFeature-&gt;GetPoints());
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; default:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; throw<br>FdoException::Create(FdoException::NLSGetMessage(FDO_NLSID(FDO_10_UNSUPP<br>ORTEDGEOMETRYTYPE)));<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return (fgfByteArray);
<br>&nbsp;&nbsp; }<br><br><br>// Returns pointer to vector of DoublePoints<br>inline DoublePoint* Nen1878Feature::GetPoints()<br>{<br>&nbsp;&nbsp; return (&amp;mCoordinates[0]);<br>}<br><br>--<br>View this message in context:<br><a href="http://www.nabble.com/Improving-performance-for-NEN1878-provider%2C-howt">
http://www.nabble.com/Improving-performance-for-NEN1878-provider%2C-howt</a><br>o--tf4547817s18162.html#a12977669<br>Sent from the fdo-users mailing list archive at <a href="http://Nabble.com">Nabble.com</a>.<br><br>_______________________________________________
<br>fdo-users mailing list<br><a href="mailto:fdo-users@lists.osgeo.org">fdo-users@lists.osgeo.org</a><br><a href="http://lists.osgeo.org/mailman/listinfo/fdo-users">http://lists.osgeo.org/mailman/listinfo/fdo-users</a><br>
<br>_______________________________________________<br>fdo-users mailing list<br><a href="mailto:fdo-users@lists.osgeo.org">fdo-users@lists.osgeo.org</a><br><a href="http://lists.osgeo.org/mailman/listinfo/fdo-users">http://lists.osgeo.org/mailman/listinfo/fdo-users
</a><br><br>_______________________________________________<br>fdo-users mailing list<br><a href="mailto:fdo-users@lists.osgeo.org">fdo-users@lists.osgeo.org</a><br><a href="http://lists.osgeo.org/mailman/listinfo/fdo-users">
http://lists.osgeo.org/mailman/listinfo/fdo-users</a><br></blockquote></div><br>