Show:

Table of Contents

Constructor

gdal.MultiCurve ()

Methods

boundary () gdal.Geometry

Compute boundary.

Returns:

boundaryAsync
(
  • callback=undefined
)
Promise

Compute boundary. Asynchronous version. If the last parameter is a callback, then this callback is called on completion and undefined is returned. All optional parameters before the callback can be omitted so the callback parameter can be at any position as long as it is the last parameter. Otherwise the function returns a Promise resolved with the result.

Parameters:

  • [callback=undefined] callback optional

    standard Node.js (error, result) callback. It is always the last parameter and can be specified even if certain optional parameters are omitted. On error error is an Error object and result is undefined. On success error is null and result contains the result. The function returns a Promise when the callback is undefined. The return value is undefined when a callback is provided. Argument type errors are thrown synchronously even when a callback is provided. In Promise mode all errors result in a rejected Promise.

Returns:

Promise
buffer
(
  • distance
  • segments
)
gdal.Geometry

Buffers the geometry by the given distance.

Parameters:

  • distance Number
  • segments Number

Returns:

bufferAsync
(
  • distance
  • segments
  • callback=undefined
)
Promise

Buffers the geometry by the given distance. Asynchronous version. If the last parameter is a callback, then this callback is called on completion and undefined is returned. All optional parameters before the callback can be omitted so the callback parameter can be at any position as long as it is the last parameter. Otherwise the function returns a Promise resolved with the result.

Parameters:

  • distance Number
  • segments Number
  • [callback=undefined] callback optional

    standard Node.js (error, result) callback. It is always the last parameter and can be specified even if certain optional parameters are omitted. On error error is an Error object and result is undefined. On success error is null and result contains the result. The function returns a Promise when the callback is undefined. The return value is undefined when a callback is provided. Argument type errors are thrown synchronously even when a callback is provided. In Promise mode all errors result in a rejected Promise.

Returns:

Promise
centroid () gdal.Point

Compute the centroid of the geometry.

Returns:

centroidAsync
(
  • callback=undefined
)
Promise

Compute the centroid of the geometry. Asynchronous version. If the last parameter is a callback, then this callback is called on completion and undefined is returned. All optional parameters before the callback can be omitted so the callback parameter can be at any position as long as it is the last parameter. Otherwise the function returns a Promise resolved with the result.

Parameters:

  • [callback=undefined] callback optional

    standard Node.js (error, result) callback. It is always the last parameter and can be specified even if certain optional parameters are omitted. On error error is an Error object and result is undefined. On success error is null and result contains the result. The function returns a Promise when the callback is undefined. The return value is undefined when a callback is provided. Argument type errors are thrown synchronously even when a callback is provided. In Promise mode all errors result in a rejected Promise.

Returns:

Promise
clone () gdal.Geometry

Clones the instance.

Returns:

closeRings ()

Closes any un-closed rings.

closeRingsAsync
(
  • callback=undefined
)
Promise

Closes any un-closed rings. Asynchronous version. If the last parameter is a callback, then this callback is called on completion and undefined is returned. All optional parameters before the callback can be omitted so the callback parameter can be at any position as long as it is the last parameter. Otherwise the function returns a Promise resolved with the result.

Parameters:

  • [callback=undefined] Callback optional

    standard Node.js (error, result) callback. It is always the last parameter and can be specified even if certain optional parameters are omitted. On error error is an Error object and result is undefined. On success error is null and result contains the result. The function returns a Promise when the callback is undefined. The return value is undefined when a callback is provided. Argument type errors are thrown synchronously even when a callback is provided. In Promise mode all errors result in a rejected Promise.

Returns:

Promise
contains
(
  • geometry
)
Boolean

Determines if the current geometry contains the provided geometry.

Parameters:

Returns:

Boolean
containsAsync
(
  • geometry
  • callback=undefined
)
Promise

Determines if the current geometry contains the provided geometry. Asynchronous version. If the last parameter is a callback, then this callback is called on completion and undefined is returned. All optional parameters before the callback can be omitted so the callback parameter can be at any position as long as it is the last parameter. Otherwise the function returns a Promise resolved with the result.

Parameters:

  • geometry gdal.Geometry
  • [callback=undefined] Callback optional

    standard Node.js (error, result) callback. It is always the last parameter and can be specified even if certain optional parameters are omitted. On error error is an Error object and result is undefined. On success error is null and result contains the result. The function returns a Promise when the callback is undefined. The return value is undefined when a callback is provided. Argument type errors are thrown synchronously even when a callback is provided. In Promise mode all errors result in a rejected Promise.

