All Projects → fortyninemaps → karta

fortyninemaps / karta

Licence: MIT License
A tidy Python package for geospatial computation

Programming Languages

python
139335 projects - #7 most used programming language
c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to karta

ArcRasterRescue
Extract raster data from ArcGIS/ESRI formats
Stars: ✭ 56 (-42.86%)
Mutual labels:  geospatial, raster-data
tile38
Real-time Geospatial and Geofencing
Stars: ✭ 8,117 (+8182.65%)
Mutual labels:  geospatial
opentopodata
Open alternative to the Google Elevation API!
Stars: ✭ 163 (+66.33%)
Mutual labels:  geospatial
geohash
Geohash for Rust
Stars: ✭ 64 (-34.69%)
Mutual labels:  geospatial
mapmint
Fast and easy webmapping.
Stars: ✭ 51 (-47.96%)
Mutual labels:  geospatial
earthengine-py-examples
A collection of 300+ examples for using Earth Engine and the geemap Python package
Stars: ✭ 76 (-22.45%)
Mutual labels:  geospatial
go-kml
Package kml provides convenience methods for creating and writing KML documents.
Stars: ✭ 67 (-31.63%)
Mutual labels:  geospatial
rusty buntdb
A Rust port of BuntDB
Stars: ✭ 12 (-87.76%)
Mutual labels:  geospatial
pygeoif
Basic implementation of the __geo_interface__
Stars: ✭ 44 (-55.1%)
Mutual labels:  geospatial
GeoTriples
Publishing Big Geospatial data as Linked Open Geospatial Data
Stars: ✭ 32 (-67.35%)
Mutual labels:  geospatial
geojson
GeoJSON classes for R
Stars: ✭ 32 (-67.35%)
Mutual labels:  geospatial
ows4R
R Interface for OGC Web-Services (OWS)
Stars: ✭ 29 (-70.41%)
Mutual labels:  geospatial
xyz-spaces-python
Manage your XYZ Hub or HERE Data Hub spaces from Python.
Stars: ✭ 29 (-70.41%)
Mutual labels:  geospatial
placekey-js
placekey.io
Stars: ✭ 19 (-80.61%)
Mutual labels:  geospatial
Geospatial Python CourseV1
This is an collection of blog posts turned into a course format
Stars: ✭ 53 (-45.92%)
Mutual labels:  geospatial
glaes
Geospatial Land Availability for Energy Systems
Stars: ✭ 27 (-72.45%)
Mutual labels:  geospatial
Julia Geospatial
Examples for a blog series on Geospatial Julia using ArchGDAL
Stars: ✭ 58 (-40.82%)
Mutual labels:  geospatial
pylandtemp
Algorithms for computing global land surface temperature and emissivity from NASA's Landsat satellite images with Python.
Stars: ✭ 110 (+12.24%)
Mutual labels:  geospatial
dea-coastlines
Extracting tidally-constrained annual shorelines and robust rates of coastal change from freely available Earth observation data at continental scale
Stars: ✭ 24 (-75.51%)
Mutual labels:  geospatial
rafagas
Daily geospatial links curated by Raf Roset
Stars: ✭ 17 (-82.65%)
Mutual labels:  geospatial

Build Status Build status Coverage Status

Karta

Karta is a package for spatial analysis in Python. It simplifies geospatial data processing by providing efficient generic classes for vector and raster data sources, as well as a selection of analysis functions.

Vector data types

Data are represented as Point, Line, Polygon, Multipoint, Multiline, and Multipolygon instances.

All data contain a .crs member encoding coordinate reference information. All vector geometries possess a .properties dict containing free-form metadata. Multipart geometries additionally possess a .data member which is a simple typed table-like data structure.

Geometries implement methods for computing distances, directions, and spatial characteristics. Multipart geometries support fast spatial indexing and queries.

GeoJSON and ESRI shapefile formats are supported for reading and writing. Experimental support for GPX XML files is in the karta.vector.gpx submodule.

Vector geometries implement the Python __geo_interface__ attribute for vector geometries. This permits data to be exchanged between Karta and external modules that also implement __geo_interface__ (e.g. shapely, fastkml).

Raster data types

The primary raster data type is the RegularGrid, which represents one or more 2-d arrays of pixels spaced via an affine transformation. RegularGrids are backed by one of several Band implementations, with the default implementation using the blosc compression library for efficient in-memory storage. There is experimental support for disk-backed storage via GDAL.

Grids may be queried, resampled, sliced, masked, and merged. Arbitrary array-based functions may be mapped to raster data with RegularGrid.apply(). Raster functions including slope, gradient, and hillshade are in the karta.raster.misc submodule.

GeoTIFF images are the primary supported format, however ESRI ASCII grids may also be used (with limitations due to the format).

Coordinate reference systems

Data in Karta is referenced to positions on earth via CRS objects that implement projection and geodetic methods. Coordinate reference systems may be either geographical or projected.

Geographical CRS objects return spatial relationships in terms of the true computed distances and azimuths on a spherical or ellipsoidal Earth.

Projected CRS objects (e.g. UTM, Polar Stereographic, and Web Mercator) return spatial relationships in terms of a flat plane, dependent on the projection.

Examples

Read or create vector geometries:

point = Point((-130.0, 52.0), crs=LonLatWGS84)
line = read_geojson("linedata.json")
polygon = Polygon([(-515005.78, -1301130.53),
                   (-579174.89, -1282271.94),
                   (-542977.83, -1221147.82),
                   (-437864.05, -1251641.55),
                   (-438160.72, -1252421.48),
                   (-437961.28, -1285314.00)],
                   crs=NSIDCNorth)

Perform simple queries:

point2 = Point((-25.0, 48.0), crs=LonLatWGS84)
point.distance(point2)          # Distance in geographical units
line.intersects(polygon)        # True or False
ch = polygon.convex_hull()      # Returns a new polygon
ch.to_shapefile("poly.shp")

Load and manipulate raster data:

grid = read_gtiff("landsat_scene.tif")  # Leverages GDAL
grid.profile(line)              # Collect data along a line
grid.resample(500.0, 500.0)     # Return a grid resampled at a new resolution

Installation

Karta currently supports Python 2.7 and Python 3.4+.

The easiest way to install is via pip. Installation requires a recent version of setuptools.

pip install -U setuptools
pip install karta

Building from source

Building requires Cython and a C99-compliant compiler.

pip install Cython

Clone the repository and build.

git clone https://github.com/fortyninemaps/karta.git karta
cd karta/
python setup.py build

Documentation

See the online manual, the tutorial, or read the API documentation.

Contributing

The source code lives at github.com/fortyninemaps/karta.

Bug reports, feature requests, and pull requests are welcome.

Run unit tests with python tests/runtests.py.

The manual is built using Sphinx and requires numpydoc.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].