Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@comapeo/geometry

Package Overview
Dependencies
Maintainers
0
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@comapeo/geometry

GeoJSON Geometry encoding and decoding to protobuf

  • 1.1.1
  • latest
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

CoMapeo Geometry Encoding

GeoJSON geometry encoding and decoding to/from protobufs for CoMapeo.

This repo contains a protobuf definition and encoding/decoding functions for a subset GeoJSON geometry objects. It is used by the CoMapeo project to encode and decode geometries.

  • Encoding Format

Encoding Format

The encoding format is inspired by Geobuf, with some changes which prioritize simplicity over optimization and compactness:

  • Coordinates are encoding as double in original precision instead of Geobuf's sint64 and rounded to 6 decimal places.
  • For polygons and multipolygons, the last position is repeated in the encoded protobuf. Geobuf optimizes storage by skipping the repeated last position.
  • Only supports Geometry objects, not Feature objects.

The subset of GeoJSON geometries supported are:

  • Only Point, LineString, MultiLineString, Polygon, MultiPoint and MultiPolygon are supported.
  • Only 2D positions (coordinates) are supported.
  • No support for bbox.

Future versions may support more geometry types and 3D positions.

FAQs

Package last updated on 18 Dec 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

  • 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