| Age | Commit message (Collapse) | Author |
|
Since deeply nested geometry collections can lead to fatal errors in
GEOS, a new `max_geom_collections` argument on geometry model and form
fields, passed down to `GEOSGeometry` itself, allows limiting either
depth (WKT) or total number (WKB) before reaching GEOS.
Thanks Andrew MacPherson and kimchunbok_ for the reports, and Natalia
Bidart, Simon Charette, and Sarah Boyce for reviews.
|
|
Spatial lookups optimistically parse values as rasters before retrying
as geometries. If a malicious value reached the GDALRaster constructor,
depending on the raster driver, it might write to disk or fetch from the
network regardless of the constructor's `write=False` default argument.
Although this works as designed for model field assignment, this is
potentially unexpected for querying, for example, in the admin's
changelist view, which allows staff users to execute arbitrary lookups
on models registered with the admin.
Network rasters didn't even work in lookup contexts before, providing
further evidence that this use case was unintentional. (The failure
point was after the fetching, however.)
Now, strings and dicts representing rasters are rejected by spatial
lookups. To opt in to using them, wrap them in a `GDALRaster` first.
Although it would simplify the implementation to try geometries before
rasters (instead of stashing a raster exception and raising it later),
we maintain the current order, which has been stable for a decade.
Thanks Bence Nagy, localhost-detect, and kimchunbok_ for providing
information useful in evaluating this report. Thanks Simon Charette,
Natalia Bidart, and Sarah Boyce for reviews.
|
|
Follow-up to 75d627888bf42f8de6064a0bd665c98c0df66c55.
|
|
|
|
|
|
|
|
PostGISSchemaEditor._create_spatial_index_sql().
Thanks Luciano de la Iglesia for the report, and Simon Charette and David Smith
for the reviews.
|
|
|
|
GDALRaster from bytes.
Previously, `sys.getsizeof()` included the size of the `PyBytesObject`
wrapper which is bigger. `len(bytes_object)` is the accurate size.
Thanks Bence Nagy for the report, and Simon Charette for reviews.
|
|
This commit deprecates the "fetch all relations" form of
`QuerySet.select_related()` due to its poor performance characteristics, and
updates several tests relying on that feature to ignore the new warning.
|
|
This commit prepares for the deprecation of select_related() without arguments
by updating tests that used select_related() as a shorthand to explicitly
specify the related fields to be selected.
|
|
Thanks David Smith for report and Tim Graham for review.
|
|
|
|
Needed by MongoDB.
|
|
|
|
Signed-off-by: JaeHyuck Sa <wogur981208@gmail.com>
|
|
band index.
Thanks Tarek Nakkouch for the report, and Simon Charette for the initial
triage and review.
|
|
Tests regression in 0d31ca98830542088299d2078402891d08cc3a65.
|
|
|
|
Follow up to fb0d463b1f88a38f3e7cd8d66ed6c69309f97901
Since GDAL 3.11 the Memory driver is deprecated with its functionality
merged into the MEM dataset driver.
https://gdal.org/en/stable/drivers/vector/memory.html
|
|
Also replaced some DatabaseFeatures.supports_<foo>_lookup attributes
with @skipUnlessGISLookup.
|
|
GeometryCollectionField.
|
|
__num_dimensions lookup.
|
|
GEOS 3.8 (released Oct-2019) will be more than 5 years old when
Django 6.1 is released (Aug-2026).
|
|
Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>
|
|
GEOS 3.12+.
|
|
|
|
MariaDB and GEOS 3.12+.
GEOSWKTWriter_write() behavior was changed in GEOS 3.12+ to include
parentheses for sub-members (https://github.com/libgeos/geos/pull/903).
MariaDB doesn't accept WKT representations with additional parentheses
for MultiPoint. This is an accepted bug (MDEV-36166) in MariaDB that
should be fixed in the future:
- https://jira.mariadb.org/browse/MDEV-36166
|
|
test.
|
|
SpatiaLite.
|
|
|
|
TIGER driver was removed in GDAL 3.11.
https://github.com/OSGeo/gdal/commit/eb793be0395ccba50e053a46b30cb90deb530990
|
|
in the admin.
This work amends the code from f2f6046c0f92ff1faed057da0711ac478eef439c
where multiple geometry widgets rendered `<script>` elements in the
admin with the same HTML `id`, resulting in invalid HTML and fragile
JavaScript selectors. Refs #25706.
This change uses the widget's textarea ID to generate a unique `id` for
each JSON options `<script>`, ensuring valid and robust markup.
Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
|
|
Rewrapped long docstrings and block comments to 79 characters + newline
using script from https://github.com/medmunds/autofix-w505.
|
|
Manually reformatted some long docstrings and comments that would be
damaged by the to-be-applied autofixer script, in cases where editorial
judgment seemed necessary for style or wording changes.
|
|
|
|
gis_tests.geoapp.tests.GeoLookupTest.test_relate_lookup for bug in PostGIS.
ST_Relate() with PostGIS 3.5 and GEOS 3.13 gives a different result when
a series of calls are made vs. single call of the same function.
The fix for this is expected to be released in PostGIS 3.5.4 and 3.6.0.
https://lists.osgeo.org/pipermail/postgis-devel/2025-July/030581.html
https://trac.osgeo.org/postgis/ticket/5938
|
|
|
|
|
|
|
|
|
|
Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com>
|
|
GeoHash, IsValid on MariaDB 12.0.1+.
|
|
Refactored GIS-related JavaScript initialization to eliminate inline
scripts from templates. Added support for specifying a base layer using
the new `base_layer_name` attribute on `BaseGeometryWidget`, allowing
custom map tile providers via user-defined JavaScript.
As a result, the `gis/openlayers-osm.html` template was removed.
Thanks Sarah Boyce for reviews.
Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
|
|
|
|
|
|
|
|
PostGIS.
Swapped to an allow list instead of a deny list for field types to
determine if the UNNEST optimization can be enabled to avoid further
surprises with other types that would require further specialization to
adapt.
Regression in a16eedcf9c69d8a11d94cac1811018c5b996d491.
Thanks Joshua Goodwin for the report and Sarah Boyce for the test.
|
|
|
|
https://github.com/psf/black/releases/tag/25.1.0
|