public class ScaledNoder extends Object implements Noder
Noder
and transforms its input
into the integer domain.
This is intended for use with Snap-Rounding noders,
which typically are only intended to work in the integer domain.
Offsets can be provided to increase the number of digits of available precision.
Clients should be aware that rescaling can involve loss of precision, which can cause zero-length line segments to be created. These in turn can cause problems when used to build a planar graph. This situation should be checked for and collapsed segments removed if necessary.
Constructor and Description |
---|
ScaledNoder(Noder noder,
double scaleFactor) |
ScaledNoder(Noder noder,
double scaleFactor,
double offsetX,
double offsetY) |
Modifier and Type | Method and Description |
---|---|
void |
computeNodes(Collection inputSegStrings)
Computes the noding for a collection of
SegmentString s. |
Collection |
getNodedSubstrings()
Returns a
Collection of fully noded SegmentString s. |
boolean |
isIntegerPrecision() |
public ScaledNoder(Noder noder, double scaleFactor)
public ScaledNoder(Noder noder, double scaleFactor, double offsetX, double offsetY)
public boolean isIntegerPrecision()
public Collection getNodedSubstrings()
Noder
Collection
of fully noded SegmentString
s.
The SegmentStrings have the same context as their parent.getNodedSubstrings
in interface Noder
public void computeNodes(Collection inputSegStrings)
Noder
SegmentString
s.
Some Noders may add all these nodes to the input SegmentStrings;
others may only add some or none at all.computeNodes
in interface Noder
inputSegStrings
- a collection of SegmentString
s to nodeCopyright © 2022. All rights reserved.