--- id: djangorestframework-gis version: "1.2.1" license: BSD license_treatment: permissive maintenance: active --- # djangorestframework-gis — Geographic add-ons for Django Rest Framework License: permissive · Maintenance: active · Downloads: 452.0K/mo ## What it is and what it does djangorestframework-gis extends Django REST Framework with geographic data handling, automatically mapping GeoDjango geometry fields to a custom GeometryField that serializes to and from GeoJSON. It provides a GeometryField with optional coordinate precision rounding, duplicate coordinate removal, bounding-box generation, and coordinate transformation support, plus a GeometrySerializerMethodField for computed geometry values. The package integrates transparently into DRF's serializer system once added to INSTALLED_APPS, eliminating the need for explicit field declarations in most cases. The package is built on top of django, djangorestframework, and django-filter, and is designed for REST APIs that expose spatial data—locations, boundaries, routes, or any geometry stored in a GeoDjango model. It handles the conversion between database geometry representations and the GeoJSON standard expected by web clients and mapping libraries. Use it for: - Build a location-based REST API that returns points, polygons, or linestrings as GeoJSON for mapping frontends - Serialize GeoDjango models with geometry fields without manual field mapping or custom serializer logic - Reduce API response size by rounding coordinate precision or removing duplicate points from geometries - Transform geometries to a standard projection for GeoJSON compliance in REST responses - Create computed geometry fields in serializers using GeometrySerializerMethodField for derived spatial data ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Adds geographic and GeoJSON support to Django REST Framework, providing serialization fields and utilities for handling GeoDjango geometry objects in REST APIs. Yes. The package is actively maintained, has no known vulnerabilities, low install friction, and a permissive BSD license. It directly solves the problem of serializing GeoDjango geometries in REST APIs and is the standard tool for this task in the Django ecosystem. Install it if you need to expose spatial data via REST. ## Install pip install djangorestframework-gis uv add djangorestframework-gis poetry add djangorestframework-gis ## Installing djangorestframework-gis Before you install: Low install friction with a pure-Python wheel distribution. Actively maintained with recent releases; last commit 2026-08-10 and 1125 repository stars indicate ongoing support. License in practice: BSD license is permissive, allowing commercial and private use with minimal restrictions—suitable for most projects. Quickstart: pip install djangorestframework-gis # In settings.py, add to INSTALLED_APPS after rest_framework: INSTALLED_APPS = [ 'rest_framework', 'rest_framework_gis', ] # GeometryField handles geometry serialization automatically once installed. Requires django, djangorestframework, and django-filter as runtime dependencies; GeoDjango support in your Django installation is assumed. Verify before relying: - Whether GeoDjango/GEOS is automatically available or requires separate system-level spatial libraries - Performance characteristics when handling large GeoJSON responses with precision rounding or duplicate removal - Exact Python version requirements beyond the classifiers listed (3.9 to 3.13) ## Package facts - License: BSD (permissive) - Python support: unspecified - Install friction: low - Maintenance: active - Downloads: 452.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags django rest framework geojson, geospatial api serialization, django gis rest api, geometry field serializer, geodjango rest framework, geojson rest api, spatial data rest framework, geospatial, django-rest-framework, geojson [View on SkillFed](https://skillfed.io/packages/djangorestframework-gis) · [View on PyPI](https://pypi.org/project/djangorestframework-gis/)