Releases: girder/django-large-image
Releases · girder/django-large-image
Utilize rasterio
large-image
recently introduced a new rasterio
-based source module which many users may find easier to use than the GDAL source module. The changes in this release make django-large-image
compatible with the new rasterio
source module and switch the testing/demo to use that module over GDAL.
Modern UI, Django Caching, Better Styling, API Cleanup, & more
New Features
Notable
- Major UI overhaul
- Copy metadata button
- Modern UI styling
- Advanced multi-band compositing with custom colors
- Connects
large-image
's caching mechanisms to utilize the Django cache framework- Specify the named cache as the
LARGE_IMAGE_CACHE_NAME
, otherwise uses the'default'
cache
- Specify the named cache as the
- New
tiffdump
endpoint utilizing tifftools to extract information from Tiff files - Support for URI encoded styles in request URL parameters (documented in README)
- Improved internal mechanisms for opening tile sources for easier overrides downstream
- User can specify the source class to use through the
source
URL parameter
- User can specify the source class to use through the
- Better format handing for endpoints that serve image data (single endpoint where
PNG
,JPEG
, orTIFF
are specified for the desired format)
Additional
- Support
max_width
andmax_height
specification for generating thumbnails - Improvements to SSR template overriding
- mypy type annotations throughout API
- New
TileMetadataSerializer
for thetiles/metadata
endpoint - Improved API error handling
- Better OpenAPI RESTful arguments documentation
Demos
- Standalone Docker image demo app: https://github.com/girder/django-large-image/pkgs/container/django-large-image-demo
- Usage with
django-raster
: https://github.com/ResonantGeoData/django-raster-demo - Noted support for GeoDjango's
GDALRaster
in README - Document how to convert Pyramidal Tiffs (COGs) with Celery tasks
Deprecations & Changes
internal_metadata
->metadata_internal
- Metadata endpoints are now under the
info/
prefix- e.g.,
metadata
->info/metadata
- e.g.,
- Data endpoints are now under the
data/
prefix- e.g.,
thumbnail.png
->data/thumbnail.(?P<fmt>png|jpg|jpeg)
- e.g.,
Better ViewSet Mixins
This release has breaking changes
There are now 4 ViewSet mixin classes for use with both detail and non-detail viewsets in DRF.
The following are the provided mixin classes and their use case:
LargeImageMixin
: for use with a standard, non-detailViewSet
. Users must implementget_path()
LargeImageDetailMixin
: for use with a detail viewset likeGenericViewSet
. Users must implementget_path()
LargeImageFileDetailMixin
: (most commonly used) for use with a detail viewset likeGenericViewSet
where the associated model has aFileField
storing the image data.LargeImageVSIFileDetailMixin
: (geospatial) for use with a detail viewset likeGenericViewSet
where the associated model has aFileField
storing the image data that is intended to be read with GDAL. This will access the data over GDAL's Virtual File System interface (a VSI path).
Most users will want to use LargeImageFileDetailMixin
Other changes:
- Style parameters can now be included as a JSON blob in the request body following the format specified by large-image
- The thumbnail, tile, and region endpoints now each have
.png
,.jpeg
, and.tif
variants where appropriate - DRF
ValidationError
s are raised for user-caused API errors (return 400 status on endpoint) - More usage examples
Introducing django-large-image
django-large-image is here to solve your image tile serving needs in Django! Take a look at the README for some example implementations and give it a try in your project with image data.
Highlights
- Easy to use mixin interface
- Rich set of RESTful endpoints to extract information from large image formats
- Serve image tiles in the slippy maps standard (
z/x/y.png
) - Produce thumbnails of large images on the fly
- Works with
FileField
interfaces - Works with URL files (through GDAL's VFS/VSI layer)
- Included viewer for admin interface or server-rendered templates
- OpenAPI documentation included