ch.epfl.scapetoad
Class CartogramFeature

java.lang.Object
  extended by ch.epfl.scapetoad.CartogramFeature

public class CartogramFeature
extends java.lang.Object

Represents a basic feature from the Jump package, but with a couple of additional methods useful for the cartogram project.


Constructor Summary
CartogramFeature()
           
 
Method Summary
static double getAttributeAsDouble(Feature feat, java.lang.String attrName)
           
static Feature projectFeatureWithGrid(Feature feat, CartogramGrid grid)
          Projects the provided Feature using the provided cartogram grid.
static Coordinate[] regularizeCoordinates(Coordinate[] coords, double maxlen)
          Regularizes a coordinate sequence.
static Geometry regularizeGeometry(Geometry geom, double maxlen)
          Regularizes a geometry.
static void setDoubleAttributeValue(Feature feat, java.lang.String attrName, double value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CartogramFeature

public CartogramFeature()
Method Detail

getAttributeAsDouble

public static double getAttributeAsDouble(Feature feat,
                                          java.lang.String attrName)

setDoubleAttributeValue

public static void setDoubleAttributeValue(Feature feat,
                                           java.lang.String attrName,
                                           double value)

projectFeatureWithGrid

public static Feature projectFeatureWithGrid(Feature feat,
                                             CartogramGrid grid)
Projects the provided Feature using the provided cartogram grid.


regularizeGeometry

public static Geometry regularizeGeometry(Geometry geom,
                                          double maxlen)
Regularizes a geometry.


regularizeCoordinates

public static Coordinate[] regularizeCoordinates(Coordinate[] coords,
                                                 double maxlen)
Regularizes a coordinate sequence.