Returns:

Promise
convexHull () gdal.Geometry

Compute convex hull.

Returns:

convexHullAsync
(
  • callback=undefined
)
Promise

Compute convex hull. Asynchronous version. If the last parameter is a callback, then this callback is called on completion and undefined is returned. All optional parameters before the callback can be omitted so the callback parameter can be at any position as long as it is the last parameter. Otherwise the function returns a Promise resolved with the result.

Parameters:

  • [callback=undefined] callback optional

    standard Node.js (error, result) callback. It is always the last parameter and can be specified even if certain optional parameters are omitted. On error error is an Error object and result is undefined. On success error is null and result contains the result. The function returns a Promise when the callback is undefined. The return value is undefined when a callback is provided. Argument type errors are thrown synchronously even when a callback is provided. In Promise mode all errors result in a rejected Promise.

Returns:

Promise
crosses
(
  • geometry
)
Boolean

Determines if the two geometries cross.

Parameters:

Returns:

Boolean
crossesAsync
(
  • geometry
  • callback=undefined
)
Promise

Determines if the two geometries cross. Asynchronous version. If the last parameter is a callback, then this callback is called on completion and undefined is returned. All optional parameters before the callback can be omitted so the callback parameter can be at any position as long as it is the last parameter. Otherwise the function returns a Promise resolved with the result.

Parameters:

  • geometry gdal.Geometry
  • [callback=undefined] Callback optional

    standard Node.js (error, result) callback. It is always the last parameter and can be specified even if certain optional parameters are omitted. On error error is an Error object and result is undefined. On success error is null and result contains the result. The function returns a Promise when the callback is undefined. The return value is undefined when a callback is provided. Argument type errors are thrown synchronously even when a callback is provided. In Promise mode all errors result in a rejected Promise.

Returns:

Promise
difference
(
  • geometry
)
gdal.Geometry

Compute the difference of this geometry with another.

Parameters:

Returns:

differenceAsync
(
  • geometry
  • callback=undefined
)
Promise

Compute the difference of this geometry with another. Asynchronous version. If the last parameter is a callback, then this callback is called on completion and undefined is returned. All optional parameters before the callback can be omitted so the callback parameter can be at any position as long as it is the last parameter. Otherwise the function returns a Promise resolved with the result.

Parameters:

  • geometry gdal.Geometry
  • [callback=undefined] callback optional

    standard Node.js (error, result) callback. It is always the last parameter and can be specified even if certain optional parameters are omitted. On error error is an Error object and result is undefined. On success error is null and result contains the result. The function returns a Promise when the callback is undefined. The return value is undefined when a callback is provided. Argument type errors are thrown synchronously even when a callback is provided. In Promise mode all errors result in a rejected Promise.

Returns:

Promise
disjoint
(
  • geometry
)
Boolean

Determines if the two geometries are disjoint.

Parameters:

Returns:

Boolean
disjointAsync
(
  • geometry
  • callback=undefined
)
Promise

Determines if the two geometries are disjoint. Asynchronous version. If the last parameter is a callback, then this callback is called on completion and undefined is returned. All optional parameters before the callback can be omitted so the callback parameter can be at any position as long as it is the last parameter. Otherwise the function returns a Promise resolved with the result.

Parameters:

  • geometry gdal.Geometry
  • [callback=undefined] Callback optional

    standard Node.js (error, result) callback. It is always the last parameter and can be specified even if certain optional parameters are omitted. On error error is an Error object and result is undefined. On success error is null and result contains the result. The function returns a Promise when the callback is undefined. The return value is undefined when a callback is provided. Argument type errors are thrown synchronously even when a callback is provided. In Promise mode all errors result in a rejected Promise.

Returns:

Promise
distance
(
  • geometry
)
Number

Computes the distance between the two geometries.

Parameters:

Returns:

Number
distanceAsync
(
  • geometry
  • callback=undefined
)
Promise

Computes the distance between the two geometries. Asynchronous version. If the last parameter is a callback, then this callback is called on completion and undefined is returned. All optional parameters before the callback can be omitted so the callback parameter can be at any position as long as it is the last parameter. Otherwise the function returns a Promise resolved with the result.

