You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@math.gl/geospatial

Package Overview
Dependencies
Maintainers
2
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@math.gl/geospatial

Geospatial classes

4.1.0
latest
Source
npmnpm
Version published
Weekly downloads
181K
9.11%
Maintainers
2
Weekly downloads
 
Created

What is @math.gl/geospatial?

@math.gl/geospatial is a library that provides geospatial math utilities for handling and manipulating geographic data. It includes functions for coordinate transformations, geodesic calculations, and other spatial operations.

What are @math.gl/geospatial's main functionalities?

Coordinate Transformations

This feature allows you to transform coordinates from one system to another. In this example, we convert geographic coordinates (longitude, latitude, altitude) to Cartesian coordinates.

const { Ellipsoid } = require('@math.gl/geospatial');
const wgs84 = Ellipsoid.WGS84;
const cartesian = wgs84.cartographicToCartesian([0.1, 0.1, 0]);
console.log(cartesian);

Geodesic Calculations

This feature allows you to perform geodesic calculations, such as finding the distance between two points on the surface of an ellipsoid. In this example, we calculate the surface distance between two geographic points.

const { Ellipsoid, EllipsoidGeodesic } = require('@math.gl/geospatial');
const wgs84 = Ellipsoid.WGS84;
const geodesic = new EllipsoidGeodesic([0.1, 0.1], [0.2, 0.2], wgs84);
console.log(geodesic.surfaceDistance);

Bounding Volumes

This feature allows you to compute bounding volumes for a set of points. In this example, we create a bounding sphere that encompasses a set of 3D points.

const { BoundingSphere } = require('@math.gl/geospatial');
const points = [[0, 0, 0], [1, 1, 1], [2, 2, 2]];
const boundingSphere = BoundingSphere.fromPoints(points);
console.log(boundingSphere);

Other packages similar to @math.gl/geospatial

Keywords

webgl

FAQs

Package last updated on 08 Sep 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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.