|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.deegree.graphics.sld.PointPlacement
public class PointPlacement
Incarnation of a sld:PointPlacement-element. For a PointPlacement, the anchor point of the label and a linear displacement from the point can be specified, to allow a graphic symbol to be plotted directly at the point. This might be useful to label a city, for example. For a LinePlacement, a perpendicular offset can be specified, to allow the line itself to be plotted also. This might be useful for labelling a road or a river, for example.
Constructor Summary | |
---|---|
PointPlacement()
package protected default constructor |
|
PointPlacement(ParameterValueType[] anchorPoint,
ParameterValueType[] displacement,
ParameterValueType rotation,
boolean auto)
Creates a new PointPlacement object. |
Method Summary | |
---|---|
java.lang.String |
exportAsXML()
exports the content of the PointPlacement as XML formated String |
ParameterValueType[] |
getAnchorPoint()
returns the anchor points (x and y) as array of |
double[] |
getAnchorPoint(Feature feature)
The AnchorPoint element of a PointPlacement gives the location inside of a label to use for anchoring the label to the main-geometry point. |
ParameterValueType[] |
getDisplacement()
returns the displacements (x and y) as array of |
double[] |
getDisplacement(Feature feature)
The Displacement element of a PointPlacement gives the X and Y displacements from the main-geometry point to render a text label. |
ParameterValueType |
getRotation()
returns the rotation of ParameterValueType |
double |
getRotation(Feature feature)
The Rotation of a PointPlacement gives the clockwise rotation of the label in degrees from the normal direction for a font (left-to-right for Latin- derived human languages at least). |
PropertyName |
getRotationPropertyName()
Returns the property name of the rotation if available |
boolean |
isAuto()
Returns whether the placement should be optimized or not. |
void |
setAnchorPoint(double[] anchorPoint)
|
void |
setAuto(boolean auto)
|
void |
setDisplacement(double[] displacement)
|
void |
setRotation(double rotation)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
PointPlacement()
public PointPlacement(ParameterValueType[] anchorPoint, ParameterValueType[] displacement, ParameterValueType rotation, boolean auto)
anchorPoint
- displacement
- rotation
- auto
- Method Detail |
---|
public ParameterValueType[] getAnchorPoint()
ParameterValueType
,
ParameterValueType
public ParameterValueType[] getDisplacement()
ParameterValueType
,
ParameterValueType
public ParameterValueType getRotation()
public double[] getAnchorPoint(Feature feature) throws FilterEvaluationException
The coordinates are given as two floating-point numbers in the AnchorPointX and AnchorPointY elements each with values between 0.0 and 1.0 inclusive. The bounding box of the label to be rendered is considered to be in a coorindate space from 0.0 (lower-left corner) to 1.0 (upper-right corner), and the anchor position is specified as a point in this space. The default point is X=0, Y=0.5, which is at the middle height of the left-hand side of the label. A system may choose different anchor points to de-conflict labels.
feature
- specifies the Feature to be used for evaluation of the underlying
'sld:ParameterValueType'
FilterEvaluationException
- if the evaluation failspublic void setAnchorPoint(double[] anchorPoint)
anchorPoint
- anchorPoint for the PointPlacement
public double[] getDisplacement(Feature feature) throws FilterEvaluationException
This will often be used to avoid over-plotting a graphic symbol marking a city or some such feature. The displacements are in units of pixels above and to the right of the point. A system may reflect this displacement about the X and/or Y axes to de-conflict labels. The default displacement is X=0, Y=0.
feature
- specifies the Feature to be used for evaluation of the underlying
'sld:ParameterValueType'
FilterEvaluationException
- if the evaluation fails*public void setDisplacement(double[] displacement)
displacement
-
public double getRotation(Feature feature) throws FilterEvaluationException
feature
- specifies the Feature to be used for evaluation of the underlying
'sld:ParameterValueType'
FilterEvaluationException
- if the evaluation fails*public PropertyName getRotationPropertyName()
public void setRotation(double rotation)
rotation
- the rotation to be set for the PointPlacementgetRotation(Feature)
public boolean isAuto()
public void setAuto(boolean auto)
auto
- public java.lang.String exportAsXML()
exportAsXML
in interface Marshallable
|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org