| java.lang.Object org.geotools.geometry.jts.Decimator
Decimator | final public class Decimator (Code) | | Accepts geometries and collapses all the vertices that will be rendered to
the same pixel.
author: jeichar since: 2.1.x |
Constructor Summary | |
public | Decimator(MathTransform screenToWorld, Rectangle paintArea) djb - noticed that the old way of finding out the decimation is based on
the (0,0) location of the image. | public | Decimator(MathTransform screenToWorld) | public | Decimator(double spanx, double spany) |
Decimator | public Decimator(MathTransform screenToWorld, Rectangle paintArea)(Code) | | djb - noticed that the old way of finding out the decimation is based on
the (0,0) location of the image. This is often wildly unrepresentitive of
the scale of the entire map.
A better thing to do is to decimate this on a per-shape basis (and use
the shape's center). Another option would be to sample the image at
different locations (say 9) and choose the smallest spanx/spany you find.
Also, if the xform is an affine Xform, you can be a bit more aggressive
in the decimation. If its not an affine xform (ie. its actually doing a
CRS xform), you may find this is a bit too aggressive due to any number
of mathematical issues.
This is just a simple method that uses the centre of the given rectangle
instead of (0,0).
NOTE: this could need more work based on CRS, but the rectangle is in
pixels so it should be fairly immune to all but crazy projections.
Parameters: screenToWorld - Parameters: paintArea - |
Decimator | public Decimator(MathTransform screenToWorld)(Code) | | throws: TransformException - |
Decimator | public Decimator(double spanx, double spany)(Code) | | |
decimate | final public void decimate(Geometry geom)(Code) | | decimates JTS geometries.
|
decimateTransformGeneralize | final public void decimateTransformGeneralize(Geometry geometry, MathTransform transform) throws TransformException(Code) | | |
|
|