Class AreaOfInterest

java.lang.Object
org.mapfish.print.attribute.map.AreaOfInterest

public final class AreaOfInterest extends Object
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.
  • Field Details

    • area

      public String 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

      public AreaOfInterest.AoiDisplay 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

      public String style
      A string representing the style. The StyleParserPlugins are used to load the style. Because of this the styleRef can be JSON, SLD, URL, file path, etc...
    • renderAsSvg

      public Boolean 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

      public AreaOfInterest copy()
      Make a copy of this Area of Interest.