Parameters:

  • geometry gdal.Geometry
  • [callback=undefined] Callback optional

    standard Node.js (error, result) callback. It is always the last parameter and can be specified even if certain optional parameters are omitted. On error error is an Error object and result is undefined. On success error is null and result contains the result. The function returns a Promise when the callback is undefined. The return value is undefined when a callback is provided. Argument type errors are thrown synchronously even when a callback is provided. In Promise mode all errors result in a rejected Promise.

Returns:

Promise
empty ()

Clears the geometry.

emptyAsync
(
  • callback=undefined
)
Promise

Clears the geometry. Asynchronous version. If the last parameter is a callback, then this callback is called on completion and undefined is returned. All optional parameters before the callback can be omitted so the callback parameter can be at any position as long as it is the last parameter. Otherwise the function returns a Promise resolved with the result.

Parameters:

  • [callback=undefined] Callback optional

    standard Node.js (error, result) callback. It is always the last parameter and can be specified even if certain optional parameters are omitted. On error error is an Error object and result is undefined. On success error is null and result contains the result. The function returns a Promise when the callback is undefined. The return value is undefined when a callback is provided. Argument type errors are thrown synchronously even when a callback is provided. In Promise mode all errors result in a rejected Promise.

Returns:

Promise
equals
(
  • geometry
)
Boolean

Determines if the two geometries equal each other.

Parameters:

Returns:

Boolean
equalsAsync
(
  • geometry
  • callback=undefined
)
Promise

Determines if the two geometries equal each other. Asynchronous version. If the last parameter is a callback, then this callback is called on completion and undefined is returned. All optional parameters before the callback can be omitted so the callback parameter can be at any position as long as it is the last parameter. Otherwise the function returns a Promise resolved with the result.

Parameters:

  • geometry gdal.Geometry
  • [callback=undefined] Callback optional

    standard Node.js (error, result) callback. It is always the last parameter and can be specified even if certain optional parameters are omitted. On error error is an Error object and result is undefined. On success error is null and result contains the result. The function returns a Promise when the callback is undefined. The return value is undefined when a callback is provided. Argument type errors are thrown synchronously even when a callback is provided. In Promise mode all errors result in a rejected Promise.

Returns:

Promise
flattenTo2D () Void

Convert geometry to strictly 2D

Returns:

Void
flattenTo2DAsync
(
  • callback=undefined
)
Promise

Convert geometry to strictly 2D Asynchronous version. If the last parameter is a callback, then this callback is called on completion and undefined is returned. All optional parameters before the callback can be omitted so the callback parameter can be at any position as long as it is the last parameter. Otherwise the function returns a Promise resolved with the result.

Parameters:

  • [callback=undefined] Callback optional

    standard Node.js (error, result) callback. It is always the last parameter and can be specified even if certain optional parameters are omitted. On error error is an Error object and result is undefined. On success error is null and result contains the result. The function returns a Promise when the callback is undefined. The return value is undefined when a callback is provided. Argument type errors are thrown synchronously even when a callback is provided. In Promise mode all errors result in a rejected Promise.

Returns:

Promise
getArea () Number

Computes the combined area of the geometries.

Returns:

Number
getEnvelope () gdal.Envelope

Computes the bounding box (envelope).

Returns:

gdal.Envelope:

Bounding envelope

getEnvelope3D () gdal.Envelope3D

Computes the 3D bounding box (envelope).

Returns:

gdal.Envelope3D:

Bounding envelope

getEnvelope3DAsync
(
  • callback=undefined
)
Promise

Computes the 3D bounding box (envelope). Asynchronous version. If the last parameter is a callback, then this callback is called on completion and undefined is returned. All optional parameters before the callback can be omitted so the callback parameter can be at any position as long as it is the last parameter. Otherwise the function returns a Promise resolved with the result.

Parameters:

  • [callback=undefined] callback optional

    standard Node.js (error, result) callback. It is always the last parameter and can be specified even if certain optional parameters are omitted. On error error is an Error object and result is undefined. On success error is null and result contains the result. The function returns a Promise when the callback is undefined. The return value is undefined when a callback is provided. Argument type errors are thrown synchronously even when a callback is provided. In Promise mode all errors result in a rejected Promise.

Returns:

Promise
getEnvelopeAsync
(
  • callback=undefined
)
Promise

Computes the bounding box (envelope). Asynchronous version. If the last parameter is a callback, then this callback is called on completion and undefined is returned. All optional parameters before the callback can be omitted so the callback parameter can be at any position as long as it is the last parameter. Otherwise the function returns a Promise resolved with the result.

