Package org.mapfish.print.attribute.map
Class AreaOfInterest
java.lang.Object
org.mapfish.print.attribute.map.AreaOfInterest
Represents an area on the map which is of particular interest for some reason. It consists of
polygon geojson and a method for displaying the area the geometry intersects with.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Represents the ways that the area of interest (aoi) can be rendered on the map. -
Field Summary
FieldsModifier and TypeFieldDescriptionA Geojson geometry (can be string or GeoJson) that indicates the area of interest.The way that the Area of Interest will be represented on the map.If true the Area of Interest will be rendered as SVG (if display == RENDER).A string representing the style. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.geotools.data.simple.SimpleFeatureCollection
areaToFeatureCollection
(MapAttribute.MapAttributeValues mapAttributes) Return the area polygon as the only feature in the feature collection.copy()
Make a copy of this Area of Interest.org.locationtech.jts.geom.Geometry
getArea()
Get the area polygon.void
Tests that the area is valid geojson, the style ref is valid or null and the display is non-null.void
setPolygon
(org.locationtech.jts.geom.Geometry polygon)
-
Field Details
-
area
A Geojson geometry (can be string or GeoJson) that indicates the area of interest.The geojson must be a polygon representing the area of interest.
-
display
The way that the Area of Interest will be represented on the map. By default it will be drawn as a polygon with a solid border and a translucent interior. The style can be controlled by the style parameter. -
style
A string representing the style. TheStyleParserPlugin
s are used to load the style. Because of this the styleRef can be JSON, SLD, URL, file path, etc... -
renderAsSvg
If true the Area of Interest will be rendered as SVG (if display == RENDER).(will default to
Configuration.defaultStyle
).
-
-
Constructor Details
-
AreaOfInterest
public AreaOfInterest()
-
-
Method Details
-
postConstruct
public void postConstruct()Tests that the area is valid geojson, the style ref is valid or null and the display is non-null. -
getArea
public org.locationtech.jts.geom.Geometry getArea()Get the area polygon. It will parse the polygon string representation in the polygon field. -
areaToFeatureCollection
public org.geotools.data.simple.SimpleFeatureCollection areaToFeatureCollection(@Nonnull MapAttribute.MapAttributeValues mapAttributes) Return the area polygon as the only feature in the feature collection.- Parameters:
mapAttributes
- the attributes that this aoi is part of.
-
setPolygon
public void setPolygon(org.locationtech.jts.geom.Geometry polygon) -
copy
Make a copy of this Area of Interest.
-