public class CountingPointSequenceBuilder extends Object implements PointSequenceBuilder
Constructor and Description |
---|
CountingPointSequenceBuilder(DimensionalFlag df,
CrsId crsId) |
Modifier and Type | Method and Description |
---|---|
PointSequenceBuilder |
add(double[] coordinates)
Adds a
Point to the PointSequence being built. |
PointSequenceBuilder |
add(double x,
double y)
Adds a 2-dimensional point to the
PointSequence being built. |
PointSequenceBuilder |
add(double x,
double y,
double zOrm)
Adds a 3-dimensional point to the
PointSequence being built. |
PointSequenceBuilder |
add(double x,
double y,
double z,
double m)
Adds a 4-dimensional point to the
PointSequence being built. |
PointSequenceBuilder |
add(Point pnt)
Adds the specified
Point to the PointSequence being built. |
CrsId |
getCrsId()
Returns the
CrsId of the PointSequence being built. |
DimensionalFlag |
getDimensionalFlag()
Returns the
DimensionalFlag of the PointSequence being built. |
int |
getNumAdded()
Returns the number of points already added to this
PointSequence . |
PointSequence |
toPointSequence()
Returns the result of this builder.
|
public CountingPointSequenceBuilder(DimensionalFlag df, CrsId crsId)
public PointSequenceBuilder add(double[] coordinates)
PointSequenceBuilder
Point
to the PointSequence
being built.add
in interface PointSequenceBuilder
coordinates
- the coordinates of the Point
that is addedpublic PointSequenceBuilder add(double x, double y)
PointSequenceBuilder
PointSequence
being built.add
in interface PointSequenceBuilder
x
- the X-coordinate of the of the Point
that is addedy
- the Y-coordinate of the of the Point
that is addedpublic PointSequenceBuilder add(double x, double y, double zOrm)
PointSequenceBuilder
PointSequence
being built. The DimensionalFlag
determines
whether the third dimension is a Z- or M-coordinate.add
in interface PointSequenceBuilder
x
- the X-coordinate of the of the Point
that is addedy
- the Y-coordinate of the of the Point
that is addedzOrm
- the Z- or M-coordinate of the of the Point
that is addedpublic PointSequenceBuilder add(double x, double y, double z, double m)
PointSequenceBuilder
PointSequence
being built.add
in interface PointSequenceBuilder
x
- the X-coordinate of the of the Point
that is addedy
- the Y-coordinate of the of the Point
that is addedz
- the Z-coordinate of the of the Point
that is addedm
- the M-coordinate of the of the Point
that is addedpublic PointSequenceBuilder add(Point pnt)
PointSequenceBuilder
Point
to the PointSequence
being built.add
in interface PointSequenceBuilder
pnt
- the Point
that is added.public DimensionalFlag getDimensionalFlag()
PointSequenceBuilder
DimensionalFlag
of the PointSequence
being built.getDimensionalFlag
in interface PointSequenceBuilder
DimensionalFlag
of the PointSequence
being built.public CrsId getCrsId()
PointSequenceBuilder
CrsId
of the PointSequence
being built.getCrsId
in interface PointSequenceBuilder
CrsId
of the PointSequence
being built.public PointSequence toPointSequence()
PointSequenceBuilder
toPointSequence
in interface PointSequenceBuilder
PointSequence
that has been built by this builder instance.public int getNumAdded()
PointSequenceBuilder
PointSequence
.getNumAdded
in interface PointSequenceBuilder
Copyright © 2015 geolatte.org. All rights reserved.