#23804: Add a RasterField to GeoDjango
-----------------------------+-------------------------------------
     Reporter:  yellowcap    |                    Owner:  yellowcap
         Type:  New feature  |                   Status:  assigned
    Component:  GIS          |                  Version:  master
     Severity:  Normal       |               Resolution:
     Keywords:  raster gdal  |             Triage Stage:  Accepted
    Has patch:  1            |      Needs documentation:  0
  Needs tests:  0            |  Patch needs improvement:  1
Easy pickings:  0            |                    UI/UX:  0
-----------------------------+-------------------------------------

Comment (by yellowcap):

 I updated the pull request for the first RasterField implementation. The
 raster field should now be fairly complete, but it became quite large due
 to that. Its hard to split things at this point though, as the different
 elements are quite interrelated. I hope its still an acceptable size.

 Here is a description of the current state:

 - The field is implemented for PostGIS backends only.

 - Similar to `GeometryFields`, the field srid can be specified and the
 raster will automatically be transformed to the field srid upon saving.

 - A spatial index for the raster is built by default, and can be disabled
 with `spatial_index=False`.

 - The `null` and `blank` flags can be specified.

 - Lazy instantiation works for the raster field as well.

 - Tests are in place for the RasterField and corresponding migration
 commands and operations

 For this, I made some changes on the existing codebase:

 - Generalized the `GeometryProxy` and renamed to `SpatialProxy`. This is
 used for lazy-instantiation of objects related to spatial fields.

 - Override the `get_indexes` introspection function for postgis, as the
 spatial indices are based on expressions and are not straight indices
 (using `ST_ConvexHull`). So the sql code retrieving the list of indices
 has to be adopted to that.

 - Update the `get_placeholder` function in the `PostGISOperator` to
 implicitly reproject rasters that are passed to a field with a different
 srid than the field srid.

 - Change in `PostGISSchemaEditor` to create spatial indices on raster
 (wrapping the index creation sql with the `ST_ConvexHull` function).

 - Split parts of the `GeometryField` into a generalized `BaseSpatialField`
 class. The `GeometryField` and the `RasterField` subclass the
 `BaseSpatialField`.

 - Updated the `gis_migrations` test module to also include the
 `RasterField` into the tests.

--
Ticket URL: <https://code.djangoproject.com/ticket/23804#comment:29>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.919271096839111b75f834852e17bb0b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to