JSTS Class

JSTS Class

本系列文章主要参考JSTS的API 主要讲解一些类或方法.

学习内容

  • Angle
  • BoundaryNodeRule
  • CentralEndpointIntersector
  • Centroid
  • CGAlgorithms
  • ConvexHull
  • HCoordinate
  • InteriorPointArea
  • InteriorPointLine
  • InteriorPointPoint
  • LineIntersector
  • SimplePointInAreaLocator
  • MCSelecter
  • MinimumDiameter
  • PointLocator
  • RayCrossingCounter
  • RobustDeterminant
  • RobustLineIntersector
  • SafeBisectorFinder
  • AbstractMethodInvocationError
  • IllegalArgumentError
  • NotImplementedError
  • NotRepresentableError
  • TopologyError
  • Coordinate
  • CoordinateArrays
  • CoordinateList
  • Dimension
  • Envelope
  • Geometry
  • GeometryCollection
  • GeometryFactory
  • IntersectionMatrix
  • LinearRing
  • LineSegment
  • LineString
  • Location
  • MultiLineString
  • MultiPoint
  • MultiPolygon
  • Point
  • Polygon
  • PrecisionModel
  • Triangle
  • GeometryCombiner
  • GeometryExtracter
  • LinearComponentExtracter
  • PointExtracter
  • PolygonExtracter
  • Depth
  • DirectedEdge
  • DirectedEdgeStar
  • Edge
  • EdgeEnd
  • EdgeEndStar
  • EdgeIntersection
  • EdgeIntersectionList
  • EdgeList
  • EdgeRing
  • GraphComponent
  • EdgeSetIntersector
  • MonotoneChainEdge
  • MonotoneChainIndexer
  • SegmentIntersector
  • SimpleEdgeSetIntersector
  • SimpleMCSweepLineIntersector
  • SimpleSweepLineIntersector
  • SweepLineEvent
  • SweepLineSegment
  • Label
  • Node
  • NodeFactory
  • NodeMap
  • PlanarGraph
  • Position
  • Quadrant
  • TopologyLocation
  • ArrayListVisitor
  • MonotoneChain
  • MonotoneChainBuilder
  • MonotoneChainOverlapAction
  • MonotoneChainSelectAction
  • DoubleBits
  • IntervalSize
  • KdNode
  • KdTree
  • Key
  • Node
  • NodeBase
  • Quadtree
  • Root
  • IntersectsOp
  • Interval
  • ItemBoundable
  • SIRtree
  • STRtree
  • GeoJSONReader
  • GeoJSONWriter
  • WKTReader
  • WKTWriter
  • BasicSegmentString
  • InteriorIntersectionFinder
  • IntersectionAdder
  • MCIndexNoder
  • NodedSegmentString
  • Octant
  • SegmentNode
  • SegmentNodeList
  • BufferBuilder
  • BufferInputLineSimplifier
  • BufferOp
  • BufferParameters
  • BufferSubgraph
  • OffsetCurveBuilder
  • OffsetCurveSetBuilder
  • OffsetSegmentGenerator
  • OffsetSegmentString
  • RightmostEdgeFinder
  • SubgraphDepthLocater
  • ConnectedElementLocationFilter
  • DistanceOp
  • GeometryLocation
  • GeometryGraphOperation
  • IsSimpleOp
  • EndpointInfo
  • EdgeString
  • LineMergeDirectedEdge
  • LineMergeEdge
  • LineMerger
  • MaximalEdgeRing
  • MinimalEdgeRing
  • OverlayNodeFactory
  • EdgeEndBuilder
  • EdgeEndBundle
  • EdgeEndBundleStar
  • RelateComputer
  • RelateNode
  • RelateNodeFactory
  • RelateNodeGraph
  • RelateOp
  • CascadedPolygonUnion
  • PointGeometryUnion
  • UnaryUnionOp
  • UnionInteracting
  • ConnectedInteriorTester
  • IsValidOp
  • CommonBits
  • CommonBitsOp
  • CommonBitsRemover
  • CommonCoordinateFilter
  • EnhancedPrecisionOp
  • Translater
  • DouglasPeuckerLineSimplifier
  • DouglasPeuckerSimplifier
  • DPTransformer
  • DelaunayTriangulationBuilder
  • LastFoundQuadEdgeLocator
  • QuadEdge
  • QuadEdgeSubdivision
  • TrianglePredicate
  • Vertex
  • VoronoiDiagramBuilder
  • Assert
  • UniqueCoordinateArrayFilter
  • message

