Commit Graph

390 Commits

Author SHA1 Message Date
Tim Graham ea34426ae7 Fixed flake8 2.6 warnings. 2016-06-16 09:12:50 -04:00
Sergey Fedoseev cee534228c Refs #25645 -- Removed SpatiaLite 3.x compatibility in gis.db.models.functions.Translate.
Complements 47f22e8286.
2016-06-13 10:32:07 -04:00
Sergey Fedoseev a20671c489 Refs #25645 -- Removed SpatiaLite 3.x compatibility in SpatialiteSpatialRefSys.wkt.
Complements 47f22e8286.
2016-06-01 10:49:55 -04:00
Tim Graham bc84278615 Fixed #26675 -- Dropped support for PostgreSQL 9.2/PostGIS 2.0. 2016-06-01 07:45:22 -04:00
Tim Graham 47f22e8286 Fixed #25645 -- Dropped support for SpatiaLite < 4.0. 2016-05-31 11:31:51 -04:00
Daniel Wiesmann 9bb1b4b7f6 Refs #25588 -- Fixed GDAL dependency in spatial lookups. 2016-05-27 17:43:17 +01:00
Tim Graham 92f88206d0 Refs #26134 -- Updated deprecated MySQL GIS function names. 2016-05-24 11:34:15 -04:00
Loïc Bistuer ed0ff913c6 Fixed #10506, #13793, #14891, #25201 -- Introduced new APIs to specify models' default and base managers.
This deprecates use_for_related_fields.

Old API:

class CustomManager(models.Model):
    use_for_related_fields = True

class Model(models.Model):
    custom_manager = CustomManager()

New API:

class Model(models.Model):
    custom_manager = CustomManager()

    class Meta:
        base_manager_name = 'custom_manager'

Refs #20932, #25897.

Thanks Carl Meyer for the guidance throughout this work.
Thanks Tim Graham for writing the docs.
2016-05-17 12:07:22 +07:00
Daniel Wiesmann bbfad84dd9 Fixed #25588 -- Added spatial lookups to RasterField.
Thanks Tim Graham for the review.
2016-05-06 09:17:18 -04:00
Claude Paroz 388bb5bd9a Fixed #22936 -- Obsoleted Field.get_prep_lookup()/get_db_prep_lookup()
Thanks Tim Graham for completing the initial patch.
2016-05-04 20:02:01 +02:00
Tim Graham 32969c3931 Refs 2bd1bbc -- Made GeometryField.get_db_prep_lookup() a private (deprecated) method. 2016-05-02 09:40:02 -04:00
Anssi Kääriäinen 7f51876f99 Fixed #26207 -- Replaced dynamic classes with non-data descriptors for deferred instance loading. 2016-04-29 13:06:32 -04:00
Nicolas Noé 23fbd3ff48 Fixed #26512 -- Added tests for SpatialRefSysMixin.get_units(). 2016-04-19 11:19:44 -04:00
Tim Graham 74675a15d0 Removed unused wk_col property of SpatialRefSys models.
Unused since ae7cb577dd.
2016-04-15 13:17:09 -04:00
Daniel Wiesmann c12a00e554 Fixed #26455 -- Allowed filtering and repairing invalid geometries.
Added the IsValid and MakeValid database functions, and the isvalid lookup,
all for PostGIS.

Thanks Tim Graham for the review.
2016-04-09 09:22:30 -04:00
Tim Graham 2cd2d18851 Fixed W503 flake8 warnings. 2016-04-04 17:14:26 -04:00
Noenglish Professorbut f8d20da047 Fixed a few docstring typos. 2016-03-12 08:45:06 -05:00
Shai Berger bb51dc902d Refs #26112 -- Fixed aggregate GIS test on Oracle.
Made sure the test doesn't try to aggregate over MultiPolygonField and made
AreaField turn decimals into floats on the way from the DB.

