[mapguide-commits] r5521 - sandbox/adsk/2.3r/Common/Stylization
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Fri Feb 4 18:50:29 EST 2011
Author: waltweltonlair
Date: 2011-02-04 15:50:28 -0800 (Fri, 04 Feb 2011)
New Revision: 5521
Modified:
sandbox/adsk/2.3r/Common/Stylization/LineBuffer.cpp
Log:
This submission simply corrects an ASSERT condition in LineBuffer.cpp. The LoadFromAgf method has:
for (int q=0; q<num_geoms; ++q)
{
// skip past geometry type of subgeometry
// we know it is LineString or Polygon or Point respectively
if (is_multi) *ireader++;
// read cordinate typeB
FdoDimensionality dim = (FdoDimensionality)*ireader++;
// ensure that all dimensionalities of each geometry are the same
_ASSERT(q==0 || m_dimensionality == dim);
m_dimensionality = dim & ~FdoDimensionality_M; //LineBuffer doesn't support M
In the case where you have a multi-linestring of XYM data, the first pass (q==0)
will skip the assert and m_dimensionality is set to FdoDimensionality_XY (M bit
is supressed). In the second pass (q==1), dim will be FdoDimensionality_XYM,
but m_dimensionality will be FdoDimensionality_XY and the assert will fire.
Modified: sandbox/adsk/2.3r/Common/Stylization/LineBuffer.cpp
===================================================================
--- sandbox/adsk/2.3r/Common/Stylization/LineBuffer.cpp 2011-02-04 23:48:03 UTC (rev 5520)
+++ sandbox/adsk/2.3r/Common/Stylization/LineBuffer.cpp 2011-02-04 23:50:28 UTC (rev 5521)
@@ -903,13 +903,14 @@
{
// skip past geometry type of subgeometry
// we know it is LineString or Polygon or Point respectively
- if (is_multi) *ireader++;
+ if (is_multi)
+ *ireader++;
// read cordinate typeB
FdoDimensionality dim = (FdoDimensionality)*ireader++;
// ensure that all dimensionalities of each geometry are the same
- _ASSERT(q==0 || m_dimensionality == dim);
+ _ASSERT(q==0 || m_dimensionality == (dim & ~FdoDimensionality_M));
m_dimensionality = dim & ~FdoDimensionality_M; //LineBuffer doesn't support M
m_bProcessZ = (m_dimensionality & FdoDimensionality_Z) && !m_bIgnoreZ;
More information about the mapguide-commits
mailing list