Socket
Socket
Sign inDemoInstall

@math.gl/geospatial

Package Overview
Dependencies
Maintainers
4
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@math.gl/geospatial

Geospatial classes


Version published
Weekly downloads
118K
decreased by-19.65%
Maintainers
4
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

FAQs

Package last updated on 07 Jan 2021

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc