Skip to main content

A Python implementation of ESRI's ArcGIS Compressed Geometry Format.

Project description

arcgis-compressed-geometry

License: MIT PyPI version Tests codecov

A Python library for encoding and decoding ArcGIS Compressed Geometry Format.

Introduction

This library provides encoding and decoding functionality for ArcGIS Compressed Geometry Format. It supports the following coordinate formats:

  • xy (2D coordinates)
  • xyz (3D coordinates with elevation)
  • xym (coordinates with measure values)
  • xyzm (coordinates with elevation and measure values)

Installation

You can install the package using pip:

pip install arcgis-compressed-geometry==0.0.1

How to use

Encode

from arcgis_compressed_geometry import encode

coordinates = [
        [-122.40645857695421, 37.78272915354862],
        [-122.40609876765315, 37.78299901052442],
        [-122.40597283439777, 37.78305298191958],
        [-122.40417378789242, 37.7844382477287],
    ]
    geometry = encode(coordinates, "xy", 55585)
    assert geometry == "+0+1+0+1m91-6fkfr+202tp+k+f+7+3+34+2d"

Decode

from arcgis_compressed_geometry import decode

points = decode(
        "+0+1+2+1m91-6733n+1pjfe+g-e+1b-r+9-9+c-h+2-j-3-v-7-j-b-m-5-7-e-f-1a-u-6-7-4-9-3-a-1-n+1-4j|+5rg+81s+7n+i0+4f+7r+7g+ce+7n+9j+3h+7n+ib+3a+3q+45+97+1qs"
    )

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

arcgis_compressed_geometry-0.0.2.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

arcgis_compressed_geometry-0.0.2-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file arcgis_compressed_geometry-0.0.2.tar.gz.

File metadata

File hashes

Hashes for arcgis_compressed_geometry-0.0.2.tar.gz
Algorithm Hash digest
SHA256 03a24a87016fe40abd6b76eb793474c4793546c74f0cce6bf3d70904e679f40e
MD5 118b31609c108f5a53a466efe6772da2
BLAKE2b-256 fd9e2843b513787ed11a9e72c35990c77288540355ef4284257f0410dec09a73

See more details on using hashes here.

File details

Details for the file arcgis_compressed_geometry-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for arcgis_compressed_geometry-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 379c69a533a5601a2ff52ece741296f3a148c0c8e13d5a3a3952d840af83d932
MD5 d51b0a90bce026bdb26667f4b5ebc373
BLAKE2b-256 0d5d7b6732db50e304d87f65e52a3e3f5da4ca2375800d0c60a0689f6449ffd9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page