Class: DPTransformer

jsts.simplify.DPTransformer

new DPTransformer(distanceTolerance, isEnsureValidTopology)

Parameters:
Name Type Description
distanceTolerance double
isEnsureValidTopology boolean
Source:

Members

distanceTolerance :double

Type:
  • double
Source:

isEnsureValidTopology :boolean

Type:
  • boolean
Source:

Methods

createValidArea(rawAreaGeom) → {jsts.geom.Geometry}

Creates a valid area geometry from one that possibly has bad topology (i.e. self-intersections). Since buffer can handle invalid topology, but always returns valid geometry, constructing a 0-width buffer "corrects" the topology. Note this only works for area geometries, since buffer always returns areas. This also may return empty geometries, if the input has no actual area.
Parameters:
Name Type Description
rawAreaGeom jsts.geom.Geometry
Source:
Returns:
Type
jsts.geom.Geometry

transformCoordinates(coords, parent) → {jsts.geom.CoordinateSequence}

Parameters:
Name Type Description
coords jsts.geom.CoordinateSequence
parent jsts.geom.Geometry
Source:
Returns:
Type
jsts.geom.CoordinateSequence

transformLinearRing(geom, parent) → {jsts.geom.Geometry}

Simplifies a LinearRing. If the simplification results in a degenerate ring, remove the component.
Parameters:
Name Type Description
geom jsts.geom.LinearRing
parent jsts.geom.Geometry
Source:
Returns:
Type
jsts.geom.Geometry

transformMultiPolygon(geom, parent) → {jsts.geom.Geometry}

Simplifies a MultiPolygon, fixing it if required.
Parameters:
Name Type Description
geom jsts.geom.MultiPolygon
parent jsts.geom.Geometry
Source:
Returns:
Type
jsts.geom.Geometry

transformPolygon(geom, parent) → {jsts.geom.Geometry}

Simplifies a polygon, fixing it if required.
Parameters:
Name Type Description
geom jsts.geom.Polygon
parent jsts.geom.Geometry
Source:
Returns:
Type
jsts.geom.Geometry