Parameters:

  • [callback=undefined] callback optional

    standard Node.js (error, result) callback. It is always the last parameter and can be specified even if certain optional parameters are omitted. On error error is an Error object and result is undefined. On success error is null and result contains the result. The function returns a Promise when the callback is undefined. The return value is undefined when a callback is provided. Argument type errors are thrown synchronously even when a callback is provided. In Promise mode all errors result in a rejected Promise.

Returns:

Promise
getLength () Number

Compute the length of a multicurve.

Returns:

Number
intersection
(
  • geometry
)
gdal.Geometry

Compute intersection with another geometry.

Parameters:

Returns:

intersectionAsync
(
  • geometry
  • callback=undefined
)
Promise

Compute intersection with another geometry. Asynchronous version. If the last parameter is a callback, then this callback is called on completion and undefined is returned. All optional parameters before the callback can be omitted so the callback parameter can be at any position as long as it is the last parameter. Otherwise the function returns a Promise resolved with the result.

Parameters:

  • geometry gdal.Geometry
  • [callback=undefined] callback optional

    standard Node.js (error, result) callback. It is always the last parameter and can be specified even if certain optional parameters are omitted. On error error is an Error object and result is undefined. On success error is null and result contains the result. The function returns a Promise when the callback is undefined. The return value is undefined when a callback is provided. Argument type errors are thrown synchronously even when a callback is provided. In Promise mode all errors result in a rejected Promise.

Returns:

Promise
intersects
(
  • geometry
)
Boolean

Determines if the two geometries intersect.

Parameters:

Returns:

Boolean
intersectsAsync
(
  • geometry
  • callback=undefined
)
Promise

Determines if the two geometries intersect. Asynchronous version. If the last parameter is a callback, then this callback is called on completion and undefined is returned. All optional parameters before the callback can be omitted so the callback parameter can be at any position as long as it is the last parameter. Otherwise the function returns a Promise resolved with the result.

Parameters:

  • geometry gdal.Geometry
  • [callback=undefined] Callback optional

    standard Node.js (error, result) callback. It is always the last parameter and can be specified even if certain optional parameters are omitted. On error error is an Error object and result is undefined. On success error is null and result contains the result. The function returns a Promise when the callback is undefined. The return value is undefined when a callback is provided. Argument type errors are thrown synchronously even when a callback is provided. In Promise mode all errors result in a rejected Promise.

Returns:

Promise
isEmpty () Boolean

Determines if the geometry is empty.

Returns:

Boolean
isEmptyAsync
(
  • callback=undefined
)
Promise

Determines if the geometry is empty. Asynchronous version. If the last parameter is a callback, then this callback is called on completion and undefined is returned. All optional parameters before the callback can be omitted so the callback parameter can be at any position as long as it is the last parameter. Otherwise the function returns a Promise resolved with the result.

Parameters:

  • [callback=undefined] Callback optional

    standard Node.js (error, result) callback. It is always the last parameter and can be specified even if certain optional parameters are omitted. On error error is an Error object and result is undefined. On success error is null and result contains the result. The function returns a Promise when the callback is undefined. The return value is undefined when a callback is provided. Argument type errors are thrown synchronously even when a callback is provided. In Promise mode all errors result in a rejected Promise.

Returns:

Promise
isRing () Boolean

Determines if the geometry is a ring.

Returns:

Boolean
isRingAsync
(
  • callback=undefined
)
Promise

Determines if the geometry is a ring. Asynchronous version. If the last parameter is a callback, then this callback is called on completion and undefined is returned. All optional parameters before the callback can be omitted so the callback parameter can be at any position as long as it is the last parameter. Otherwise the function returns a Promise resolved with the result.

Parameters:

  • [callback=undefined] Callback optional

    standard Node.js (error, result) callback. It is always the last parameter and can be specified even if certain optional parameters are omitted. On error error is an Error object and result is undefined. On success error is null and result contains the result. The function returns a Promise when the callback is undefined. The return value is undefined when a callback is provided. Argument type errors are thrown synchronously even when a callback is provided. In Promise mode all errors result in a rejected Promise.

Returns:

Promise
isSimple () Boolean

Determines if the geometry is simple.

Returns:

Boolean
isSimpleAsync
(
  • callback=undefined
)
Promise

