# geospatialdraw

> Geospatial Map Drawing Library

Latest version **0.4.17** (published 2025-01-02) · LGPL-3.0 license · 0 weekly downloads

## Install

```sh
npm install geospatialdraw
pnpm add geospatialdraw
yarn add geospatialdraw
bun add geospatialdraw
```

## Health

**Score 35/100 (D)** — status: maintenance-mode.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.4.17 |
| Published | 2025-01-02 |
| First published | 2019-09-26 |
| Weekly downloads | 0 |
| License | LGPL-3.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=0.10.5 |
| Dependencies | 13 |
| Unpacked size | 537.4 KB |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Connexta LLC |
| Maintainers | andrewkfiedler, maiiiiiiii, willwill96, gvgame, jwilk, jrnorth, alexabird, sgalla |
| Keywords | catography, coordinate, coordinates, drawing, geospatial, gps, lat/long, latitude, longitude, map, mapping, mgrs, primative, usng, utm |

## Links

- npm: https://www.npmjs.com/package/geospatialdraw
- Repository: https://github.com/connexta/geospatialdraw
- npm.io page: https://npm.io/package/geospatialdraw

## Dependencies (13)

- [ol](https://npm.io/package/ol.md) 10.2.1
- [react](https://npm.io/package/react.md) 18.3.1
- [lodash](https://npm.io/package/lodash.md) 4.17.21
- [usng.js](https://npm.io/package/usng.js.md) 0.4.2
- [polished](https://npm.io/package/polished.md) 4.3.1
- [react-dom](https://npm.io/package/react-dom.md) 18.3.1
- [@turf/turf](https://npm.io/package/@turf/turf.md) 7.1.0
- [@turf/buffer](https://npm.io/package/@turf/buffer.md) 7.1.0
- [@turf/nearest-point-to-line](https://npm.io/package/@turf/nearest-point-to-line.md) 7.1.0
- [@turf/point-to-line-distance](https://npm.io/package/@turf/point-to-line-distance.md) 7.1.0
- [@fortawesome/react-fontawesome](https://npm.io/package/@fortawesome/react-fontawesome.md) 0.2.2
- [@fortawesome/fontawesome-svg-core](https://npm.io/package/@fortawesome/fontawesome-svg-core.md) 6.6.0
- [@fortawesome/free-solid-svg-icons](https://npm.io/package/@fortawesome/free-solid-svg-icons.md) 6.6.0

## Alternatives

- [d3-force-3d](https://npm.io/package/d3-force-3d.md) — 1.0M weekly downloads
- [ng2-charts](https://npm.io/package/ng2-charts.md) — 486.8K weekly downloads
- [@arcgis/core](https://npm.io/package/@arcgis/core.md) — 257.8K weekly downloads
- [react-sparklines](https://npm.io/package/react-sparklines.md) — 249.3K weekly downloads
- [react-native-gifted-charts](https://npm.io/package/react-native-gifted-charts.md) — 182.3K weekly downloads

## Recent versions

- 0.4.17 (latest) — 2025-01-02
- 0.4.15 — 2024-11-11
- 0.4.14 — 2024-11-11
- 0.4.13 — 2024-11-07
- 0.4.12 — 2024-11-07
- 0.4.11 — 2024-11-05
- 0.4.10 — 2024-11-05
- 0.4.9 — 2024-11-05
- 0.4.8 — 2024-08-13
- 0.4.7 — 2024-06-18
- 0.4.6 — 2024-06-18
- 0.4.5 — 2023-07-11
- 0.4.4 — 2023-05-18
- 0.4.3 — 2023-05-09
- 0.4.2 — 2023-04-18
- … 28 more at https://npm.io/package/geospatialdraw/versions

## README

# GeospatialDraw
## Geospatial map drawing library

Library of tools to draw and edit geometric shapes on a map.

**Note** To enable links run `yarn docs`

## Packages

**geometry**
:  GeospatialDraw extends GeoJSON to communicate geometric shapes by adding properties to `Feature` JSON objects. That format is defined in the geometry package.

 * Geometry
   * [GeometryJSON](https://unpkg.com/geospatialdraw@0.4.2/target/storybook/docs/modules/_geometry_geometry_.html#geometryjson)
   * [GeometryJSONProperties](https://unpkg.com/geospatialdraw@0.4.2/target/storybook/docs/modules/_geometry_geometry_.html#geometryjsonproperties)
   * [Geometry](https://unpkg.com/geospatialdraw@0.4.2/target/storybook/docs/modules/_geometry_geometry_.html#geometry)
   * [BufferShape](https://unpkg.com/geospatialdraw@0.4.2/target/storybook/docs/modules/_geometry_geometry_.html#buffershape)
   * [Extent](https://unpkg.com/geospatialdraw@0.4.2/target/storybook/docs/modules/_geometry_geometry_.html#extent)
   * [BUFFER_SHAPE_PROPERTY](https://unpkg.com/geospatialdraw@0.4.2/target/storybook/docs/modules/_geometry_geometry_.html#buffer_shape_property)
   * [CIRCLE_BUFFER_PROPERTY_VALUE](https://unpkg.com/geospatialdraw@0.4.2/target/storybook/docs/modules/_geometry_geometry_.html#circle_buffer_property_value)
   * [POLYGON_LINE_BUFFER_PROPERTY_VALUE](https://unpkg.com/geospatialdraw@0.4.2/target/storybook/docs/modules/_geometry_geometry_.html#polygon_line_buffer_property_value)
 * Utilities
   * [bboxToExtent](https://unpkg.com/geospatialdraw@0.4.2/target/storybook/docs/modules/_geometry_utilities_.html#bboxtoextent)
   * [geoToExtent](https://unpkg.com/geospatialdraw@0.4.2/target/storybook/docs/modules/_geometry_utilities_.html#geotoextent)
   * [makeGeometry](https://unpkg.com/geospatialdraw@0.4.2/target/storybook/docs/modules/_geometry_utilities_.html#makegeometry)
   * [makeBufferedGeo](https://unpkg.com/geospatialdraw@0.4.2/target/storybook/docs/modules/_geometry_utilities_.html#makebufferedgeo)
   * [makeEmptyGeometry](https://unpkg.com/geospatialdraw@0.4.2/target/storybook/docs/modules/_geometry_utilities_.html#makeemptygeometry)
 * Units
   * [LengthUnit](https://unpkg.com/geospatialdraw@0.4.2/target/storybook/docs/modules/_geometry_units_.html#lengthunit)
   * [FEET](https://unpkg.com/geospatialdraw@0.4.2/target/storybook/docs/modules/_geometry_units_.html#feet)
   * [KILOMETERS](https://unpkg.com/geospatialdraw@0.4.2/target/storybook/docs/modules/_geometry_units_.html#kilometers)
   * [METERS](https://unpkg.com/geospatialdraw@0.4.2/target/storybook/docs/modules/_geometry_units_.html#meters)
   * [MILES](https://unpkg.com/geospatialdraw@0.4.2/target/storybook/docs/modules/_geometry_units_.html#miles)
   * [NAUTICAL_MILES](https://unpkg.com/geospatialdraw@0.4.2/target/storybook/docs/modules/_geometry_units_.html#nautical_miles)
   * [YARDS](https://unpkg.com/geospatialdraw@0.4.2/target/storybook/docs/modules/_geometry_units_.html#yards)
 * Shape Factory
   * [makeBBoxGeo](https://unpkg.com/geospatialdraw@0.4.2/target/storybook/docs/modules/_geometry_shape_factory_.html#makebboxgeo)
   * [makeLineGeo](https://unpkg.com/geospatialdraw@0.4.2/target/storybook/docs/modules/_geometry_shape_factory_.html#makelinegeo)
   * [makePointGeo](https://unpkg.com/geospatialdraw@0.4.2/target/storybook/docs/modules/_geometry_shape_factory_.html#makepointgeo)
   * [makePointRadiusGeo](https://unpkg.com/geospatialdraw@0.4.2/target/storybook/docs/modules/_geometry_shape_factory_.html#makepointradiusgeo)
   * [makePolygonGeo](https://unpkg.com/geospatialdraw@0.4.2/target/storybook/docs/modules/_geometry_shape_factory_.html#makepolygongeo)

**shapes**
: The GeospatialDraw GeoJSON format only supports a limited set of geometric shapes. To aid in identifying the correct geometric shape a shape detector is provided in the shapes package.

 * [Shape](https://unpkg.com/geospatialdraw@0.4.2/target/storybook/docs/modules/_shape_utils_shape_.html#shape)
 * [ShapeDetector](https://unpkg.com/geospatialdraw@0.4.2/target/storybook/docs/classes/_shape_utils_shape_detector_.shapedetector.html)

**coordinates**
: In addition to drawing geometries on the map GeospatialDraw also has a library of components for editing the coordinates of these geometries directly. These components are in the coordinates package.

*For docs see: [Components Library](#components-library)*

**drawing**
: Drawing shapes on the map is supported with drawing tools in the drawing package.

 * [UpdatedGeoReceiver](https://unpkg.com/geospatialdraw@0.4.2/target/storybook/docs/modules/_drawing_controls_geo_receiver_.html#updatedgeoreceiver)
 * [DrawingContext](https://unpkg.com/geospatialdraw@0.4.2/target/storybook/docs/classes/_drawing_controls_drawing_context_.drawingcontext.html)
 * [DrawingControl](https://unpkg.com/geospatialdraw@0.4.2/target/storybook/docs/interfaces/_drawing_controls_drawing_control_.drawingcontrol.html)
 * [BoundingBoxDrawingControl](https://unpkg.com/geospatialdraw@0.4.2/target/storybook/docs/classes/_drawing_controls_bounding_box_drawing_control_.boundingboxdrawingcontrol.html)
 * [LineDrawingControl](https://unpkg.com/geospatialdraw@0.4.2/target/storybook/docs/classes/_drawing_controls_line_drawing_control_.linedrawingcontrol.html)
 * [PointDrawingControl](https://unpkg.com/geospatialdraw@0.4.2/target/storybook/docs/classes/_drawing_controls_point_drawing_control_.pointdrawingcontrol.html)
 * [PointRadiusDrawingControl](https://unpkg.com/geospatialdraw@0.4.2/target/storybook/docs/classes/_drawing_controls_point_radius_drawing_control_.pointradiusdrawingcontrol.html)
 * [PolygonDrawingControl](https://unpkg.com/geospatialdraw@0.4.2/target/storybook/docs/classes/_drawing_controls_polygon_drawing_control_.polygondrawingcontrol.html)

**menu**
: To facilitate a smooth UX with map drawing a map drawing menu is provided in the menu package.

*For docs see: [Components Library](#components-library)*

**renderer**
: A renderer is provided in the renderer package that can take an array of GeospatialDraw GeoJSON objects and render them on a map.

 * [Renderer](https://unpkg.com/geospatialdraw@0.4.2/target/storybook/docs/classes/_renderer_renderer_.renderer.html)

## Components Library

Browse components in [Storybook](https://unpkg.com/geospatialdraw@0.4.2/target/storybook/index.html)

---
_Source: https://npm.io/package/geospatialdraw · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
