Class MVTLayer

java.lang.Object
org.gvsig.mvtrenderer.lib.impl.MVTLayer

public class MVTLayer extends Object
Represents a renderable layer composed of features and a style.
Author:
fdiaz
  • Constructor Summary

    Constructors
    Constructor
    Description
    MVTLayer(String id, org.geotools.data.simple.SimpleFeatureCollection features, org.geotools.api.style.Style style, org.locationtech.jts.geom.Envelope envelope)
    Constructor for data layers.
    MVTLayer(String id, org.locationtech.jts.geom.Polygon background, org.geotools.api.style.Style style, org.locationtech.jts.geom.Envelope env, org.geotools.api.referencing.crs.CoordinateReferenceSystem tileCrs)
    Constructor for background layers (no source data).
  • Method Summary

    Modifier and Type
    Method
    Description
    org.geotools.data.simple.SimpleFeatureCollection
    Returns the collection of features associated with this layer.
    Returns the identifier of this layer.
    org.geotools.api.style.Style
    Returns the GeoTools style associated with this layer.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MVTLayer

      public MVTLayer(String id, org.geotools.data.simple.SimpleFeatureCollection features, org.geotools.api.style.Style style, org.locationtech.jts.geom.Envelope envelope)
      Constructor for data layers.
      Parameters:
      id - Identifier of the layer (style layer id).
      features - Collection of features to render.
      style - The GeoTools style to apply.
    • MVTLayer

      public MVTLayer(String id, org.locationtech.jts.geom.Polygon background, org.geotools.api.style.Style style, org.locationtech.jts.geom.Envelope env, org.geotools.api.referencing.crs.CoordinateReferenceSystem tileCrs)
      Constructor for background layers (no source data). Creates a synthetic feature collection containing the background polygon.
      Parameters:
      id - Identifier of the layer.
      background - The polygon covering the tile extent.
      style - The GeoTools style to apply.
      env - The envelope of the layer.
      tileCrs - The coordinate reference system of the tile.
  • Method Details

    • getStyle

      public org.geotools.api.style.Style getStyle()
      Returns the GeoTools style associated with this layer.
      Returns:
      The Style object.
    • getFeatures

      public org.geotools.data.simple.SimpleFeatureCollection getFeatures()
      Returns the collection of features associated with this layer.
      Returns:
      The SimpleFeatureCollection.
    • getId

      public String getId()
      Returns the identifier of this layer.
      Returns:
      The layer ID.