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
Gemini 3 and 200+ AI Models on One Platform Icon
Gemini 3 and 200+ AI Models on One Platform

Access Google's best plus Claude, Llama, and Gemma. Fine-tune and deploy from one console.

Build generative AI apps with Vertex AI. Switch between models without switching platforms.
Start Free
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