Thanks Daniel Wiesmann, Jani Tiainen, and Tim Graham for review and discussion.
2016-02-09 10:04:54 -05:00
Claude Paroz c47364ef0c Fixed #26134 -- Used new OpenGIS names for recent MySQL
Thanks František Malina for the report.
2016-01-29 23:25:23 +01:00
Daniel Wiesmann a08d2463d2 Fixed #26112 -- Error when computing aggregate of GIS areas.
Thanks Simon Charette and Claude Paroz for the reviews.
2016-01-22 19:38:34 +01:00
Claude Paroz 00cb9e13b4 Fixed #15165 -- Prevented wrong results with perimeter on geodetic fields. 2015-12-30 18:07:02 -05:00
Ville Skyttä e6ca15c13f Passed logging message parameters as arguments instead of interpolating them. 2015-12-26 18:35:42 -05:00
Sergey Fedoseev 25f5b5c19d Fixed #25853 -- Added support for GeoHash function on SpatiaLite. 2015-12-04 08:09:21 -05:00
Sergey Fedoseev 717a54c883 Fixed #25797 -- Fixed regex for getting units from SRS WKT. 2015-12-03 19:03:28 -05:00
Josh Soref 93452a70e8 Fixed many spelling mistakes in code, comments, and docs. 2015-12-03 12:48:24 -05:00
Sergey Fedoseev 0825f77f76 Fixed #25836 -- Added support for MakeLine aggregate on SpatiaLite. 2015-12-02 17:25:33 -05:00
Sergey Fedoseev 49f1cc54e6 Fixed #25835 -- Removed Adaptor alias from spatial operations classes. 2015-11-30 08:57:15 -05:00
Claude Paroz c3531d2f20 Removed ability to pass a geometry string to GIS functions
This was a possible confusion source with column name arguments.
Thanks Sergey Fedoseev for the suggestion.
2015-11-07 16:04:24 +01:00
Sergey Fedoseev 5f7035cec7 Fixed #25673 -- Made `GeometryField.from_db_value` set SRID 2015-11-06 20:45:31 +01:00
Sergey Fedoseev a449b7ef99 Fixed #25629 -- Added checks of the number of arguments for GeoDjango DB functions. 2015-11-03 08:20:08 +01:00
Sergey Fedoseev 7127eb287f Fixed #25659 -- Added missing support for MySQL 5.6.1 GIS functions
Added support for ST_Difference/ST_Intersection/ST_SymDifference.
2015-11-02 19:25:53 +01:00
Sergey Fedoseev b78226cd3d Fixed #25655 -- Dropped support for GEOS < 3.3 2015-11-01 20:41:52 +01:00
Sergey Fedoseev 8ad923b9d0 Fixed #25636 -- Dropped support for SpatiaLite < 3.0 2015-10-31 14:22:34 +01:00
Sergey Fedoseev 7521bb95d5 Fixed #25630 -- Replaced `AsGeoHash` with `GeoHash` in unsupported GIS functions 2015-10-29 13:34:12 +01:00
Claude Paroz b55b34129b Moved around imports in PostGIS operations
Thanks Daniel Wiesmann for inspiration.
2015-10-27 20:38:21 +01:00
Tim Graham 0b5d32faca Fixed #25611 -- Standardized descriptor signatures. 2015-10-26 11:31:16 -04:00
Claude Paroz c08f85fd54 Fixed #25592 -- Fixed misnamed strictly_above PostGIS lookup
Fixes a regression from 2bd1bbc42. Thanks Daniel Wiesmann for the report
and Tim Graham for the review.
2015-10-22 20:32:31 +02:00
Tim Graham 67732a9b18 Fixed #24687 -- Added select_related() validation for nested non-relational fields.
The removed test was added in the original select_related() validation
patch (45d4e43d2d), but there doesn't
seem to be any reason for it.

Thanks Claude Paroz for help and review.
2015-10-10 09:48:50 -04:00
Claude Paroz 00db71d452 Refs #25499 -- Fixed expressions in distance lookups on Oracle. 2015-10-09 14:08:42 -04:00
Claude Paroz 37d06cfc46 Fixed #25499 -- Added the ability to pass an expression in distance lookups
Thanks Bibhas Debnath for the report and Tim Graham for the review.
2015-10-09 15:27:47 +02:00
Tim Graham 5d383549ee Refs #24152 -- Removed deprecated GeoQuerySet aggregate methods.
Per deprecation timeline.
2015-09-23 19:31:10 -04:00
Tim Graham fd6a299cd0 Refs #14030 -- Removed backwards compatiblity for old-style aggregates.
Per deprecation timeline.
2015-09-23 19:31:10 -04:00
Claude Paroz c9a02bc8f5 Fixed #25448 -- Eased GISLookup subclassing with custom lookups
When someone needs to build a custom backend-specific GIS lookup, it
is much easier done if getting the spatial operator class happens in
a dedicated method (no need to rewrite the entire as_sql() method).
2015-09-23 22:01:56 +02:00
Alex Hill 134ca4d438 Fixed #24509 -- Added Expression support to SQLInsertCompiler 2015-09-22 23:35:24 +10:00
Jani Tiainen fcf494b48f Fixed #24688 -- Added Oracle support for new-style GIS functions. 2015-09-21 13:52:14 -04:00
Daniel Hahler da5747f8e4 Fixed #25400 -- Fixed regression in nonexistent features on gis backends. 2015-09-17 09:30:46 -04:00
Jani Tiainen 1b8d7eff3b Refs #12400 -- Added supports_geometry_field_unique_index GIS db feature. 2015-08-19 19:02:30 -04:00
Caio Ariede ec9004728e Fixed #25175 -- Renamed the postgresql_psycopg2 database backend to postgresql. 2015-08-07 09:33:17 -04:00
Tim Graham 7da3923ba0 Sorted imports in __init__.py files. 2015-06-27 11:53:33 -04:00
Greg Chapple 4a66a69239 Fixed #24887 -- Removed one-arg limit from models.aggregate 2015-06-27 11:44:33 -04:00