{ "info": { "author": "Brian Galey", "author_email": "bkgaley@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "Django-Spillway\n===============\n\n.. image:: https://travis-ci.org/bkg/django-spillway.svg?branch=master\n :target: https://travis-ci.org/bkg/django-spillway\n.. image:: https://coveralls.io/repos/bkg/django-spillway/badge.svg?branch=master&service=github\n :target: https://coveralls.io/github/bkg/django-spillway?branch=master\n\n`Django `_ and `Django REST Framework `_ integration of raster and feature based geodata.\n\nSpillway builds on the immensely marvelous Django REST Framework by providing\nfacilities for the handling of geospatial formats such as GeoTIFF, GeoJSON, and\nKML/KMZ.\n\nSpecific attention has been paid to speedy serialization of geometries from\nspatial backends which avoids the cost of unnecessary re-serialization in\nPython.\n\n\nBasic Usage\n-----------\nAdd vector response formats such as GeoJSON, KML/KMZ, and SVG to your API.\n\n.. code-block:: python\n\n # models.py\n from django.contrib.gis.db import models\n from spillway.query import GeoQuerySet\n\n class Location(models.Model):\n slug = models.SlugField()\n geom = models.GeometryField()\n objects = GeoQuerySet.as_manager()\n\n # urls.py\n from django.conf.urls import url\n from spillway import generics\n from .models import Location\n\n urlpatterns = [\n url(r'^locations/(?P[\\w-]+)/$',\n generics.GeoDetailView.as_view(queryset=Location.objects.all()),\n name='location'),\n url(r'^locations/$',\n generics.GeoListView.as_view(queryset=Location.objects.all()),\n name='location-list'),\n ]\n\nRetrieve all locations as GeoJSON::\n\n curl -H 'Accept: application/vnd.geo+json' 127.0.0.1:8000/locations/\n\nSimplify and reproject the geometries to another coordinate system::\n\n curl -H 'Accept: application/vnd.geo+json' '127.0.0.1:8000/locations/?srs=3857&simplify=100'\n\nAny `spatial lookup\n`_\nsupported by the backend is available to search on. For instance, find the location which\nintersects a particular point::\n\n curl -g '127.0.0.1:8000/locations/?intersects={\"type\":\"Point\",\"coordinates\":[-120,38]}'\n\nRaster data support is provided as well.\n\n.. code-block:: python\n\n # models.py\n from spillway.models import AbstractRasterStore\n from spillway.query import GeoQuerySet\n\n class RasterStore(AbstractRasterStore):\n objects = GeoQuerySet.as_manager()\n\n # urls.py\n from django.conf.urls import url\n from spillway import generics\n from .models import RasterStore\n\n urlpatterns = [\n url(r'^rstores/(?P[\\w-]+)/$',\n generics.RasterDetailView.as_view(queryset=RasterStore.objects.all()),\n name='rasterstore'),\n url(r'^rstores/$',\n generics.RasterListView.as_view(queryset=RasterStore.objects.all()),\n name='rasterstore-list'),\n ]\n\nReturn JSON containing a 2D array of pixel values for a given bounding box::\n\n curl 'http://127.0.0.1:8000/rstores/tasmax/?bbox=-107.74,37.39,-106.95,38.40'\n\nOne can crop raster images with a geometry and return a .zip archive of the\nresults::\n\n curl -H 'Accept: application/zip' 'http://127.0.0.1:8000/rstores/?g=-107.74,37.39,-106.95,38.40'\n\n\nGeneric Views\n-------------\nSpillway extends REST framework generic views with GeoJSON and KML/KMZ\nrenderers for geographic data. This includes pagination of features and all\navailable spatial lookups/filters for the spatial backend in use.\n\n\nViewSets\n--------\nView sets exist for geo and raster enabled models following the familiar usage\npattern of Django REST Framework. Currently, a writable raster viewset needs to\nbe added and tested though the read-only variety is available.\n\n.. code-block:: python\n\n from spillway import viewsets\n from .models import Location, RasterStore\n\n class LocationViewSet(viewsets.GeoModelViewSet):\n queryset = Location.objects.all()\n\n class RasterViewSet(viewsets.ReadOnlyRasterModelViewSet):\n queryset = RasterStore.objects.all()\n\n\nMap Tiles\n---------\n`TileView` and `RasterTileView` are available respectively for generating\nvector or image map tiles. Image tiles require the optional dependency Mapnik,\nso be sure to have that installed. In this example, GeoJSON or PNG tiles can be\nrequested for the Location geo model, or PNG tiles for RasterStore data sets.\nThe urls presented here use a scheme of \"/{z}/{x}/{y}.{format}\".\n\n.. code-block:: python\n\n from django.conf.urls import url\n from spillway import views, urls\n from .models import Location, RasterStore\n\n urlpatterns = [\n url(urls.tilepath('^locations/),\n views.TileView.as_view(queryset=Location.objects.all()),\n name='location-tiles'),\n url(urls.tilepath('^tiles/(?P\\d+)/'),\n views.RasterTileView.as_view(queryset=RasterStore.objects.all()),\n name='map-tiles'),\n ]\n\nBe sure to cache map tiles through configuration of your web server or Django's\ncache framework when serving outside of development environments.\n\n\nRenderers\n---------\nSo far there are renderers for common raster and vector data formats, namely\nzipped GeoTIFF, JPEG, PNG, and Erdas Imagine, plus GeoJSON, KML/KMZ, and SVG.\n\n\nTests\n-----\nCreate a `virtualenv `_ with\n`virtualenvwrapper `_,\ninstall dependencies, and run the tests. On Python 2.7, running tests with\nSpatiaLite requires a build of pysqlite with extension loading enabled. On 3.x,\nall is well without it.\n\n.. code-block:: shell\n\n mkvirtualenv spillway\n # Only the following when testing on 2.7, not needed with 3.x.\n pip install --global-option=build_ext --global-option='-USQLITE_OMIT_LOAD_EXTENSION' pysqlite\n pip install -r requirements.txt Pillow\n make check\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/bkg/django-spillway", "keywords": "", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "django-spillway", "package_url": "https://pypi.org/project/django-spillway/", "platform": "", "project_url": "https://pypi.org/project/django-spillway/", "project_urls": { "Homepage": "https://github.com/bkg/django-spillway" }, "release_url": "https://pypi.org/project/django-spillway/0.8.1/", "requires_dist": null, "requires_python": "", "summary": "Geodata extensions for Django REST Framework", "version": "0.8.1" }, "last_serial": 3812450, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "658a0ef4fa8487ce4541510a5b50c344", "sha256": "7153c8565e5830c21a44db237d27a7bc5f17711e940c604fb46446eff927d12b" }, "downloads": -1, "filename": "django-spillway-0.1.0.tar.gz", "has_sig": false, "md5_digest": "658a0ef4fa8487ce4541510a5b50c344", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23659, "upload_time": "2014-11-19T21:47:35", "url": "https://files.pythonhosted.org/packages/c6/61/746b65154e56b69f064c51a4da9883c9c222fe284486b64065c6339cd253/django-spillway-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "2142fedf7997a86018ff6b1d64654bbe", "sha256": "812508d8bcdb00d5186daaf8c219b88db0f1d52ac49c879fb3ba55b3cffd7699" }, "downloads": -1, "filename": "django-spillway-0.1.1.tar.gz", "has_sig": false, "md5_digest": "2142fedf7997a86018ff6b1d64654bbe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18364, "upload_time": "2014-12-04T01:12:18", "url": "https://files.pythonhosted.org/packages/43/68/31e4c468b1330e1754d0b502b936f266f0820f406c3c449208bd46039c1f/django-spillway-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "19eaa3a6b78737eec6857a53d364d057", "sha256": "6390e6463a4720ee1fd024bd3518020f93dc76829c8bb4f754dbfd017f1d3390" }, "downloads": -1, "filename": "django-spillway-0.1.2.tar.gz", "has_sig": false, "md5_digest": "19eaa3a6b78737eec6857a53d364d057", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18377, "upload_time": "2014-12-10T21:54:56", "url": "https://files.pythonhosted.org/packages/a1/c0/8dce74e13e58c66a1588045595d88065ad8d7e778c1cf1c3eb23aceceb96/django-spillway-0.1.2.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "36a8d56fbe02828cf6bde0f17242a75b", "sha256": "1a9abae74ac37cb07f7133770195118ac8cf837dc6f2de588111a8cd83ae1294" }, "downloads": -1, "filename": "django-spillway-0.2.0.tar.gz", "has_sig": false, "md5_digest": "36a8d56fbe02828cf6bde0f17242a75b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19085, "upload_time": "2015-02-24T02:12:41", "url": "https://files.pythonhosted.org/packages/e0/10/a88f2a9f3d08c55bbe288650bf1164184f1187748400a44b9197584ecaf6/django-spillway-0.2.0.tar.gz" } ], "0.3.0": [], "0.3.1": [ { "comment_text": "", "digests": { "md5": "4b193f13a04b8f28d1eca3518a626a14", "sha256": "77717c2ae90f996b98f7a2f0caae9159ccd9e157e816372d42a9258d3ad6b33f" }, "downloads": -1, "filename": "django-spillway-0.3.1.tar.gz", "has_sig": false, "md5_digest": "4b193f13a04b8f28d1eca3518a626a14", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20532, "upload_time": "2015-05-05T20:32:31", "url": "https://files.pythonhosted.org/packages/7f/77/e3691f78327f57da53d20c0e4323d0f0835e71be377627ddcacf30b2f161/django-spillway-0.3.1.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "954550c781c1bb1c05e7fe4363fda68a", "sha256": "79004de2ccef4f36fa5c79561b1a657879bd992c7f022a791fe6ca902f33d41d" }, "downloads": -1, "filename": "django-spillway-0.4.0.tar.gz", "has_sig": false, "md5_digest": "954550c781c1bb1c05e7fe4363fda68a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20796, "upload_time": "2015-05-14T16:24:56", "url": "https://files.pythonhosted.org/packages/62/58/cd54515b579960834ee2dfbf1a7d41205c93a6ad01c61202bbfc11a68c59/django-spillway-0.4.0.tar.gz" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "c7029cea8533a86148daae7e95d305d2", "sha256": "49385106e2b3ff582276e612acf8e2af0b8ea5eb8f33b8f744e738a6302ae70a" }, "downloads": -1, "filename": "django-spillway-0.4.1.tar.gz", "has_sig": false, "md5_digest": "c7029cea8533a86148daae7e95d305d2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20826, "upload_time": "2015-06-06T02:16:42", "url": "https://files.pythonhosted.org/packages/2e/88/5468047f99b40eea80af3e99136e0816ccc70faee6fd85594155208201ef/django-spillway-0.4.1.tar.gz" } ], "0.4.2": [ { "comment_text": "", "digests": { "md5": "4308ae59efdf2ab5416bc4472f97cac8", "sha256": "30ddb376c28adcd87832c20bf696077ff38f36d4c22c3814d933c9bc1316ff82" }, "downloads": -1, "filename": "django-spillway-0.4.2.tar.gz", "has_sig": false, "md5_digest": "4308ae59efdf2ab5416bc4472f97cac8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20837, "upload_time": "2015-06-06T23:49:13", "url": "https://files.pythonhosted.org/packages/c1/c2/256928b213a38728f3e5394d4e38ce873fa7f9c3134ec038a96cede7aa0a/django-spillway-0.4.2.tar.gz" } ], "0.4.3": [ { "comment_text": "", "digests": { "md5": "7a8ddd9a0664e78d61d34e857a211e72", "sha256": "14ba61354e227e52baf574b48c1ccf07cc16d9aa110f5efa79a8f1f62d254886" }, "downloads": -1, "filename": "django-spillway-0.4.3.tar.gz", "has_sig": false, "md5_digest": "7a8ddd9a0664e78d61d34e857a211e72", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20938, "upload_time": "2015-06-12T19:07:02", "url": "https://files.pythonhosted.org/packages/b2/55/22a780ae698315325c49f1ebeaa6e05da542e09fd30588b0f65439c05943/django-spillway-0.4.3.tar.gz" } ], "0.4.4": [ { "comment_text": "", "digests": { "md5": "795c4762a39c023332822a5378966444", "sha256": "424e099422b5352b4144aec7aefb4537bd9a5ad99a7c5662577c23215233ab4a" }, "downloads": -1, "filename": "django-spillway-0.4.4.tar.gz", "has_sig": false, "md5_digest": "795c4762a39c023332822a5378966444", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24904, "upload_time": "2015-06-25T03:52:26", "url": "https://files.pythonhosted.org/packages/e8/48/79866a7d639de526e262f51d7c1c740423a3482cabdfb18d6005e7ad81a3/django-spillway-0.4.4.tar.gz" } ], "0.4.5": [ { "comment_text": "", "digests": { "md5": "a4a3152074da07c18238c39471d74437", "sha256": "ca4ec15417e267a5c0ed66c9e7e1cec2983e4f2d468c479ecab622b41137d4c4" }, "downloads": -1, "filename": "django-spillway-0.4.5.tar.gz", "has_sig": false, "md5_digest": "a4a3152074da07c18238c39471d74437", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25332, "upload_time": "2015-07-10T01:34:00", "url": "https://files.pythonhosted.org/packages/9c/c1/c53c9b923138e36f4880ef1929481af0fe59ac9360eea1ae514a82a21d91/django-spillway-0.4.5.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "115fd6a474dacfbc6db5dcbe62013526", "sha256": "525b202e881018a9a08a9ea2c8203013ded21a2e10909c7af83fceb906e11dcf" }, "downloads": -1, "filename": "django-spillway-0.5.0.tar.gz", "has_sig": false, "md5_digest": "115fd6a474dacfbc6db5dcbe62013526", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24670, "upload_time": "2015-08-07T00:57:23", "url": "https://files.pythonhosted.org/packages/b8/e2/b9b58e8093063f453bfe9704e1cc44a1bad42c968f3daf11170c969765ad/django-spillway-0.5.0.tar.gz" } ], "0.5.1": [ { "comment_text": "", "digests": { "md5": "437c07018eb34e80a53d35ada6fdea36", "sha256": "ec00adf183246af6df47a74c2c8b28e9f5b7542a9e104978a043791351e4fe0b" }, "downloads": -1, "filename": "django-spillway-0.5.1.tar.gz", "has_sig": false, "md5_digest": "437c07018eb34e80a53d35ada6fdea36", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24719, "upload_time": "2015-08-13T00:17:51", "url": "https://files.pythonhosted.org/packages/12/60/89ddb7ef29fb78d210fad2030b4ca7e56228f661d24794431bb690928dcb/django-spillway-0.5.1.tar.gz" } ], "0.5.2": [ { "comment_text": "", "digests": { "md5": "65bad0ac736a406c19868a5e5cb7d9dc", "sha256": "2b0062a9fb074d2d0770c74972d402ecd4bcde16a45ad1021821c15a3fabd3c7" }, "downloads": -1, "filename": "django-spillway-0.5.2.tar.gz", "has_sig": false, "md5_digest": "65bad0ac736a406c19868a5e5cb7d9dc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24665, "upload_time": "2015-10-16T22:07:16", "url": "https://files.pythonhosted.org/packages/89/85/b4f455ed87b5cc49d80a21e92efce60c0117af6fea03c9128cdec603d323/django-spillway-0.5.2.tar.gz" } ], "0.5.3": [ { "comment_text": "", "digests": { "md5": "a7cf51605586b8b5f5cfa58136bc979c", "sha256": "6216c5bc0f484acdd800efb0288200e197ca973ce4a1c568e27ea16807580bb9" }, "downloads": -1, "filename": "django-spillway-0.5.3.tar.gz", "has_sig": false, "md5_digest": "a7cf51605586b8b5f5cfa58136bc979c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24682, "upload_time": "2015-11-03T01:31:47", "url": "https://files.pythonhosted.org/packages/f2/d3/6cbfe430e0547c02826604c23adbe7a098fc60d9153b15d2f906bd9289ee/django-spillway-0.5.3.tar.gz" } ], "0.6.0": [ { "comment_text": "", "digests": { "md5": "5eacdb5546fb40419b9af0e1951a69d9", "sha256": "aac83fe8362ef11f2460d87cee3f2c49337c63ea83a92581bc12391ff35d9663" }, "downloads": -1, "filename": "django-spillway-0.6.0.tar.gz", "has_sig": false, "md5_digest": "5eacdb5546fb40419b9af0e1951a69d9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 31629, "upload_time": "2016-12-08T01:55:42", "url": "https://files.pythonhosted.org/packages/46/48/c166e87127aebaafcb2a389298a229b183e54c13bfb0ce9e7833e4d0cb3a/django-spillway-0.6.0.tar.gz" } ], "0.7.0": [ { "comment_text": "", "digests": { "md5": "5f1502880e16d23db9490d64a32dde7f", "sha256": "2c70d04ddc63a6cd0dc6e0dc6212641555ad190753ebc6e0e39e4412e8eaf9d3" }, "downloads": -1, "filename": "django-spillway-0.7.0.tar.gz", "has_sig": false, "md5_digest": "5f1502880e16d23db9490d64a32dde7f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 31931, "upload_time": "2017-04-24T19:46:37", "url": "https://files.pythonhosted.org/packages/83/d9/d299d9d7906a724343abd7b26b42d6b5abd33042d6c4c8511d9518e60e7f/django-spillway-0.7.0.tar.gz" } ], "0.8.0": [ { "comment_text": "", "digests": { "md5": "8f656516c1311bdaec005a253f3fe7ea", "sha256": "72d1fb153262dee7fd0051d734d9b7a071851dedc7451f83db548423cecf20a6" }, "downloads": -1, "filename": "django-spillway-0.8.0.tar.gz", "has_sig": false, "md5_digest": "8f656516c1311bdaec005a253f3fe7ea", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 31891, "upload_time": "2018-04-26T23:24:56", "url": "https://files.pythonhosted.org/packages/0e/0a/749944916f3a19a74a84f50bb91d8839ff3f21935146e4a71925e91c7957/django-spillway-0.8.0.tar.gz" } ], "0.8.1": [ { "comment_text": "", "digests": { "md5": "c6aeb9c62ee8cf378fb74f2067a32661", "sha256": "b24fde01aabb7775223c742a775e3846acbee6d3861c6fcc627986180085cce3" }, "downloads": -1, "filename": "django-spillway-0.8.1.tar.gz", "has_sig": false, "md5_digest": "c6aeb9c62ee8cf378fb74f2067a32661", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 29019, "upload_time": "2018-04-27T01:30:03", "url": "https://files.pythonhosted.org/packages/8f/70/c791326720a5d831de904c6dd18dd2ba9d1c3a0ce02e2bf3d5c321058d04/django-spillway-0.8.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c6aeb9c62ee8cf378fb74f2067a32661", "sha256": "b24fde01aabb7775223c742a775e3846acbee6d3861c6fcc627986180085cce3" }, "downloads": -1, "filename": "django-spillway-0.8.1.tar.gz", "has_sig": false, "md5_digest": "c6aeb9c62ee8cf378fb74f2067a32661", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 29019, "upload_time": "2018-04-27T01:30:03", "url": "https://files.pythonhosted.org/packages/8f/70/c791326720a5d831de904c6dd18dd2ba9d1c3a0ce02e2bf3d5c321058d04/django-spillway-0.8.1.tar.gz" } ] }