How to use the wkx.GeometryCollection function in wkx

To help you get started, we’ve selected a few wkx examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ngageoint / geopackage-js / lib / geom / envelopeBuilder.js View on Github external
envelope.minM = Math.min(envelope.minM, point.m)
        envelope.maxM = Math.max(envelope.maxM, point.m)
      }
    }
  }
  if (geom instanceof wkx.Polygon) {
    for (const eRingPoint of geom.exteriorRing) {
      zmEnvelope(eRingPoint, envelope, hasZ, hasM)
    }
    for (const interiorRing of geom.interiorRings) {
      for (const ringPoint of interiorRing) {
        zmEnvelope(ringPoint, envelope, hasZ, hasM)
      }
    }
  }
  if (geom instanceof wkx.GeometryCollection) {
    for (const geometry of geom.geometries) {
      zmEnvelope(geometry, envelope, hasZ, hasM)
    }
  }
  if (geom instanceof wkx.MultiPoint) {
    for (const point of geom.points) {
      zmEnvelope(point, envelope, hasZ, hasM)
    }
  }
  if (geom instanceof wkx.MultiLineString) {
    for (const lineString of geom.lineStrings) {
      zmEnvelope(lineString, envelope, hasZ, hasM)
    }
  }
  if (geom instanceof wkx.MultiPolygon) {
    for (const polygon of geom.polygons) {

wkx

A WKT/WKB/EWKT/EWKB/TWKB/GeoJSON parser and serializer

MIT
Latest version published 5 years ago

Package Health Score

67 / 100
Full package analysis