Determines if the geometry is simple. Asynchronous version. If the last parameter is a callback, then this callback is called on completion and undefined is returned. All optional parameters before the callback can be omitted so the callback parameter can be at any position as long as it is the last parameter. Otherwise the function returns a Promise resolved with the result.

Parameters:

  • [callback=undefined] Callback optional

    standard Node.js (error, result) callback. It is always the last parameter and can be specified even if certain optional parameters are omitted. On error error is an Error object and result is undefined. On success error is null and result contains the result. The function returns a Promise when the callback is undefined. The return value is undefined when a callback is provided. Argument type errors are thrown synchronously even when a callback is provided. In Promise mode all errors result in a rejected Promise.

Returns:

Promise
isValid () Boolean

Determines if the geometry is valid.

Returns:

Boolean
isValidAsync
(
  • callback=undefined
)
Promise

Determines if the geometry is valid. Asynchronous version. If the last parameter is a callback, then this callback is called on completion and undefined is returned. All optional parameters before the callback can be omitted so the callback parameter can be at any position as long as it is the last parameter. Otherwise the function returns a Promise resolved with the result.

Parameters:

  • [callback=undefined] Callback optional

    standard Node.js (error, result) callback. It is always the last parameter and can be specified even if certain optional parameters are omitted. On error error is an Error object and result is undefined. On success error is null and result contains the result. The function returns a Promise when the callback is undefined. The return value is undefined when a callback is provided. Argument type errors are thrown synchronously even when a callback is provided. In Promise mode all errors result in a rejected Promise.

Returns:

Promise
makeValid () gdal.Geometry

Attempts to make an invalid geometry valid without losing vertices. Requires GDAL 3.0

Returns:

makeValidAsync
(
  • callback=undefined
)
Promise

Attempts to make an invalid geometry valid without losing vertices. Requires GDAL 3.0 Asynchronous version. If the last parameter is a callback, then this callback is called on completion and undefined is returned. All optional parameters before the callback can be omitted so the callback parameter can be at any position as long as it is the last parameter. Otherwise the function returns a Promise resolved with the result.

Parameters:

  • [callback=undefined] callback optional

    standard Node.js (error, result) callback. It is always the last parameter and can be specified even if certain optional parameters are omitted. On error error is an Error object and result is undefined. On success error is null and result contains the result. The function returns a Promise when the callback is undefined. The return value is undefined when a callback is provided. Argument type errors are thrown synchronously even when a callback is provided. In Promise mode all errors result in a rejected Promise.

Returns:

Promise
overlaps
(
  • geometry
)
Boolean

Determines if the current geometry overlaps the provided geometry.

Parameters:

Returns:

Boolean
overlapsAsync
(
  • geometry
  • callback=undefined
)
Promise

Determines if the current geometry overlaps the provided geometry. Asynchronous version. If the last parameter is a callback, then this callback is called on completion and undefined is returned. All optional parameters before the callback can be omitted so the callback parameter can be at any position as long as it is the last parameter. Otherwise the function returns a Promise resolved with the result.

Parameters:

  • geometry gdal.Geometry
  • [callback=undefined] Callback optional

    standard Node.js (error, result) callback. It is always the last parameter and can be specified even if certain optional parameters are omitted. On error error is an Error object and result is undefined. On success error is null and result contains the result. The function returns a Promise when the callback is undefined. The return value is undefined when a callback is provided. Argument type errors are thrown synchronously even when a callback is provided. In Promise mode all errors result in a rejected Promise.

Returns:

Promise
polygonize () gdal.Polygon

Converts it to a polygon.

Returns:

segmentize
(
  • segment_length
)
Void

Modify the geometry such it has no segment longer then the given distance.

Parameters:

  • segment_length Number

Returns:

Void
simplify
(
  • tolerance
)
gdal.Geometry

Reduces the geometry complexity.

Parameters:

  • tolerance Number

Returns:

simplifyAsync
(
  • tolerance
  • callback=undefined
)
Promise

Reduces the geometry complexity. Asynchronous version. If the last parameter is a callback, then this callback is called on completion and undefined is returned. All optional parameters before the callback can be omitted so the callback parameter can be at any position as long as it is the last parameter. Otherwise the function returns a Promise resolved with the result.

