Geographic add-ons for Django Rest Framework. Provides a GeometryField, which is a subclass of Django Rest Framework (from now on DRF) WritableField. This field handles GeoDjango geometry fields, providing custom to_native and from_native methods for GeoJSON input/output. While precision and remove_duplicates are designed to reduce the byte size of the API response, they will also increase the processing time required to render the response. This will likely be negligible for small GeoJSON responses but may become an issue for large responses. The primary key of the model (usually the "id" attribute) is automatically used as the id field of each GeoJSON Feature Object. The GeoJSON specification allows a feature to contain a boundingbox of a feature. GeoFeatureModelSerializer allows two different ways to fill this property. The first is using the geo_field to calculate the bounding box of a feature.

Features

  • Install last stable version from pypi
  • Install development version
  • Compatibility with DRF, Django and Python
  • Coordinates through Python's builtin round() function
  • Custom GeoJSON properties source
  • We provide a GeoJsonPagination class

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow django-rest-framework-gis

django-rest-framework-gis Web Site

Other Useful Business Software
Full-stack observability with actually useful AI | Grafana Cloud Icon
Full-stack observability with actually useful AI | Grafana Cloud

Our generous forever free tier includes the full platform, including the AI Assistant, for 3 users with 10k metrics, 50GB logs, and 50GB traces.

Built on open standards like Prometheus and OpenTelemetry, Grafana Cloud includes Kubernetes Monitoring, Application Observability, Incident Response, plus the AI-powered Grafana Assistant. Get started with our generous free tier today.
Create free account
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of django-rest-framework-gis!

Additional Project Details

Programming Language

Python

Related Categories

Python Software Development Software, Python Frameworks

Registered

2022-09-05