|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.vfny.geoserver.responses.wms.map.SVGEncoder
DOCUMENT ME!
Constructor Summary | |
SVGEncoder()
Creates a new SVGEncoder object. |
Method Summary | |
void |
abort()
DOCUMENT ME! |
void |
encode(org.geotools.data.FeatureResults features,
java.io.OutputStream out)
DOCUMENT ME! |
void |
encode(FeatureTypeInfo[] layers,
org.geotools.data.FeatureResults[] results,
org.geotools.styling.Style[] styles,
java.io.OutputStream out)
DOCUMENT ME! |
boolean |
isAborted()
DOCUMENT ME! |
void |
setCollect(boolean collect)
If collect == true , then all the geometries will be grouped
in a single SVG element by FeatureTypeInfo requested. |
void |
setHeight(java.lang.String height)
sets the SVG canvas height |
void |
setReferenceSpace(com.vividsolutions.jts.geom.Envelope env)
sets the "viewBox" of the generated SVG with a blur factor of 5000 |
void |
setReferenceSpace(com.vividsolutions.jts.geom.Envelope env,
float blurFactor)
sets the "viewBox" of the generated SVG and establishes the encoding blur factor to blurFactor
|
void |
setWidth(java.lang.String width)
sets the SVG canvas width |
void |
setWriteHeader(boolean includeHeader)
DOCUMENT ME! |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SVGEncoder()
Method Detail |
public boolean isAborted()
public void abort()
public void setWidth(java.lang.String width)
width
- DOCUMENT ME!public void setHeight(java.lang.String height)
height
- DOCUMENT ME!public void setCollect(boolean collect)
collect == true
, then all the geometries will be grouped
in a single SVG element by FeatureTypeInfo requested. The effect is
like a union operation upon the geometries of the whole FeatureResults
resulting in a single geometry collection.
NOTE: if this field is set, then writting of ids and attributes will be
ignored, since a single <path/%gt;
svg element will be
printed with it's "d"
attribute holding all the geometries
from a single FeatureResults.
collect
- wether to collect geometries into a single svg element
for each FeatureResultspublic void setReferenceSpace(com.vividsolutions.jts.geom.Envelope env)
5000
env
- DOCUMENT ME!setReferenceSpace(Envelope, float)
public void setWriteHeader(boolean includeHeader)
includeHeader
- DOCUMENT ME!public void setReferenceSpace(com.vividsolutions.jts.geom.Envelope env, float blurFactor)
blurFactor
establishing the blur factor means that the greatest dimension between
the width and height of the new SVG coordinate space env
will be divided by this factor to obtain the minimun distance allowable
between two coordinates to actually encode them.
This method updates the minCoordDistance
field, wich every
coordinate -except the first 3 of a path element-, will
be compared against the most previously written to decide if such
distance is enough to encode such coordinate or it can be just skipped
In a path element, the first 3 coordinates do not get compared against the minimun coordinate separation distance as the easyest way of keeping polygon shapes consistent
NOTE: if you don't want that klind of hacky geometry generalyzation,
just pass 0
(zero) as blurFactor
env
- DOCUMENT ME!blurFactor
- DOCUMENT ME!public void encode(org.geotools.data.FeatureResults features, java.io.OutputStream out) throws java.io.IOException
features
- DOCUMENT ME!out
- DOCUMENT ME!
java.io.IOException
- DOCUMENT ME!public void encode(FeatureTypeInfo[] layers, org.geotools.data.FeatureResults[] results, org.geotools.styling.Style[] styles, java.io.OutputStream out) throws java.io.IOException
layers
- the outermost SVGg
element id wich will group
all the features in the collectionresults
- the features to be encoded as SVG vectorsstyles
- DOCUMENT ME!out
- SVG encoder output stream
java.io.IOException
- DOCUMENT ME!
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |