Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
@math.gl/geospatial
Advanced tools
@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.
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);
Turf is a JavaScript library for advanced geospatial analysis. It provides a wide range of spatial operations, including transformations, measurements, and data manipulation. Compared to @math.gl/geospatial, Turf offers a more extensive set of geospatial functions but may be more complex to use for simple tasks.
Proj4 is a library for performing coordinate transformations. It supports a wide range of coordinate reference systems and is widely used in the geospatial community. While @math.gl/geospatial also supports coordinate transformations, Proj4 is more specialized and offers more comprehensive support for different coordinate systems.
Geolib is a library for geospatial calculations, including distance, area, and bounding box calculations. It is simpler and more lightweight compared to @math.gl/geospatial, making it suitable for basic geospatial tasks.
math.gl is a suite of math modules for 3D and geospatial applications.
This module contains geospatial math, primarly ellipsoid math for dealing with the WGS84 (World Geodetic System) coordinate system.
For documentation please visit the website.
4.0.0-alpha.2
FAQs
Geospatial classes
The npm package @math.gl/geospatial receives a total of 52,371 weekly downloads. As such, @math.gl/geospatial popularity was classified as popular.
We found that @math.gl/geospatial demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.