Commit Graph

136 Commits

Author SHA1 Message Date
Russell Keith-Magee ff60c5f9de Fixed #1142 -- Added multiple database support.
This monster of a patch is the result of Alex Gaynor's 2009 Google Summer of Code project.
Congratulations to Alex for a job well done.

Big thanks also go to:
 * Justin Bronn for keeping GIS in line with the changes,
 * Karen Tracey and Jani Tiainen for their help testing Oracle support
 * Brett Hoerner, Jon Loyens, and Craig Kimmerer for their feedback.
 * Malcolm Treddinick for his guidance during the GSoC submission process.
 * Simon Willison for driving the original design process
 * Cal Henderson for complaining about ponies he wanted.

... and everyone else too numerous to mention that helped to bring this feature into fruition.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@11952 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-22 15:18:51 +00:00
Jacob Kaplan-Moss 574eafe4c0 Fixed #11753 - Q objects with callables no longer explode on Python 2.4. Thanks, Jeremy Dunck.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11901 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-17 22:06:41 +00:00
Justin Bronn fed3081caf Fixed #12390 -- `Distance` and `Area` objects now support multiplication when they are the right-hand side.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11898 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-17 18:21:30 +00:00
Karen Tracey 833df0afaa Fixed #12385: Made built-in field type descriptions in admindocs translatable again. Many thanks to Ramiro for the problem report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11878 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-16 18:13:34 +00:00
Karen Tracey 0986a4d2e1 Fixed #7977: Fixed admindocs to use docstrings instead of a static array to locate type information.
Thanks J. Clifford Dyer.



