22 mVectorFieldType( Cartesian ), mAngleOrientation( ClockwiseFromNorth ), mAngleUnits( Degrees ), mXIndex( -1 ), mYIndex( -1 )
44 if ( properties.contains(
"x_attribute" ) )
48 if ( properties.contains(
"y_attribute" ) )
52 if ( properties.contains(
"distance_unit" ) )
56 if ( properties.contains(
"scale" ) )
58 symbolLayer->
setScale( properties[
"scale"].toDouble() );
60 if ( properties.contains(
"vector_field_type" ) )
64 if ( properties.contains(
"angle_orientation" ) )
68 if ( properties.contains(
"angle_units" ) )
99 line << QPointF( 0, 50 );
100 line << QPointF( 100, 50 );
104 double xComponent = 0;
105 double yComponent = 0;
122 yComponent = yVal * QgsSymbolLayerV2Utils::lineWidthScaleFactor( ctx,
mDistanceUnit );
126 xComponent = xComponent * QgsSymbolLayerV2Utils::lineWidthScaleFactor( ctx,
mDistanceUnit );
127 yComponent = yComponent * QgsSymbolLayerV2Utils::lineWidthScaleFactor( ctx,
mDistanceUnit );
131 yComponent = yVal * QgsSymbolLayerV2Utils::lineWidthScaleFactor( ctx,
mDistanceUnit );
142 line << QPointF( point.x() + xComponent, point.y() - yComponent );
190 properties[
"scale"] = QString::number(
mScale );
193 properties[
"angle_units"] = QString::number(
mAngleUnits );
199 element.appendChild( doc.createComment(
"VectorField not implemented yet..." ) );
219 QSet<QString> attributes;
242 angle = 360 - angle + 90;
248 angle = angle *
M_PI / 180.0;
251 x = length * sin( angle );
252 y = length * cos( angle );