mapnik
Class FeatureSet

java.lang.Object
  extended by mapnik.NativeObject
      extended by mapnik.FeatureSet

public class FeatureSet
extends NativeObject

Wraps a mapnik::featureset_ptr and the current mapnik::feature into a java.sql.ResultSet type interface.

Note that geometries referenced off of the current feature will become invalid once the FeatureSet moves to the next feature or the FeatureSet is disposed.

Author:
stella

Constructor Summary
FeatureSet()
           
 
Method Summary
 Box2d getEnvelope()
           
 Geometry getGeometry(int index)
          Get the geometry at index
 int getGeometryCount()
          The number of geometries
 int getId()
          The id of the current feature
 java.lang.Object getProperty(java.lang.String name)
          Get a property by name
 java.util.Set<java.lang.String> getPropertyNames()
          Names of all properties
 boolean next()
          Moves to the next feature in the set.
 
Methods inherited from class mapnik.NativeObject
dispose, isDisposed
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FeatureSet

public FeatureSet()
Method Detail

next

public boolean next()
Moves to the next feature in the set. Returns true if exists. Initially positioned before the first.


getGeometryCount

public int getGeometryCount()
The number of geometries

Returns:
number of geometries

getGeometry

public Geometry getGeometry(int index)
Get the geometry at index

Parameters:
index -
Returns:
geometry

getId

public int getId()
The id of the current feature

Returns:
id

getEnvelope

public Box2d getEnvelope()
Returns:
envelope of the current feature

getPropertyNames

public java.util.Set<java.lang.String> getPropertyNames()
Names of all properties

Returns:
names

getProperty

public java.lang.Object getProperty(java.lang.String name)
Get a property by name

Parameters:
name -
Returns:
property or null