49 QList<LayerData>::iterator v_it =
mLayerData.begin();
53 if ( v_it->vectorLayer == 0 )
65 if ( !v_it->zCoordInterpolation )
67 attList.push_back( v_it->interpolationAttribute );
71 double attributeValue = 0.0;
72 bool attributeConversionOk =
false;
79 if ( !v_it->zCoordInterpolation )
81 QVariant attributeVariant = theFeature.
attribute( v_it->interpolationAttribute );
82 if ( !attributeVariant.isValid() )
86 attributeValue = attributeVariant.toDouble( &attributeConversionOk );
87 if ( !attributeConversionOk || qIsNaN( attributeValue ) )
108 bool hasZValue =
false;
119 currentWkbPtr >> theVertex.
x >> theVertex.
y;
120 if ( zCoord && hasZValue )
122 currentWkbPtr >> theVertex.
z;
126 theVertex.
z = attributeValue;
136 currentWkbPtr >> nPoints;
139 currentWkbPtr >> theVertex.
x >> theVertex.
y;
140 if ( zCoord && hasZValue )
142 currentWkbPtr >> theVertex.
z;
146 theVertex.
z = attributeValue;
163 for (
int index2 = 0; index2 < *npoints; ++index2 )
167 if ( point.sqrDist( x, y ) < actdist )
169 actdist = point.sqrDist( x, y );
170 vertexnr = vertexcounter;
174 beforeVertex = vertexcounter + ( *npoints - 2 );
175 afterVertex = vertexcounter + 1;
177 else if ( index2 == ( *npoints - 1 ) )
179 beforeVertex = vertexcounter - 1;
180 afterVertex = vertexcounter - ( *npoints - 2 );
184 beforeVertex = vertexcounter - 1;
185 afterVertex = vertexcounter + 1;
190 wkbPtr +=
sizeof( double );
205 wkbPtr += 1 +
sizeof( int );
209 if ( point.sqrDist( x, y ) < actdist )
211 actdist = point.sqrDist( x, y );
216 wkbPtr +=
sizeof( double );
231 for (
int index2 = 0; index2 < nPoints; ++index2 )
235 if ( point.sqrDist( x, y ) < actdist )
237 actdist = point.sqrDist( x, y );
238 vertexnr = vertexcounter;
246 beforeVertex = vertexnr - 1;
248 if ( index2 == nPoints - 1 )
254 afterVertex = vertexnr + 1;
259 wkbPtr +=
sizeof( double );
274 wkbPtr += 1 +
sizeof( int );
277 for (
int index2 = 0; index2 < nRings; ++index2 )
281 for (
int index3 = 0; index3 < nPoints; ++index3 )
285 if ( point.sqrDist( x, y ) < actdist )
287 actdist = point.sqrDist( x, y );
288 vertexnr = vertexcounter;
293 beforeVertex = vertexcounter + ( nPoints - 2 );
294 afterVertex = vertexcounter + 1;
296 else if ( index3 == ( *npoints - 1 ) )
298 beforeVertex = vertexcounter - 1;
299 afterVertex = vertexcounter - ( nPoints - 2 );
303 beforeVertex = vertexcounter - 1;
304 afterVertex = vertexcounter + 1;
309 wkbPtr +=
sizeof( double );