Namespaces

  • jsts
  • algorithm
  • distance
  • locate
  • densify
  • error
  • geom
  • util
  • geomgraph
  • index
  • index
  • bintree
  • chain
  • kdtree
  • quadtree
  • strtree
  • io
  • noding
  • snapround
  • operation
  • buffer
  • distance
  • linemerge
  • overlay
  • snap
  • polygonize
  • predicate
  • relate
  • union
  • valid
  • planargraph
  • precision
  • simplify
  • triangulate
  • quadedge
  • util

Interfaces

  • CoordinateFilter
  • ItemVisitor
  • SpatialIndex
  • AbstractNode
  • Boundable
  • NodableSegmentString
  • Noder
  • SegmentIntersector
  • SegmentString
  • SinglePassNoder

开启JSTS之旅

1 新建jstsInfo.js文件

const jsts = require('jsts')
//打印jsts的版本信息
console.log(jsts.version);
//打印jsts对象
console.log(jsts);

2 node jstsInfo.js

2.0.6 (0a96a17)

{ algorithm: 
   { distance: 
      { DiscreteHausdorffDistance: [Object],
        DistanceToPoint: [Object],
        PointPairDistance: [Object] },
     locate: 
      { IndexedPointInAreaLocator: [Object],
        PointOnGeometryLocator: [Object],
        SimplePointInAreaLocator: [Object] },
     match: 
      { AreaSimilarityMeasure: [Object],
        HausdorffSimilarityMeasure: [Object],
        SimilarityMeasure: [Object],
        SimilarityMeasureCombiner: [Object] },
     Angle: 
      { [Function: re]
        constructor_: [Function],
        PI_TIMES_2: 6.283185307179586,
        PI_OVER_2: 1.5707963267948966,
        PI_OVER_4: 0.7853981633974483,
        COUNTERCLOCKWISE: 1,
        CLOCKWISE: -1,
        NONE: 0 },
     Area: { [Function: Ot] constructor_: [Function] },
     Centroid: { [Function: rn] constructor_: [Function] },
     ConvexHull: { [Function: cn] RadialComparator: [Object], constructor_: [Function] },
     Distance: { [Function: A] constructor_: [Function] },
     InteriorPointArea: { [Function: un] SafeBisectorFinder: [Object], constructor_: [Function] },
     InteriorPointLine: { [Function: dn] constructor_: [Function] },
     InteriorPointPoint: { [Function: _n] constructor_: [Function] },
     Length: { [Function: xt] constructor_: [Function] },
     Orientation: 
      { [Function: v]
        constructor_: [Function],
        CLOCKWISE: -1,
        RIGHT: -1,
        COUNTERCLOCKWISE: 1,
        LEFT: 1,
        COLLINEAR: 0,
        STRAIGHT: 0 },
     PointLocation: { [Function: je] constructor_: [Function] },
     PointLocator: { [Function: fn] constructor_: [Function] },
     RobustLineIntersector: { [Function: ee] constructor_: [Function] },
     MinimumBoundingCircle: { [Function: pn] constructor_: [Function] },
     MinimumDiameter: { [Function: mn] constructor_: [Function] } },
  densify: 
   { Densifier: { [Function: xn] DensifyTransformer: [Object], constructor_: [Function] } },
  dissolve: { LineDissolver: { [Function: Rn] constructor_: [Function] } },
  geom: 
   { Coordinate: 
      { [Function: g]
        DimensionalComparator: [Object],
        constructor_: [Function],
        serialVersionUID: 6683108902428367000,
        NULL_ORDINATE: undefined,
        X: 0,
        Y: 1,
        Z: 2 },
     CoordinateList: { [Function: I] constructor_: [Function], coordArrayType: [] },
     Envelope: 
      { [Function: N]
        constructor_: [Function],
        serialVersionUID: 5873921885273102000 },
     LineSegment: 
      { [Function: ne]
        constructor_: [Function],
        serialVersionUID: 3252005833466256400 },
     GeometryFactory: 
      { [Function: Wt]
        CloneOp: [Object],
        constructor_: [Function],
        serialVersionUID: -6820524753094096000 },
     Geometry: 
      { [Function: q]
        constructor_: [Function],
        serialVersionUID: 8763622679187377000,
        TYPECODE_POINT: 0,
        TYPECODE_MULTIPOINT: 1,
        TYPECODE_LINESTRING: 2,
        TYPECODE_LINEARRING: 3,
        TYPECODE_MULTILINESTRING: 4,
        TYPECODE_POLYGON: 5,
        TYPECODE_MULTIPOLYGON: 6,
        TYPECODE_GEOMETRYCOLLECTION: 7,
        TYPENAME_POINT: 'Point',
        TYPENAME_MULTIPOINT: 'MultiPoint',
        TYPENAME_LINESTRING: 'LineString',
        TYPENAME_LINEARRING: 'LinearRing',
        TYPENAME_MULTILINESTRING: 'MultiLineString',
        TYPENAME_POLYGON: 'Polygon',
        TYPENAME_MULTIPOLYGON: 'MultiPolygon',
        TYPENAME_GEOMETRYCOLLECTION: 'GeometryCollection',
        geometryChangedFilter: [Object] },
     Point: 
      { [Function: vt]
        constructor_: [Function],
        serialVersionUID: 4902022702746615000 },
     LineString: 
      { [Function: Rt]
        constructor_: [Function],
        serialVersionUID: 3110669828065365500 },
     LinearRing: 
      { [Function: Dt]
        constructor_: [Function],
        MINIMUM_VALID_SIZE: 4,
        serialVersionUID: -4261142084085851600 },
     Polygon: 
      { [Function: Mt]
        constructor_: [Function],
        serialVersionUID: -3494792200821764600 },
     GeometryCollection: 
      { [Function: ft]
        constructor_: [Function],
        serialVersionUID: -5694727726395021000 },
     MultiPoint: 
      { [Function: At]
        constructor_: [Function],
        serialVersionUID: -8048474874175356000 },
     MultiLineString: 
      { [Function: pt]
        constructor_: [Function],
        serialVersionUID: 8166665132445434000 },
     MultiPolygon: 
      { [Function: Ft]
        constructor_: [Function],
        serialVersionUID: -551033529766975900 },
     Dimension: 
      { [Function: gt]
        constructor_: [Function],
        P: 0,
        L: 1,
        A: 2,
        FALSE: -1,
        TRUE: -2,
        DONTCARE: -3,
        SYM_FALSE: 'F',
        SYM_TRUE: 'T',
        SYM_DONTCARE: '*',
        SYM_P: '0',
        SYM_L: '1',
        SYM_A: '2' },
     IntersectionMatrix: { [Function: ie] constructor_: [Function] },
     PrecisionModel: 
      { [Function: Xt]
        Type: [Object],
        constructor_: [Function],
        serialVersionUID: 7777263578777804000,
        FIXED: [Object],
        FLOATING: [Object],
        FLOATING_SINGLE: [Object],
        maximumPreciseValue: 9007199254740992 },
     Location: 
      { [Function: se]
        constructor_: [Function],
        INTERIOR: 0,
        BOUNDARY: 1,
        EXTERIOR: 2,
        NONE: -1 },
     Triangle: { [Function: oe] constructor_: [Function] },
     util: 
      { AffineTransformation: [Object],
        AffineTransformationBuilder: [Object],
        AffineTransformationFactory: [Object],
        ComponentCoordinateExtracter: [Object],
        GeometryCollectionMapper: [Object],
        GeometryCombiner: [Object],
        GeometryEditor: [Object],
        GeometryExtracter: [Object],
        GeometryMapper: [Object],
        GeometryTransformer: [Object],
        LineStringExtracter: [Object],
        LinearComponentExtracter: [Object],
        MapOp: [Object],
        PointExtracter: [Object],
        PolygonExtracter: [Object],
        ShortCircuitedGeometryVisitor: [Object],
        SineStarFactory: [Object] } },
  geomgraph: { GeometryGraph: { [Function: Jn] constructor_: [Function] } },
  index: 
   { kdtree: { KdTree: [Object] },
     quadtree: { Quadtree: [Object] },
     strtree: { STRtree: [Object] } },
  io: 
   { GeoJSONReader: [Function: GeoJSONReader],
     GeoJSONWriter: [Function: GeoJSONWriter],
     OL3Parser: [Function: OL3Parser],
     WKTReader: [Function: WKTReader],
     WKTWriter: [Function: $t] },
  linearref: 
   { LengthIndexedLine: { [Function: Uo] constructor_: [Function] },
     LengthLocationMap: { [Function: Yo] constructor_: [Function] },
     LinearGeometryBuilder: { [Function: qo] constructor_: [Function] },
     LinearIterator: { [Function: Do] constructor_: [Function] },
     LinearLocation: { [Function: Ao] constructor_: [Function] },
     LocationIndexedLine: { [Function: Vo] constructor_: [Function] } },
  noding: 
   { MCIndexNoder: { [Function: Us] SegmentOverlapAction: [Object], constructor_: [Function] },
     ScaledNoder: { [Function: Xs] constructor_: [Function] },
     SegmentString: { [Function: Ds] constructor_: [Function] } },
  operation: 
   { BoundaryOp: { [Function: mt] constructor_: [Function] },
     IsSimpleOp: { [Function: Ws] EndpointInfo: [Object], constructor_: [Function] },
     buffer: { BufferOp: [Object], BufferParameters: [Object] },
     distance: { DistanceOp: [Object] },
     linemerge: { LineMerger: [Object] },
     overlay: { snap: [Object], OverlayOp: [Object] },
     polygonize: { Polygonizer: [Object] },
     relate: { RelateOp: [Object] },
     union: { UnaryUnionOp: [Object] },
     valid: { IsValidOp: [Object], ConsistentAreaTester: [Object] } },
  precision: 
   { GeometryPrecisionReducer: { [Function: kr] constructor_: [Function] } },
  simplify: 
   { DouglasPeuckerSimplifier: { [Function: Wr] DPTransformer: [Object], constructor_: [Function] },
     TopologyPreservingSimplifier: 
      { [Function: eo]
        LineStringTransformer: [Object],
        LineStringMapBuilderFilter: [Object],
        constructor_: [Function] },
     VWSimplifier: { [Function: oo] VWTransformer: [Object], constructor_: [Function] } },
  triangulate: 
   { ConformingDelaunayTriangulationBuilder: { [Function: vo] constructor_: [Function] },
     DelaunayTriangulationBuilder: { [Function: Po] constructor_: [Function] },
     VoronoiDiagramBuilder: { [Function: Oo] constructor_: [Function] },
     quadedge: { Vertex: [Object] } },
  util: 
   { CollectionUtil: { [Function: Xo] Function: [Function], constructor_: [Function] },
     CoordinateArrayFilter: { [Function: Ho] constructor_: [Function] },
     CoordinateCountFilter: { [Function: Wo] constructor_: [Function] },
     GeometricShapeFactory: { [Function: we] Dimensions: [Object], constructor_: [Function] },
     NumberUtil: { [Function: e] constructor_: [Function] },
     ObjectCounter: { [Function: jo] Counter: [Object], constructor_: [Function] },
     PriorityQueue: { [Function: ps] constructor_: [Function] },
     StringUtil: 
      { [Function: wt]
        constructor_: [Function],
        NEWLINE: '\n',
        SIMPLE_ORDINATE_FORMAT: {} },
     UniqueCoordinateArrayFilter: { [Function: an] constructor_: [Function] } },
  version: '2.0.6 (0a96a17)' }

你可能感兴趣的:(JSTS Class)