Parameters:

  • tolerance Number
  • [callback=undefined] callback optional

    standard Node.js (error, result) callback. It is always the last parameter and can be specified even if certain optional parameters are omitted. On error error is an Error object and result is undefined. On success error is null and result contains the result. The function returns a Promise when the callback is undefined. The return value is undefined when a callback is provided. Argument type errors are thrown synchronously even when a callback is provided. In Promise mode all errors result in a rejected Promise.

Returns:

Promise
simplifyPreserveTopology
(
  • tolerance
)
gdal.Geometry

Reduces the geometry complexity while preserving the topology.

Parameters:

  • tolerance Number

Returns:

simplifyPreserveTopologyAsync
(
  • tolerance
  • callback=undefined
)
Promise

Reduces the geometry complexity while preserving the topology. Asynchronous version. If the last parameter is a callback, then this callback is called on completion and undefined is returned. All optional parameters before the callback can be omitted so the callback parameter can be at any position as long as it is the last parameter. Otherwise the function returns a Promise resolved with the result.

Parameters:

  • tolerance Number
  • [callback=undefined] callback optional

    standard Node.js (error, result) callback. It is always the last parameter and can be specified even if certain optional parameters are omitted. On error error is an Error object and result is undefined. On success error is null and result contains the result. The function returns a Promise when the callback is undefined. The return value is undefined when a callback is provided. Argument type errors are thrown synchronously even when a callback is provided. In Promise mode all errors result in a rejected Promise.

Returns:

Promise
swapXY ()

Swaps x, y coordinates.

swapXYAsync
(
  • callback=undefined
)
Promise

Swaps x, y coordinates. Asynchronous version. If the last parameter is a callback, then this callback is called on completion and undefined is returned. All optional parameters before the callback can be omitted so the callback parameter can be at any position as long as it is the last parameter. Otherwise the function returns a Promise resolved with the result.

Parameters:

  • [callback=undefined] Callback optional

    standard Node.js (error, result) callback. It is always the last parameter and can be specified even if certain optional parameters are omitted. On error error is an Error object and result is undefined. On success error is null and result contains the result. The function returns a Promise when the callback is undefined. The return value is undefined when a callback is provided. Argument type errors are thrown synchronously even when a callback is provided. In Promise mode all errors result in a rejected Promise.

Returns:

Promise
symDifference
(
  • geometry
)
gdal.Geometry

Computes the symmetric difference of this geometry and the second geometry.

Parameters:

Returns:

symDifferenceAsync
(
  • geometry
  • callback=undefined
)
Promise

Computes the symmetric difference of this geometry and the second geometry. Asynchronous version. If the last parameter is a callback, then this callback is called on completion and undefined is returned. All optional parameters before the callback can be omitted so the callback parameter can be at any position as long as it is the last parameter. Otherwise the function returns a Promise resolved with the result.

Parameters:

  • geometry gdal.Geometry
  • [callback=undefined] callback optional

    standard Node.js (error, result) callback. It is always the last parameter and can be specified even if certain optional parameters are omitted. On error error is an Error object and result is undefined. On success error is null and result contains the result. The function returns a Promise when the callback is undefined. The return value is undefined when a callback is provided. Argument type errors are thrown synchronously even when a callback is provided. In Promise mode all errors result in a rejected Promise.

Returns:

Promise
toGML () String

Convert a geometry into GML format.

Returns:

String
toGMLAsync
(
  • callback=undefined
)
Promise

Convert a geometry into GML format. Asynchronous version. If the last parameter is a callback, then this callback is called on completion and undefined is returned. All optional parameters before the callback can be omitted so the callback parameter can be at any position as long as it is the last parameter. Otherwise the function returns a Promise resolved with the result.

Parameters:

  • [callback=undefined] Callback optional

    standard Node.js (error, result) callback. It is always the last parameter and can be specified even if certain optional parameters are omitted. On error error is an Error object and result is undefined. On success error is null and result contains the result. The function returns a Promise when the callback is undefined. The return value is undefined when a callback is provided. Argument type errors are thrown synchronously even when a callback is provided. In Promise mode all errors result in a rejected Promise.

Returns:

Promise
toJSON () String

Convert a geometry into JSON format.

Returns:

String
toJSONAsync
(
  • callback=undefined
)
Promise

Convert a geometry into JSON format. Asynchronous version. If the last parameter is a callback, then this callback is called on completion and undefined is returned. All optional parameters before the callback can be omitted so the callback parameter can be at any position as long as it is the last parameter. Otherwise the function returns a Promise resolved with the result.

Parameters:

  • [callback=undefined] Callback optional

    standard Node.js (error, result) callback. It is always the last parameter and can be specified even if certain optional parameters are omitted. On error error is an Error object and result is undefined. On success error is null and result contains the result. The function returns a Promise when the callback is undefined. The return value is undefined when a callback is provided. Argument type errors are thrown synchronously even when a callback is provided. In Promise mode all errors result in a rejected Promise.

Returns:

Promise
toKML () String

Convert a geometry into KML format.

Returns:

String
toKMLAsync
(
  • callback=undefined
)
Promise

Convert a geometry into KML format. Asynchronous version. If the last parameter is a callback, then this callback is called on completion and undefined is returned. All optional parameters before the callback can be omitted so the callback parameter can be at any position as long as it is the last parameter. Otherwise the function returns a Promise resolved with the result.

Parameters:

  • [callback=undefined] Callback optional

    standard Node.js (error, result) callback. It is always the last parameter and can be specified even if certain optional parameters are omitted. On error error is an Error object and result is undefined. On success error is null and result contains the result. The function returns a Promise when the callback is undefined. The return value is undefined when a callback is provided. Argument type errors are thrown synchronously even when a callback is provided. In Promise mode all errors result in a rejected Promise.

Returns:

Promise
toObject () Object

Converts the geometry to a GeoJSON object representation.

Returns:

Object:

GeoJSON

touches
(
  • geometry
)
Boolean

Determines if the two geometries touch.

Parameters:

Returns:

Boolean
touchesAsync
(
  • geometry
  • callback=undefined
)
Promise

Determines if the two geometries touch. Asynchronous version. If the last parameter is a callback, then this callback is called on completion and undefined is returned. All optional parameters before the callback can be omitted so the callback parameter can be at any position as long as it is the last parameter. Otherwise the function returns a Promise resolved with the result.

Parameters:

  • geometry gdal.Geometry
  • [callback=undefined] Callback optional

    standard Node.js (error, result) callback. It is always the last parameter and can be specified even if certain optional parameters are omitted. On error error is an Error object and result is undefined. On success error is null and result contains the result. The function returns a Promise when the callback is undefined. The return value is undefined when a callback is provided. Argument type errors are thrown synchronously even when a callback is provided. In Promise mode all errors result in a rejected Promise.

Returns:

Promise
toWKB
(
  • byte_order="MSB"
  • variant="OGC"
)
Buffer

Convert a geometry into well known binary format.

Parameters:

  • [byte_order="MSB"] String optional

    (Constants (wkbByteOrder))

  • [variant="OGC"] String optional

Returns:

Buffer
toWKBAsync
(
  • byte_order="MSB"
  • variant="OGC"
  • callback=undefined
)
Promise

Convert a geometry into well known binary format. Asynchronous version. If the last parameter is a callback, then this callback is called on completion and undefined is returned. All optional parameters before the callback can be omitted so the callback parameter can be at any position as long as it is the last parameter. Otherwise the function returns a Promise resolved with the result.

Parameters:

  • [byte_order="MSB"] String optional

    (Constants (wkbByteOrder))

  • [variant="OGC"] String optional
  • [callback=undefined] Callback optional

    standard Node.js (error, result) callback. It is always the last parameter and can be specified even if certain optional parameters are omitted. On error error is an Error object and result is undefined. On success error is null and result contains the result. The function returns a Promise when the callback is undefined. The return value is undefined when a callback is provided. Argument type errors are thrown synchronously even when a callback is provided. In Promise mode all errors result in a rejected Promise.

Returns:

Promise
toWKT () String

Convert a geometry into well known text format.

Returns:

String
toWKTAsync
(
  • callback=undefined
)
Promise

Convert a geometry into well known text format. Asynchronous version. If the last parameter is a callback, then this callback is called on completion and undefined is returned. All optional parameters before the callback can be omitted so the callback parameter can be at any position as long as it is the last parameter. Otherwise the function returns a Promise resolved with the result.

Parameters:

  • [callback=undefined] Callback optional

    standard Node.js (error, result) callback. It is always the last parameter and can be specified even if certain optional parameters are omitted. On error error is an Error object and result is undefined. On success error is null and result contains the result. The function returns a Promise when the callback is undefined. The return value is undefined when a callback is provided. Argument type errors are thrown synchronously even when a callback is provided. In Promise mode all errors result in a rejected Promise.

Returns:

Promise
transform
(
  • transformation
)

