{"id":13857153,"url":"https://github.com/fortyninemaps/karta","last_synced_at":"2025-07-13T20:31:02.287Z","repository":{"id":98852733,"uuid":"8369541","full_name":"fortyninemaps/karta","owner":"fortyninemaps","description":"A tidy Python package for geospatial computation","archived":false,"fork":false,"pushed_at":"2024-02-11T22:18:02.000Z","size":11223,"stargazers_count":100,"open_issues_count":8,"forks_count":11,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-05-23T04:28:22.707Z","etag":null,"topics":["geospatial","python","raster-data","vector-geometries"],"latest_commit_sha":null,"homepage":"https://karta.fortyninemaps.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fortyninemaps.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-02-23T01:48:38.000Z","updated_at":"2024-02-12T18:36:59.000Z","dependencies_parsed_at":"2024-05-19T23:46:01.046Z","dependency_job_id":null,"html_url":"https://github.com/fortyninemaps/karta","commit_stats":{"total_commits":1300,"total_committers":4,"mean_commits":325.0,"dds":0.0953846153846154,"last_synced_commit":"b35d8cbcfb62e9f1d826a5c73605d34a0c0990b6"},"previous_names":[],"tags_count":35,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fortyninemaps%2Fkarta","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fortyninemaps%2Fkarta/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fortyninemaps%2Fkarta/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fortyninemaps%2Fkarta/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fortyninemaps","download_url":"https://codeload.github.com/fortyninemaps/karta/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225912617,"owners_count":17544218,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["geospatial","python","raster-data","vector-geometries"],"created_at":"2024-08-05T03:01:28.002Z","updated_at":"2024-11-22T14:32:12.639Z","avatar_url":"https://github.com/fortyninemaps.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/fortyninemaps/karta.svg?branch=master)](https://travis-ci.org/fortyninemaps/karta)\n[![Build status](https://ci.appveyor.com/api/projects/status/viiimwp5pu7ff2bp?svg=true)](https://ci.appveyor.com/project/njwilson23/karta)\n[![Coverage Status](https://coveralls.io/repos/github/fortyninemaps/karta/badge.svg?branch=master)](https://coveralls.io/github/fortyninemaps/karta?branch=master)\n\n![Karta](https://raw.githubusercontent.com/fortyninemaps/karta/gh-pages/images/karta_logo.png)\n\n*Karta* is a package for spatial analysis in Python. It simplifies geospatial\ndata processing by providing efficient generic classes for vector and raster\ndata sources, as well as a selection of analysis functions.\n\n## Vector data types\n\nData are represented as `Point`, `Line`, `Polygon`, `Multipoint`, `Multiline`,\nand `Multipolygon` instances.\n\nAll data contain a `.crs` member encoding coordinate reference information. All\nvector geometries possess a `.properties` dict containing free-form metadata.\n*Multipart* geometries additionally possess a `.data` member which is a simple\ntyped table-like data structure.\n\nGeometries implement methods for computing distances, directions, and spatial\ncharacteristics. *Multipart* geometries support fast spatial indexing and\nqueries.\n\nGeoJSON and ESRI shapefile formats are supported for reading and writing.\nExperimental support for GPX XML files is in the `karta.vector.gpx` submodule.\n\nVector geometries implement the Python [`__geo_interface__`\nattribute](https://gist.github.com/sgillies/2217756) for vector geometries. This\npermits data to be exchanged between *Karta* and external modules that also\nimplement `__geo_interface__` (e.g.\n[shapely](https://github.com/Toblerity/Shapely),\n[fastkml](https://fastkml.readthedocs.org/en/latest/)).\n\n## Raster data types\n\nThe primary raster data type is the `RegularGrid`, which represents one or more\n2-d arrays of pixels spaced via an affine transformation. `RegularGrids` are\nbacked by one of several `Band` implementations, with the default implementation\nusing the [blosc](http://www.blosc.org/) compression library for efficient\nin-memory storage. There is experimental support for disk-backed storage via\nGDAL.\n\nGrids may be queried, resampled, sliced, masked, and merged. Arbitrary\narray-based functions may be mapped to raster data with `RegularGrid.apply()`.\nRaster functions including slope, gradient, and hillshade are in the\n`karta.raster.misc` submodule.\n\nGeoTIFF images are the primary supported format, however ESRI ASCII grids may\nalso be used (with limitations due to the format).\n\n## Coordinate reference systems\n\nData in Karta is referenced to positions on earth via `CRS` objects that\nimplement projection and geodetic methods. Coordinate reference systems may be\neither geographical or projected.\n\n**Geographical CRS** objects return spatial relationships in terms of the true\ncomputed distances and azimuths on a spherical or ellipsoidal Earth.\n\n**Projected CRS** objects (e.g. UTM, Polar Stereographic, and Web Mercator)\nreturn spatial relationships in terms of a flat plane, dependent on the\nprojection.\n\n## Examples\n\nRead or create vector geometries:\n\n```python\npoint = Point((-130.0, 52.0), crs=LonLatWGS84)\nline = read_geojson(\"linedata.json\")\npolygon = Polygon([(-515005.78, -1301130.53),\n                   (-579174.89, -1282271.94),\n                   (-542977.83, -1221147.82),\n                   (-437864.05, -1251641.55),\n                   (-438160.72, -1252421.48),\n                   (-437961.28, -1285314.00)],\n                   crs=NSIDCNorth)\n```\nPerform simple queries:\n```python\npoint2 = Point((-25.0, 48.0), crs=LonLatWGS84)\npoint.distance(point2)          # Distance in geographical units\nline.intersects(polygon)        # True or False\nch = polygon.convex_hull()      # Returns a new polygon\nch.to_shapefile(\"poly.shp\")\n```\nLoad and manipulate raster data:\n```python\ngrid = read_gtiff(\"landsat_scene.tif\")  # Leverages GDAL\ngrid.profile(line)              # Collect data along a line\ngrid.resample(500.0, 500.0)     # Return a grid resampled at a new resolution\n```\n\n## Installation\n\n*Karta* currently supports Python 2.7 and Python 3.4+.\n\nThe easiest way to install is via `pip`. Installation requires a recent version\nof `setuptools`.\n\n    pip install -U setuptools\n    pip install karta\n\n### Building from source\n\nBuilding requires Cython and a C99-compliant compiler.\n\n    pip install Cython\n\nClone the repository and build.\n\n    git clone https://github.com/fortyninemaps/karta.git karta\n    cd karta/\n    python setup.py build\n\n## Documentation\n\nSee the [online manual](https://karta.49fold.com/kartadocs/karta-manual.html),\nthe [tutorial](https://karta.49fold.com/kartadocs/_static/tutorial.html), or read the\n[API documentation](https://karta.49fold.com/kartadocs/reference.html).\n\n## Contributing\n\nThe source code lives at\n[github.com/fortyninemaps/karta](github.com/fortyninemaps/karta).\n\nBug reports, feature requests, and pull requests are welcome.\n\nRun unit tests with `python tests/runtests.py`.\n\nThe manual is built using [Sphinx](http://sphinx-doc.org/) and requires\n[numpydoc](https://github.com/numpy/numpydoc).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffortyninemaps%2Fkarta","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffortyninemaps%2Fkarta","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffortyninemaps%2Fkarta/lists"}