git-svn-id: http://code.djangoproject.com/svn/django/trunk@11833 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-12 20:25:41 +00:00
Russell Keith-Magee ce7c61d61e Refs #11109 -- Touched some whitespace so Trac will display some files correctly.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11785 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-02 00:30:00 +00:00
Justin Bronn cd0d7e676d As promised, removed the `_DeprecatedTestModule` and its instances.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11743 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-17 02:13:26 +00:00
Justin Bronn 32d0730b89 Fixed #11433 -- 3D geometry fields are now supported with PostGIS; EWKB is now used by `PostGISAdaptor`.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11742 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-16 18:49:00 +00:00
Justin Bronn c169f8cb17 `OGRGeomType` now recognizes 2.5D types, and removes need for unnecessary workaround in `Layer.geom_type`; corrected geometry type in test VRT file. Refs #11433.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11739 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-14 23:25:44 +00:00
Justin Bronn 3f8f3f8411 Now raise an exception when trying to export 3D (HEX)EWKB when using GEOS 3.0 due to bug in that underlying library version.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11731 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-10 17:28:20 +00:00
Justin Bronn ef65854a77 Fixed a brittle test case that was failing on PostGIS versions < 1.4.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11729 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-10 03:51:05 +00:00
Justin Bronn 36fe303e35 Added `ewkb` and `hexewkb` properties to `GEOSGeometry`. Refs #11433, #12010.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11728 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-10 03:35:25 +00:00
Justin Bronn f3bb5276e0 Added support for spatially filtering what OGR features are returned in iteration via the `Layer.spatial_filter` property.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11727 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-10 01:54:35 +00:00
Justin Bronn 562d5d8a28 Fixed #12111 -- now use PostgreSQL escape string syntax when quoting WKB to prevent spurious warnings in database logs. Thanks, Matt Russell for ticket and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11726 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-08 00:51:42 +00:00
Justin Bronn 8287c27b18 Fixed #12101 -- `OGRGeometry` does not need to create a clone of the `SpatialReference` object upon assignment.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11707 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-03 06:16:09 +00:00
Justin Bronn be89c9abab Fixed #12093 -- `LayerMapping` now takes into account model inheritance when looking for the geometry column; forgot to diable extent regression test on MySQL.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11703 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-02 02:17:56 +00:00
Justin Bronn 69535b7b13 The `OGRGeometry.coord_dim` property may now be set; implemented a work-around for an OGR bug that changed geometries to 3D after transformation. Refs #11433.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11628 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-10-17 17:32:25 +00:00
Justin Bronn 62180a6b44 Fixed #11827: Can now calculate extent in Oracle on tables with one point.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11577 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-09-13 17:40:46 +00:00
Justin Bronn 1aef132090 Fixed #11624: `render_to_kmz` no longer balks on non-ASCII data.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11527 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-09-12 18:35:08 +00:00
Matt Boersma e263cc0dc5 Fixed #11049: introspection on Oracle now identifies IntegerFields correctly.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11475 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-08-21 21:42:39 +00:00
Justin Bronn 1707304bad Fixed test cases and `GeoQuerySet.geojson` to support PostGIS 1.4.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11340 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-27 04:21:31 +00:00
Justin Bronn 53b8809277 Fixed #11489 -- `GeoQuery.resolve_columns` now recognizes annotations; disabled problematic test cases on Oracle and added notes on why.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11251 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-16 22:38:22 +00:00
Justin Bronn 9c5075d125 Forgot to add `collect` to `GeoManager`.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11232 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-15 02:20:51 +00:00
Justin Bronn 33ea28c2b2 Forgot to add the `collect` GeoQuerySet method to correspond to the `Collect` aggregate object; also added tests for this operation.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11227 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-11 20:34:27 +00:00
Justin Bronn 55968a6edd Fixed GEOS & GDAL C function prototypes to explicitly use a subclass of `c_char_p` as the return type on routines that return strings. This prevents crashes on some 64-bit platforms, like FreeBSD. Thanks to wilsaj for discovering the problem. Refs #9747.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11205 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-09 02:00:40 +00:00
Justin Bronn 422adffa11 Fixed #11401 -- Update geographic admin to use OpenLayers 2.8 as OpenStreetMap does not support previous versions. Thanks, yourcelf for ticket and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11125 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-29 17:49:01 +00:00
Justin Bronn cb9cf01ff2 Fixed #11249, #11261 -- Blocks may now be overridden again `google-map.js` template; now use GMaps `setUIToDefault` to use default controls. Thanks to ludifan and Peter Landry for the ttickets and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11124 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-29 17:17:45 +00:00
Justin Bronn fdcc0c774a Fixed #11381 -- `GeoManager` + `select_related` + nullable `ForeignKey` now works correctly. Thanks, bretthoerner for ticket and dgouldin for initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11123 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-29 16:31:21 +00:00
Justin Bronn 694a15ef72 Fixed support for GDAL 1.6 on Windows. Thanks to jtia for spotting this.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10985 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-12 17:16:49 +00:00
Justin Bronn 4cb4086b2a Fixed #11245, #11246 -- Fixed validity check of `GeoIP` pointers and leaking of their references; also clarified initialization, fixed a stale test, added comments about version compatibility, and did some whitespace cleanup.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10979 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-11 02:45:46 +00:00
Justin Bronn be907bcdcb Fixed #11087 -- Fixed the `Count` annotation when used with `GeoManager`. Thanks to dgouldin for ticket and initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10912 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-03 04:49:16 +00:00
Justin Bronn 1ed5d8fc39 Fixed #11200 -- Now use a `set` data structure for `GoogleMap` icons so that they aren't repeated in rendered JavaScript. Thanks to ludifan for ticket and initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10865 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-30 16:10:23 +00:00
Gary Wilson Jr bd58a3972b Fixed #11216 and #11218 -- Corrected a few typos, thanks buriy.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10861 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-29 04:35:10 +00:00
Karen Tracey 50745cc31e Fixed #11066 -- Corrected 15 duplicate "the"s found in docs and code comments. Thanks kaikuehne.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10801 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-17 16:45:28 +00:00
Justin Bronn cb5e8e29f0 Removed module-level imports from `django.test` -- this prevented running the GEOS, GDAL tests from outside a Django environment (e.g., when there's no `settings.py`).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10665 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-02 16:17:36 +00:00
Brian Rosner 03047d4037 Added a missing ASCII 32 in a GIS form field error message. Thanks Alex Gaynor for catching it.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10650 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-30 20:12:24 +00:00
Justin Bronn d2c4c02251 Fixed #10872 -- Geographic admin now supports new `list_editable` option. Thanks to Dane Springmeyer and Alex Gaynor for the solution.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10636 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-26 06:08:26 +00:00
Justin Bronn 1269f9a3e9 Fixed #9299 -- Made default zoom level for points in the admin more sensible. Thanks to oyvind for ticket and initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10635 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-26 06:01:59 +00:00
Justin Bronn 66db0b43ad Fixed #10660 -- `GeometryField` no longer requires `srid`/`null` keywords, and now respects `required`; coordinate transformations now done inside `gis.forms.GeometryField` -- benefit being that `OSMGeoAdmin` no longer requires 900913 entry in `spatial_ref_sys` thus enabling it to work with MySQL/Oracle spatial backends; added tests for geographic forms.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10634 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-25 18:24:32 +00:00
Justin Bronn 8010e0c32e Removed references to deprecated `GeometryField` atribute in `GeoModelAdmin`.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10633 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-24 20:34:48 +00:00
Justin Bronn 44c062344f Fixed #10888 -- May now insert NULL `GeometryField` values on Oracle.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10631 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-24 20:24:50 +00:00
Justin Bronn 037ce4318b Fixed #10839 -- `GeoQuery` now unpickles properly on Oracle.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10615 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-21 22:35:04 +00:00
Justin Bronn bfe36750b1 Fixed #10364 -- Correctly identify test spatial database creation errors to the user.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10603 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-19 23:31:14 +00:00
Justin Bronn be11bd40d4 Fixed #10832 -- now use `reorder_suite` in GeoDjango test runner, thanks seanl for ticket & patch; restored original ordering of GEOS tests, as placing last no longer necessary.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10602 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-19 23:07:24 +00:00
Justin Bronn aeaba06bf4 Fixed #10791 -- The GeoDjango test runner now respects the `--noinput` command-line option, thanks to seanl for ticket & patch; replaced docstring with URL to latest documentation.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10601 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-19 22:49:15 +00:00
Justin Bronn ff9b9e530c Fixed #9620 -- `GeometryColumns` and `SpatialRefSys` models now play nice with the `AppCache` routines.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10579 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-16 22:25:01 +00:00
Justin Bronn 4eaf4155f8 Fixed #10836 -- Forgot to move import to to `where` module. Thanks, seanl for ticket & patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10572 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-16 14:16:16 +00:00
Justin Bronn bd8afb1894 Fixed #10807 - `GeoWhereNode` no longer passes `Constraint` objects to where they shouldn't go.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10559 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-14 19:14:32 +00:00
Adrian Holovaty ffd7b177c9 Added experimental support for a POSTGIS_VERSION setting for GeoDjango. If set, it will tell GeoDjango not to do the postgis_lib_version() query every time the server starts up (assuming a PostGIS backend). This is intentionally undocumented because Justin mentioned he might be refactoring the backends for Django 1.2 such that this setting would be unnecessary. Until then, people can use this hook.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10549 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-12 07:19:56 +00:00
Justin Bronn d7870d3444 Upgraded SpatiaLite default initialization SQL file name for 2.3 release.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10527 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-11 22:31:28 +00:00