# Class VectorFeature

java.lang.Object
com.codename1.maps.vector.VectorFeature

public final class VectorFeature extends Object

A single decoded feature of a Mapbox Vector Tile: its geometry type, its attribute map, and its geometry as one or more parts in tile-local coordinates (0..`VectorLayer.getExtent()`, origin top-left).

For `GEOM_POINT` each part is a flat run of `x,y` points; for `GEOM_LINESTRING` each part is a polyline; for `GEOM_POLYGON` each part is a closed ring (exterior rings wind one way, holes the other, per the MVT spec).

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `GEOM_LINESTRING`
  One or more polylines.
  `static final int`
  `GEOM_POINT`
  One or more points.
  `static final int`
  `GEOM_POLYGON`
  One or more polygon rings.
  `static final int`
  `GEOM_UNKNOWN`
  Unknown / empty geometry.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Object`
  `getAttribute(String key)`
  Convenience accessor for a single attribute, or `null`.
  `Map`
  `getAttributes()`
  The feature attributes as a `Map<String,Object>` (string/number/bool).
  `int`
  `getGeometryType()`
  One of the `GEOM_*` constants.
  `long`
  `getId()`
  The feature id (0 when absent).
  `List`
  `getParts()`
  The geometry parts, each an `int[]` of interleaved `x,y` tile-local coordinates.

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### GEOM_UNKNOWN

    public static final int GEOM_UNKNOWN
    Unknown / empty geometry.
    See Also:
      - Constant Field Values

  - ### GEOM_POINT

    public static final int GEOM_POINT
    One or more points.
    See Also:
      - Constant Field Values

  - ### GEOM_LINESTRING

    public static final int GEOM_LINESTRING
    One or more polylines.
    See Also:
      - Constant Field Values

  - ### GEOM_POLYGON

    public static final int GEOM_POLYGON
    One or more polygon rings.
    See Also:
      - Constant Field Values

- ## Method Details

  - ### getId

    public long getId()
    The feature id (0 when absent).

  - ### getGeometryType

    public int getGeometryType()
    One of the `GEOM_*` constants.

  - ### getAttributes

    public Map getAttributes()
    The feature attributes as a `Map<String,Object>` (string/number/bool).

  - ### getAttribute

    public Object getAttribute(String key)
    Convenience accessor for a single attribute, or `null`.

  - ### getParts

    public List getParts()
    The geometry parts, each an `int[]` of interleaved `x,y` tile-local coordinates.