Skip to main content

A tidy Python package for geospatial computation

Project description

Karta is a Leatherman for geographic analyses. Karta provides a lightweight interface for solving problems in Python/Python3. It presents a simple and clean vector and raster data types, a small selection of geographical analysis functions, and the ability to read and write several useful formats.

Goals of Karta include exposing a simple and fast framework for spatial analysis. Karta is under development and suggestions and pull requests are welcome, particularly to improve format support and test coverage.

DOCUMENTATION

API documentation can be built by running make from the doc/ directory. The beginnings of a tutorial to introduce Karta are in the Wiki.

CONTENTS AT A GLANCE

  • vector
    • guppy: Vector geometry classes (e.g. Point, Multipoint, Line, Polygon)
    • gpx: GPX class for parsing and constructing GPX eXchange files
    • geojson: Classes and functions for reading and writing GeoJSON
    • vtk: XML-based VTK interface
    • shp_funcs: Shapefile-to-guppy conversions through pyshp interface
    • stats: Basic geostatistical functions
    • xyfile: ASCII table functions
    • quadtree: Simple QuadTree implementation
  • raster
    • grid: Basic Grid types, including StructuredGrid and RegularGrid
    • raster: General purpose raster functions
    • aaigrid: Grid subclass specifically for reading and writing ESRI ASCII grids
    • flow: Stream flow functions
    • streamline: Streamline calculation
  • tests : unit tests

FORMATS

Karta provides a basic working interface to several of common file formats. Currently partially-supported are:

  • vector
    • GeoJSON (r,w)
    • ESRI Shapefiles via pyshp (r,w)
    • GPS eXchange (GPX) (r,w)
    • ASCII tables (XYZ) (r,w)
    • VTK (w)
  • raster
    • ESRI ASCII Grid (r,w)
    • GeoTiff through GDAL (r)
    • USGS DEM (WIP)

INSTALLATION

The easiest way to install is to use pip.

To install the latest release from PyPI, run

pip install karta

To build from source,

git clone https://github.com/njwilson23/karta.git
pip install -r karta/requirements.txt
pip install karta/

DEPENDENCIES

Required

  • Python 2.7+ or Python 3.2+
  • numpy
  • pyshp
  • pyproj (required for geodetic calculations)

Optional

  • scipy
  • gdal
  • cython

Cython is an optional dependency used to speed up select functions. In general, enhanced-performance functions will then be called automatically when available, otherwise Karta will fall back to numpy and pure-Python versions.

When installing from PyPI, C source code is provided and will be automatically compiled if a suitable compiler is available.

TESTING

To run all unit tests, execute

python tests/runtests.py

LICENSE

This software is provided under the MIT license.

MIT License:

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Project details


Release history Release notifications

History Node

0.9.0

History Node

0.8.3

History Node

0.8.2

History Node

0.8.1

History Node

0.8.0

History Node

0.8b1

History Node

0.7.4

History Node

0.7.3

History Node

0.7.2

History Node

0.7.1

History Node

0.7

History Node

0.7b1

History Node

0.6.1

History Node

0.6

History Node

0.5.4

History Node

0.5.3

History Node

0.5.2

History Node

0.5.1

History Node

0.5.1.dev0

History Node

0.5.0

History Node

0.5.0b1

History Node

0.5.0a0

History Node

0.4.6

History Node

0.4.5

History Node

0.4.4

History Node

0.4.3

History Node

0.4.2.4

History Node

0.4.2.3

History Node

0.4.2.2

History Node

0.4.2.1

History Node

0.4.2

History Node

0.4.1

History Node

0.4.0.2

History Node

0.4.0.1

History Node

0.4.0

History Node

0.4.0b5

History Node

0.4.0b4

History Node

0.4.0b3

History Node

0.4.0b2

History Node

0.4.0b

History Node

0.3.0

This version
History Node

0.2.4

History Node

0.2.3

History Node

0.2.2

History Node

0.2.1

History Node

0.2.0

History Node

0.1.0.2

History Node

0.1.0.1

History Node

0.1

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
karta-0.2.4.tar.gz (259.5 kB) Copy SHA256 hash SHA256 Source None May 31, 2014

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page