|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.legend.Drawer
public class Drawer
This class is used to isolate GeoTools from the specific graphic library being used for rendering.
Method Summary | |
---|---|
static Drawer |
create()
Retrieve the default Drawing implementation. |
void |
drawDirect(java.awt.image.BufferedImage bi,
org.opengis.feature.simple.SimpleFeature feature,
Rule rule)
|
void |
drawDirect(java.awt.image.BufferedImage bi,
org.opengis.feature.simple.SimpleFeature feature,
Style style)
Used to draw a freature directly onto the provided image. |
void |
drawFeature(java.awt.image.BufferedImage bi,
org.opengis.feature.simple.SimpleFeature feature,
java.awt.geom.AffineTransform worldToScreenTransform)
|
void |
drawFeature(java.awt.image.BufferedImage bi,
org.opengis.feature.simple.SimpleFeature feature,
java.awt.geom.AffineTransform worldToScreenTransform,
boolean drawVertices,
org.opengis.referencing.operation.MathTransform mt)
|
void |
drawFeature(java.awt.image.BufferedImage bi,
org.opengis.feature.simple.SimpleFeature feature,
java.awt.geom.AffineTransform worldToScreenTransform,
boolean drawVertices,
Symbolizer[] symbs,
org.opengis.referencing.operation.MathTransform mt)
|
void |
drawFeature(java.awt.image.BufferedImage bi,
org.opengis.feature.simple.SimpleFeature feature,
java.awt.geom.AffineTransform worldToScreenTransform,
boolean drawVertices,
Symbolizer symbolizer,
org.opengis.referencing.operation.MathTransform mathTransform,
LiteShape shape)
|
void |
drawFeature(java.awt.image.BufferedImage bi,
org.opengis.feature.simple.SimpleFeature feature,
java.awt.geom.AffineTransform worldToScreenTransform,
Style style)
|
void |
drawFeature(java.awt.image.BufferedImage bi,
org.opengis.feature.simple.SimpleFeature feature,
Style style,
java.awt.geom.AffineTransform worldToScreenTransform)
|
org.opengis.feature.simple.SimpleFeature |
feature(com.vividsolutions.jts.geom.Geometry geom)
Just a convinient method to create feature from geometry. |
org.opengis.feature.simple.SimpleFeature |
feature(com.vividsolutions.jts.geom.LineString line)
Simple Feature with a default geometry and no attribtues. |
org.opengis.feature.simple.SimpleFeature |
feature(com.vividsolutions.jts.geom.MultiLineString multilinestring)
Simple Feature with a default geometry and no attribtues. |
org.opengis.feature.simple.SimpleFeature |
feature(com.vividsolutions.jts.geom.MultiPoint multipoint)
Simple Feature with a default geometry and no attribtues. |
org.opengis.feature.simple.SimpleFeature |
feature(com.vividsolutions.jts.geom.MultiPolygon multipolygon)
Simple Feature with a default geometry and no attribtues. |
org.opengis.feature.simple.SimpleFeature |
feature(com.vividsolutions.jts.geom.Point point)
Simple feature with one attribute called "point". |
org.opengis.feature.simple.SimpleFeature |
feature(com.vividsolutions.jts.geom.Polygon polygon)
Simple Feature with a default geometry and no attribtues. |
static Symbolizer[] |
getSymbolizers(java.lang.Class<? extends com.vividsolutions.jts.geom.Geometry> type,
java.awt.Color baseColor)
|
static Symbolizer[] |
getSymbolizers(java.lang.Class<? extends com.vividsolutions.jts.geom.Geometry> type,
java.awt.Color baseColor,
boolean useTransparency)
|
static Symbolizer[] |
getSymbolizers(org.opengis.feature.simple.SimpleFeature feature)
|
com.vividsolutions.jts.geom.LineString |
line(int[] xy)
Generate LineStrings from two dimensional ordinates |
com.vividsolutions.jts.geom.MultiLineString |
lines(int[][] xy)
Generate a MultiLineString from two dimensional ordinates |
com.vividsolutions.jts.geom.Point |
point(int x,
int y)
Generate Point from two dimensional ordinates |
com.vividsolutions.jts.geom.Polygon |
polygon(int[] xy)
Convience constructor for GeometryFactory.createPolygon. |
com.vividsolutions.jts.geom.Polygon |
polygon(int[] xy,
int[][] holes)
Convience constructor for GeometryFactory.createPolygon. |
com.vividsolutions.jts.geom.LinearRing |
ring(int[] xy)
Convience constructor for GeometryFactory.createLinearRing. |
org.opengis.feature.simple.SimpleFeatureType |
schema(java.lang.String name,
java.lang.String spec)
Create a SimpleFeatureType schema using a type short hand. |
java.awt.Point |
worldToPixel(com.vividsolutions.jts.geom.Coordinate coord,
java.awt.geom.AffineTransform worldToScreenTransform)
|
static java.awt.geom.AffineTransform |
worldToScreenTransform(com.vividsolutions.jts.geom.Envelope mapExtent,
java.awt.Rectangle screenSize)
TODO summary sentence for worldToScreenTransform ... |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Drawer create()
public void drawDirect(java.awt.image.BufferedImage bi, org.opengis.feature.simple.SimpleFeature feature, Style style)
Feature coordintes are in the same coordinates as the image.
You may call this method multiple times to draw several features onto the same Image (say for glyph creation).
image
- Image to render on todisplay
- Needed to create Colors for imagefeature
- Feature to be renderedstyle
- Style to render feature withpublic void drawDirect(java.awt.image.BufferedImage bi, org.opengis.feature.simple.SimpleFeature feature, Rule rule)
public void drawFeature(java.awt.image.BufferedImage bi, org.opengis.feature.simple.SimpleFeature feature, java.awt.geom.AffineTransform worldToScreenTransform, boolean drawVertices, org.opengis.referencing.operation.MathTransform mt)
public void drawFeature(java.awt.image.BufferedImage bi, org.opengis.feature.simple.SimpleFeature feature, java.awt.geom.AffineTransform worldToScreenTransform)
public void drawFeature(java.awt.image.BufferedImage bi, org.opengis.feature.simple.SimpleFeature feature, java.awt.geom.AffineTransform worldToScreenTransform, Style style)
public void drawFeature(java.awt.image.BufferedImage bi, org.opengis.feature.simple.SimpleFeature feature, Style style, java.awt.geom.AffineTransform worldToScreenTransform)
public static Symbolizer[] getSymbolizers(org.opengis.feature.simple.SimpleFeature feature)
public static Symbolizer[] getSymbolizers(java.lang.Class<? extends com.vividsolutions.jts.geom.Geometry> type, java.awt.Color baseColor)
public static Symbolizer[] getSymbolizers(java.lang.Class<? extends com.vividsolutions.jts.geom.Geometry> type, java.awt.Color baseColor, boolean useTransparency)
public void drawFeature(java.awt.image.BufferedImage bi, org.opengis.feature.simple.SimpleFeature feature, java.awt.geom.AffineTransform worldToScreenTransform, boolean drawVertices, Symbolizer[] symbs, org.opengis.referencing.operation.MathTransform mt)
public void drawFeature(java.awt.image.BufferedImage bi, org.opengis.feature.simple.SimpleFeature feature, java.awt.geom.AffineTransform worldToScreenTransform, boolean drawVertices, Symbolizer symbolizer, org.opengis.referencing.operation.MathTransform mathTransform, LiteShape shape)
public java.awt.Point worldToPixel(com.vividsolutions.jts.geom.Coordinate coord, java.awt.geom.AffineTransform worldToScreenTransform)
public static java.awt.geom.AffineTransform worldToScreenTransform(com.vividsolutions.jts.geom.Envelope mapExtent, java.awt.Rectangle screenSize)
bounds
- rectangle
-
public org.opengis.feature.simple.SimpleFeatureType schema(java.lang.String name, java.lang.String spec)
Code Example:
new Drawing().schema("namespace.typename", "id:0,*geom:LineString,name:String,*centroid:Point");
name
- namespace.namespec
-
public org.opengis.feature.simple.SimpleFeature feature(com.vividsolutions.jts.geom.Geometry geom)
geom
- the geometry to create feature from
public org.opengis.feature.simple.SimpleFeature feature(com.vividsolutions.jts.geom.Point point)
point
-
public org.opengis.feature.simple.SimpleFeature feature(com.vividsolutions.jts.geom.LineString line)
line
-
public org.opengis.feature.simple.SimpleFeature feature(com.vividsolutions.jts.geom.Polygon polygon)
polygon
-
public org.opengis.feature.simple.SimpleFeature feature(com.vividsolutions.jts.geom.MultiPoint multipoint)
multipoint
-
public org.opengis.feature.simple.SimpleFeature feature(com.vividsolutions.jts.geom.MultiLineString multilinestring)
multilinestring
-
public org.opengis.feature.simple.SimpleFeature feature(com.vividsolutions.jts.geom.MultiPolygon multipolygon)
multipolygon
-
public com.vividsolutions.jts.geom.Point point(int x, int y)
x
- y
-
public com.vividsolutions.jts.geom.LineString line(int[] xy)
xy
-
public com.vividsolutions.jts.geom.MultiLineString lines(int[][] xy)
xy
-
public com.vividsolutions.jts.geom.Polygon polygon(int[] xy)
The provided xy ordinates are turned into a linear rings.
xy
- Two dimensional ordiantes.
public com.vividsolutions.jts.geom.Polygon polygon(int[] xy, int[][] holes)
The provided xy and holes are turned into linear rings.
xy
- Two dimensional ordiantes.holes
- Holes in polygon or null.
public com.vividsolutions.jts.geom.LinearRing ring(int[] xy)
xy
- Two dimensional ordiantes.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |