Socket
Book a DemoInstallSign in
Socket

@turf/boolean-equal

Package Overview
Dependencies
Maintainers
9
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@turf/boolean-equal

turf boolean-equal module

latest
Source
npmnpm
Version
7.2.0
Version published
Weekly downloads
801K
-6.57%
Maintainers
9
Weekly downloads
 
Created
Source

@turf/boolean-equal

booleanEqual

Determine whether two geometries of the same type have identical X,Y coordinate values. See http://edndoc.esri.com/arcsde/9.0/general_topics/understand_spatial_relations.htm

Parameters

  • feature1 (Geometry | Feature) GeoJSON input

  • feature2 (Geometry | Feature) GeoJSON input

  • options Object Optional parameters (optional, default {})

    • options.precision number decimal precision to use when comparing coordinates (optional, default 6)

Examples

var pt1 = turf.point([0, 0]);
var pt2 = turf.point([0, 0]);
var pt3 = turf.point([1, 1]);

turf.booleanEqual(pt1, pt2);
//= true
turf.booleanEqual(pt2, pt3);
//= false

Returns boolean true if the objects are equal, false otherwise

This module is part of the Turfjs project, an open source module collection dedicated to geographic algorithms. It is maintained in the Turfjs/turf repository, where you can create PRs and issues.

Installation

Install this single module individually:

$ npm install @turf/boolean-equal

Or install the all-encompassing @turf/turf module that includes all modules as functions:

$ npm install @turf/turf

Diagrams

esri-equals

Keywords

turf

FAQs

Package last updated on 29 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts