Package org.geotools.grid.oblong
Class Oblongs
- Object
 - 
- Oblongs
 
 
- 
public class Oblongs extends Object
A utility class with static methods to create and work with oblong grid elements.- Since:
 - 2.7
 - Author:
 - mbedward
 
 
- 
- 
Constructor Summary
Constructors Constructor Description Oblongs() 
- 
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Oblongcreate(double minX, double minY, double width, double height, CoordinateReferenceSystem crs)Creates a newOblongobject.static SimpleFeatureSourcecreateGrid(ReferencedEnvelope bounds, double width, double height, double vertexSpacing, GridFeatureBuilder gridFeatureBuilder)Creates a new grid of oblongs within a bounding rectangle with grid elements represented by densified polygons (ie. additional vertices added to each edge).static SimpleFeatureSourcecreateGrid(ReferencedEnvelope bounds, double width, double height, GridFeatureBuilder gridBuilder)Creates a new grid of oblongs within a bounding rectangle with grid elements represented by simple (ie. 
 - 
 
- 
- 
Method Detail
- 
create
public static Oblong create(double minX, double minY, double width, double height, CoordinateReferenceSystem crs)
Creates a newOblongobject.- Parameters:
 minX- the min X ordinateminY- the min Y ordinatewidth- the widthheight- the heightcrs- the coordinate reference system (may benull)- Returns:
 - a new 
Oblongobject - Throws:
 IllegalArgumentException- if eitherwidthorheightare<=0
 
- 
createGrid
public static SimpleFeatureSource createGrid(ReferencedEnvelope bounds, double width, double height, GridFeatureBuilder gridBuilder)
Creates a new grid of oblongs within a bounding rectangle with grid elements represented by simple (ie. undensified) polygons.- Parameters:
 bounds- the bounding rectanglewidth- oblong widthheight- oblong heightgridBuilder- an instance ofGridFeatureBuilder- Returns:
 - a new grid
 - Throws:
 IllegalArgumentException- if bounds is null or empty; or if either width or height is<=0; or if theCoordinateReferenceSystemsset for the bounds and theGridFeatureBuilderare both non-null but different
 
- 
createGrid
public static SimpleFeatureSource createGrid(ReferencedEnvelope bounds, double width, double height, double vertexSpacing, GridFeatureBuilder gridFeatureBuilder)
Creates a new grid of oblongs within a bounding rectangle with grid elements represented by densified polygons (ie. additional vertices added to each edge).- Parameters:
 bounds- the bounding rectanglewidth- oblong widthheight- oblong heightvertexSpacing- maximum distance between adjacent vertices in a grid element; if<= 0or>= min(width, height) / 2.0it is ignored and the polygons will not be densifiedgridFeatureBuilder- an instance ofGridFeatureBuilder- Returns:
 - the vector grid
 - Throws:
 IllegalArgumentException- if bounds is null or empty; or if either width or height is<=0; or if theCoordinateReferenceSystemsset for the bounds and theGridFeatureBuilderare both non-null but different
 
 - 
 
 -