Class: CommonBitsOp

jsts.precision.CommonBitsOp

new CommonBitsOp()

Provides versions of Geometry spatial functions which use common bit removal to reduce the likelihood of robustness problems.

In the current implementation no rounding is performed on the reshifted result geometry, which means that it is possible that the returned Geometry is invalid. Client classes should check the validity of the returned result themselves.

Version:
  • 1.7
Source:

Methods

buffer(geom0, distance) → {jsts.geom.Geometry}

Computes the buffer a geometry, using enhanced precision.
Parameters:
Name Type Description
geom0 jsts.geom.Geometry the Geometry to buffer
distance number the buffer distance
Source:
Returns:
the Geometry representing the buffer of the input Geometry.
Type
jsts.geom.Geometry

difference(geom0, geom1) → {jsts.geom.Geometry}

Computes the set-theoretic difference of two Geometrys, using enhanced precision.
Parameters:
Name Type Description
geom0 jsts.geom.Geometry the first Geometry
geom1 jsts.geom.Geometry the second Geometry, to be subtracted from the first
Source:
Returns:
the Geometry representing the set-theoretic difference of the input Geometries.
Type
jsts.geom.Geometry

intersection(geom0, geom1) → {jsts.geom.Geometry}

Computes the set-theoretic intersection of two Geometrys, using enhanced precision.
Parameters:
Name Type Description
geom0 jsts.geom.Geometry the first Geometry
geom1 jsts.geom.Geometry the second Geometry
Source:
Returns:
the Geometry representing the set-theoretic intersection of the input Geometries.
Type
jsts.geom.Geometry

symDifference(geom0, geom1) → {jsts.geom.Geometry}

Computes the set-theoretic symmetric difference of two geometries, using enhanced precision.
Parameters:
Name Type Description
geom0 jsts.geom.Geometry the first Geometry
geom1 jsts.geom.Geometry the second Geometry
Source:
Returns:
the Geometry representing the set-theoretic symmetric difference of the input Geometries.
Type
jsts.geom.Geometry

union(geom0, geom1) → {jsts.geom.Geometry}

Computes the set-theoretic union of two Geometrys, using enhanced precision.
Parameters:
Name Type Description
geom0 jsts.geom.Geometry the first Geometry
geom1 jsts.geom.Geometry the second Geometry
Source:
Returns:
the Geometry representing the set-theoretic union of the input Geometries.
Type
jsts.geom.Geometry