![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
@id-sdk/geo
Advanced tools
🌐 Geographic (spherical) math functions
npm install @id-sdk/geo
This library is distributed in ESM format only. It cannot be require()
'd from CommonJS.
For more, please read Sindre Sorhus’s FAQ.
import * as geo from '@id-sdk/geo';
import { geoLatToMeters } from '@id-sdk/geo';
This project is just getting started! 🌱
We're not able to support external contributors at this time, but check back in a bit when things have matured.
# geoLatToMeters(dLat: number): number <>
Convert degrees latitude to meters.
geoLatToMeters(1); // returns ≈111319
# geoLonToMeters(dLon: number, atLat: number): number <>
Convert degrees longitude to meters at a given latitude.
geoLonToMeters(1, 0); // returns ≈110946 at equator
# geoMetersToLat(m: number): number <>
Convert meters to degrees latitude.
geoMetersToLat(111319); // returns ≈1°
# geoMetersToLon(m: number, atLat: number): number <>
Convert meters to degrees longitude at a given latitude.
geoMetersToLon(110946, 0); // returns ≈1° at equator
# geoMetersToOffset(m: Vec2, tileSize?: number): Vec2 <>
Convert offset in meters (for example, imagery offset) to offset in tile pixels. tileSize
defaults to 256px.
geoMetersToOffset([100, 100]); // returns ≈[0.00064, -0.00064] pixels
# geoOffsetToMeters(offset: Vec2, tileSize?: number): Vec2 <>
Convert imagery offset in tile pixels to offset in meters. tileSize
defaults to 256px.
geoOffsetToMeters([0.00064, -0.00064]); // returns ≈[100, 100] meters
# geoSphericalDistance(a: Vec2, b: Vec2): number <>
Equirectangular approximation of spherical distances on Earth.
geoSphericalDistance([0, 0], [1, 0]); // returns ≈110946 meters
# geoScaleToZoom(k: number, tileSize?: number): number <>
Projection scale factor to tile zoom level. tileSize
defaults to 256px.
geoScaleToZoom(5340353.7154); // returns ≈17
# geoZoomToScale(z: number, tileSize?: number): number <>
Tile zoom to projection scale factor. tileSize
defaults to 256px.
geoZoomToScale(17); // returns ≈5340353.7154
# geoSphericalClosestPoint(points: Vec2[], a: Vec2): Closest | null <>
Returns info about the point from points
closest to the given test point a
.
# Vec2
An array of two numbers.
[number, number]
# Closest
An Object containing index
, distance
, and point
properties. Used as the return value for geoSphericalClosestPoint().
{ index: number, distance: number, point: Vec2 }
FAQs
Geographic (spherical) math functions
The npm package @id-sdk/geo receives a total of 0 weekly downloads. As such, @id-sdk/geo popularity was classified as not popular.
We found that @id-sdk/geo demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.