Apply arbitrary coordinate transformation to the geometry.

This method will transform the coordinates of a geometry from their current spatial reference system to a new target spatial reference system. Normally this means reprojecting the vectors, but it could include datum shifts, and changes of units.

Note that this method does not require that the geometry already have a spatial reference system. It will be assumed that they can be treated as having the source spatial reference system of the CoordinateTransformation object, and the actual SRS of the geometry will be ignored.

Parameters:

transformAsync
(
  • transformation
  • callback=undefined
)
Promise

Apply arbitrary coordinate transformation to the geometry. Asynchronous version. If the last parameter is a callback, then this callback is called on completion and undefined is returned. All optional parameters before the callback can be omitted so the callback parameter can be at any position as long as it is the last parameter. Otherwise the function returns a Promise resolved with the result.

Parameters:

  • transformation gdal.CoordinateTransformation
  • [callback=undefined] Callback optional

    standard Node.js (error, result) callback. It is always the last parameter and can be specified even if certain optional parameters are omitted. On error error is an Error object and result is undefined. On success error is null and result contains the result. The function returns a Promise when the callback is undefined. The return value is undefined when a callback is provided. Argument type errors are thrown synchronously even when a callback is provided. In Promise mode all errors result in a rejected Promise.

Returns:

Promise
transformTo
(
  • srs
)

Transforms the geometry to match the provided SpatialReference.

Parameters:

transformToAsync
(
  • srs
  • callback=undefined
)
Promise

Transforms the geometry to match the provided SpatialReference. Asynchronous version. If the last parameter is a callback, then this callback is called on completion and undefined is returned. All optional parameters before the callback can be omitted so the callback parameter can be at any position as long as it is the last parameter. Otherwise the function returns a Promise resolved with the result.

Parameters:

  • srs gdal.SpatialReference
  • [callback=undefined] Callback optional

    standard Node.js (error, result) callback. It is always the last parameter and can be specified even if certain optional parameters are omitted. On error error is an Error object and result is undefined. On success error is null and result contains the result. The function returns a Promise when the callback is undefined. The return value is undefined when a callback is provided. Argument type errors are thrown synchronously even when a callback is provided. In Promise mode all errors result in a rejected Promise.

Returns:

Promise
union
(
  • geometry
)
gdal.Geometry

Compute the union of this geometry with another.

Parameters:

Returns:

unionAsync
(
  • geometry
  • callback=undefined
)
Promise

Compute the union of this geometry with another. Asynchronous version. If the last parameter is a callback, then this callback is called on completion and undefined is returned. All optional parameters before the callback can be omitted so the callback parameter can be at any position as long as it is the last parameter. Otherwise the function returns a Promise resolved with the result.

Parameters:

  • geometry gdal.Geometry
  • [callback=undefined] callback optional

    standard Node.js (error, result) callback. It is always the last parameter and can be specified even if certain optional parameters are omitted. On error error is an Error object and result is undefined. On success error is null and result contains the result. The function returns a Promise when the callback is undefined. The return value is undefined when a callback is provided. Argument type errors are thrown synchronously even when a callback is provided. In Promise mode all errors result in a rejected Promise.

Returns:

Promise
within
(
  • geometry
)
Boolean

Determines if the current geometry is within the provided geometry.

Parameters:

Returns:

Boolean
withinAsync
(
  • geometry
  • callback=undefined
)
Promise

Determines if the current geometry is within the provided geometry. Asynchronous version. If the last parameter is a callback, then this callback is called on completion and undefined is returned. All optional parameters before the callback can be omitted so the callback parameter can be at any position as long as it is the last parameter. Otherwise the function returns a Promise resolved with the result.

Parameters:

  • geometry gdal.Geometry
  • [callback=undefined] Callback optional

    standard Node.js (error, result) callback. It is always the last parameter and can be specified even if certain optional parameters are omitted. On error error is an Error object and result is undefined. On success error is null and result contains the result. The function returns a Promise when the callback is undefined. The return value is undefined when a callback is provided. Argument type errors are thrown synchronously even when a callback is provided. In Promise mode all errors result in a rejected Promise.

Returns:

Promise

Attributes

children

gdal.GeometryCollectionChildren

All geometries represented by this collection.

coordinateDimension

Number

dimension

Number readonly

name

String readonly

wkbSize

Number readonly

wkbType

Number readonly

See Constants (wkbGeometryType).