Skip to main content

Fast KML processing in python

Project description

Introduction

KML is an XML geospatial data format and an OGC standard that deserves a canonical python implementation.

Fastkml is a library to read, write and manipulate KML files. It aims to keep it simple and fast (using lxml if available). Fast refers to the time you spend to write and read KML files as well as the time you spend to get acquainted to the library or to create KML objects. It aims to provide all of the functionality that KML clients such as OpenLayers, Google Maps, and Google Earth provides.

Geometries are handled as pygeoif objects.

Fastkml is continually tested

Test codecov.io Black

Is Maintained and documented:

Latest PyPI version Development Status Documentation Statistics from OpenHub Supported Python versions Supported Python implementations

Documentation

You can find all of the documentation for FastKML at fastkml.readthedocs.org. If you find something that is missing, please submit a pull request on GitHub with the improvement.

Have a look at Aryan Guptas The Definite Guide to FastKML.

Alternatives

Keytree provides a less comprehensive, but more flexible approach.

Install

You can install the package with pip install fastkml which will pull in all requirements.

Requirements

Optional

You can install all of the requirements for working with FastKML by using pip:

pip install -r requirements.txt

Limitations

Tesselate, Extrude and Altitude Mode are assigned to a Geometry or Geometry collection (MultiGeometry). You cannot assign different values of Tesselate, Extrude or Altitude Mode on parts of a MultiGeometry.

Currently, the only major feature missing for the full Google Earth experience is the gx extension. Please submit a PR with the features you’d like to see implemented.

Changelog

1.0 (unreleased)

  • Drop Python 2 support

  • Use pygeoif >=1.0

  • Drop shapely native support

  • Add type annotations

  • refactor

0.12 (2020/09/23)

  • add track and multi track [dericke]

  • remove travis, add github actions

  • raise error and debug log for no geometries found case [hyperknot]

  • protect AttributeError from data element without value [fpassaniti]

  • examples and fixes [heltonbiker]

  • improve documentation [whatnick]

0.11.1 (2015/07/13)

  • add travis deploy to travis.yml

0.11 (2015/07/10)

  • handle coordinates tuples which contain spaces

0.10 (2015/06/09)

  • Fix bug when the fill or outline attributes of a PolyStyle are float strings

0.9 (2014/10/17)

0.8 (2014/09/18)

  • Add support for address and phoneNumber [Ian Lee]

  • Add support for Ground Overlay kml [Ian Lee]

0.7 (2014/08/01)

  • Handle case where Document booleans (visibility,isopen) are ‘true’ or ‘false’ [jwhelland]

  • test case additions and lxml warning [Ian Lee]

  • pep8-ify source code (except test_main.py) [Ian Lee]

  • pyflakes-ify source code (except __init__.py) [Ian Lee]

0.6 (2014/05/29)

  • add Schema

  • add SchemaData

  • make use of lxmls default namespace

0.5 (2013/10/23)

  • handle big files with huge_tree for lxml [Egil Moeller]

  • bugfixes

0.4 (2013/09/05)

  • adds the ability to add untyped extended data / named value pairs [Denis Krienbuehl]

0.3 (2012/11/15)

  • specify minor python versions tested with Travis CI

  • add support for tesselation, altitudeMode and extrude to Geometries

  • move implementation of geometry from kml.Placemark to geometry.Geometry

  • add support for heterogenous GeometryCollection

  • python 3 compatible

  • fix test for python 3

  • change license to LGPL

  • register namespaces for a more pleasant, human readable xml output

0.2 (2012/07/27)

  • remove dependency on shapely

  • add more functionality

0.1.1 (2012/06/29)

  • add MANIFEST.in

0.1 (2012/06/27)

  • initial release

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

fastkml-1.0a6.tar.gz (83.9 kB view details)

Uploaded Source

Built Distribution

fastkml-1.0a6-py3-none-any.whl (61.5 kB view details)

Uploaded Python 3

File details

Details for the file fastkml-1.0a6.tar.gz.

File metadata

  • Download URL: fastkml-1.0a6.tar.gz
  • Upload date:
  • Size: 83.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for fastkml-1.0a6.tar.gz
Algorithm Hash digest
SHA256 656da21773b3c3cba4eb7fa8576e1a6a91bce38c3eecfa5d006a03585380d40c
MD5 05e4a72a525d050d556e8169bc223f01
BLAKE2b-256 de05a6bac607e81fb2567b5520960d5c230f0faa7b5040eb2afdc3cf063464d1

See more details on using hashes here.

Provenance

File details

Details for the file fastkml-1.0a6-py3-none-any.whl.

File metadata

  • Download URL: fastkml-1.0a6-py3-none-any.whl
  • Upload date:
  • Size: 61.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for fastkml-1.0a6-py3-none-any.whl
Algorithm Hash digest
SHA256 7eb7969fb524c98fcbe7ee0b7fd3c441f937c572977e44aca1328e8a5789c6b7
MD5 685cfe136817be372af72e1c61cca92f
BLAKE2b-256 bcf99a5086942942360d26729ba5fd13f78d0527607eb32c0914a0ddc6e420ae

See more details on using hashes here.

Provenance

Supported by

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