Commit Graph

270 Commits

Author SHA1 Message Date
Jannis Leidel bef353873e Fixed plural forms of Bosnian translation introduced in r15680.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15749 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-04 01:03:14 +00:00
Russell Keith-Magee afd040d4d3 Updated test assertions that have been deprecated by the move to unittest2. In summary, this means:
assert_ -> assertTrue
 assertEquals -> assertEqual
 failUnless -> assertTrue

For full details, see http://www.voidspace.org.uk/python/articles/unittest2.shtml#deprecations

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15728 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-03 15:04:39 +00:00
Russell Keith-Magee d1290b5b43 Fixed #3094 -- Accelerated deprecation of XMLField, since it hasn't served any useful purpose since oldforms. Thanks to PaulM for driving the issue and providing the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15723 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-03 13:28:20 +00:00
Jannis Leidel f7c9d77134 Updated gis translations from transifex.net. Refs #15300.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15689 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-01 09:04:19 +00:00
Russell Keith-Magee 01c42cbb99 Fixed #15358 -- Renamed a test to avoid a naming collision. Thanks to mila for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15598 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-20 23:43:55 +00:00
Russell Keith-Magee 7536f63b32 Fixed #14768 -- Added an es_MX locale and initial translation. Thanks to Alonso Bautista Villalobos and the rest of the Mexican translation team.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15433 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-06 06:06:29 +00:00
Justin Bronn 553adfa6d1 Fixed #13488 -- No longer generate unhandled exceptions that may occur when destructors of global GEOS I/O objects are called on process termination.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15378 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-31 20:11:19 +00:00
Jannis Leidel f8cf6c8364 Added new translation files to gis contrib app.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15265 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-21 18:39:05 +00:00
Justin Bronn 5fddfda559 Fixed #13788 -- `GEOSGeometry.transform` no longer silently no-ops when GDAL isn't available. Thanks, Rob Coup.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15025 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-22 17:43:30 +00:00
Justin Bronn d66ab474f3 Fixed #10420 -- GeoDjango tests are run as part of Django tests when using spatial database backends with `runtests.py`.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15013 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-21 23:42:12 +00:00
Russell Keith-Magee 673e6fc7fb Fixed #11675 -- Added support for the PyLibMC cache library. In order to support this, and clean up some other 1.3 caching additions, this patch also includes some changes to the way caches are defined. This means you can now have multiple caches, in the same way you have multiple databases. A huge thanks to Jacob Burch for the work on the PyLibMC backend, and to Jannis for his work on the cache definition changes.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15005 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-21 15:19:19 +00:00
Justin Bronn 0f879195a6 GeoDjango test suite housekeeping. Moved data into fixtures for `relatedapp` and `distapp` tests, and made both use Django's `TestCase`; moved functionality out of `GeoDjangoTestSuiteRunner` to allow future re-use in `runtests.py` (refs #10420); compressed test app fixtures and cleaned up imports.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14776 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-02 05:58:21 +00:00
Alex Gaynor 21f5dc467e Fixed a bug in date queries with GIS backends introduced in [14715].
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14760 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-01 17:53:22 +00:00
Justin Bronn 7592d68541 Now possible to run the GeoDjango test suite with a minimal settings file. Refs #10420, #14439.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14653 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-20 23:54:59 +00:00
Justin Bronn cab434e011 Fixed #14653 -- Removed vestigal `getstatusoutput` from GeoDjango utils.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14508 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-09 17:39:01 +00:00
Justin Bronn 0b2fef5dd3 Fixed brittle test case for `GEOSGeometry.valid_reason`.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14476 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-06 16:41:53 +00:00
Justin Bronn 6c85a44416 Fix for running GEOS/GDAL tests on Python 2.6 and below.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14474 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-06 16:29:19 +00:00
Justin Bronn cabc21ca60 Fixed #14318 -- Added `GEOSGeometry.valid_reason` property. Thanks, Rob Coup.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14447 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-04 01:29:37 +00:00
Justin Bronn d8e311c8d1 Updated OpenLayers (now points to 2.10) and OpenStreetMap JavaScript URLs.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14445 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-02 19:31:14 +00:00
Justin Bronn 1ee4274ff1 Fixed some a stale location and whitespace in GeoIP tests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14416 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-01 22:18:22 +00:00
Justin Bronn 315ae1ce6e Fixed regression introduced in r13755 that prevented the running of the GEOS/GDAL test suites without configuring Django settings; moved reference geometry data from Python module to compressed JSON fixture; put in workaround in tests for GDAL bug #3783.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14414 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-01 21:56:48 +00:00
Russell Keith-Magee ccc49029b8 Fixed #14181 -- Added a template tag and filters to allow localization to be disabled in a template. Thanks to Benjamin Wohlwend for the work on the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14395 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-29 16:48:58 +00:00
Justin Bronn eccc42a8c7 Fixed #13617 -- `OSMGeoAdmin` now works again when `USE_L10N` (or `LANGUAGE_CODE`) is set. Thanks, Federico Hlawaczek, for workaround and piquadrat for patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14341 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-24 09:39:47 +00:00
Justin Bronn 120aae2209 Enabled area calculations for geography columns.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14189 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-12 17:13:27 +00:00
Luke Plant e0ec458360 Fixed #14433 - replaced a thread-unsafe solution to #10235 introduced in [13980]
This patch also addresses sitemap code found in contrib/gis, which [13980]
did not.

Thanks to gabrielhurley for the initial patch.

Refs #10235, #14386

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14141 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-11 14:34:42 +00:00
Russell Keith-Magee 121d2e3678 Fixed #12991 -- Added unittest2 support. Thanks to PaulM for the draft patch, and to Luke, Karen, Justin, Alex, Łukasz Rekucki, and Chuck Harmston for their help testing and reviewing the final patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14139 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-11 12:55:17 +00:00
Russell Keith-Magee 1070c57b83 Fixed #14436 -- Escalated 1.2 PendingDeprecationWarnings to DeprecationWarnings, and removed 1.1 deprecated code.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14138 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-11 12:20:07 +00:00
Russell Keith-Magee a904e55859 Fixed #11509 -- Modified usage of "Web" to match our style guide in various documentation, comments and code. Thanks to timo and Simon Meers for the work on the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14069 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-09 08:12:50 +00:00
Luke Plant 667d832e90 Fixed #14386, #8960, #10235, #10909, #10608, #13845, #14377 - standardize Site/RequestSite usage in various places.
Many thanks to gabrielhurley for putting most of this together.  Also to
bmihelac, arthurk, qingfeng, hvendelbo, petr.pulc@s-cape.cz, Hraban for
reports and some initial patches.

The patch also contains some whitespace/PEP8 fixes.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@13980 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-04 14:20:47 +00:00
Justin Bronn ea07fe7a3f Fixed a geographic sitemaps regression introduced in r13876.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13879 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-27 00:20:42 +00:00
Jannis Leidel 1df1378f9e Fixed #13827 -- Cleaned up a few unnecessary function calls.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13876 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-26 21:36:22 +00:00
Justin Bronn 553374b55d Fixed #14060 -- PostGIS never implemented the `~=` operator for geography types, so removed support for it.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13757 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-12 02:07:04 +00:00
Justin Bronn f6074506fd Fixed regression in running the GeoDjango test suite after r13670 with addition of `GeoDjangoTestSuiteRunner` (replaces `run_gis_tests`, which is now a stub).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13755 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-12 01:40:42 +00:00
Russell Keith-Magee 6909c22663 Fixed #13798 -- Added connection argument to the connection_created signal. Thanks to liangent for the report, and Alex Gaynor for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13672 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-08-30 13:21:18 +00:00
Justin Bronn aaa5dfbf53 Fixed #13967 -- MySQL spatial backend now respects when `spatial_index=False`. Thanks, Simon Law, for bug report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13443 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-07-21 15:23:18 +00:00
Justin Bronn 87a60e28cc Fixed #13934 -- `GeoSQLCompiler.get_default_columns` was missing `local_only` keyword argument. Thanks, Simon Law, for bug report and initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13439 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-07-20 19:05:46 +00:00
Justin Bronn 096c465358 Fixed #13779 -- Can now discover GDAL 1.7 from debian-based packages. Thanks to Leo for bug report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13396 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-06-23 17:17:22 +00:00
Justin Bronn 33d4aa8df1 Removed duplicated code from `django.contrib.gis.db.backend` and added a deprecation note about the module.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13103 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-05-05 16:06:39 +00:00
Justin Bronn 402f8cede5 Fixed #13315, #13430 -- Recreated `django.contrib.gis.db.backend` module with `SpatialBackend` alias and added `Adaptor` alias for backwards-compatibility purposes; added GeoDjango 1.2 backwards-incompatibility documentation and release notes; added a section in the docs about how MySQL is a crippled spatial database; updated versions in install docs.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13097 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-05-04 21:43:40 +00:00
Justin Bronn 1ad9c36fb8 Fixed #11810 -- Fixed typo and errors that prevented `modifiable` from working in the geographic admin. Thanks to Rob Coup for the bug report. Refs #12504.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12995 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-16 16:34:42 +00:00
Justin Bronn 82b8b67446 Fixed #9437 -- Now close the connection after getting the PostGIS version during spatial backend initialization.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12948 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-11 18:59:03 +00:00
Justin Bronn 7d5c7df6a9 Fixed #13256 -- `OGRGeometry` no longer raises an exception when compared to instances of different types. Thanks, ninowalker for the bug report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12905 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-01 16:56:55 +00:00
Justin Bronn 2fa2cf0a09 No longer use the deprecated GEOS C API function `GEOSGeomFromWKB_buf` when unpickling `GEOSGeometry` objects.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12898 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-31 18:55:52 +00:00
Justin Bronn 7bdb9a90d0 PostGIS 1.5 allows distance queries on non-point geographic geometry columns with `ST_Distance_Sphere`, enabled this functionality.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12890 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-30 23:15:43 +00:00
Justin Bronn 539cfe8cb7 Fixed #8904 -- Improved error message when spatial lookup is not available, and changed exception to `ValueError` to prevent swallowing of error on queryset evaluation.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12887 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-30 01:13:47 +00:00
Justin Bronn 7e5265785a Fixed #10594 -- `GeoQuerySet` measurment methods no longer crash on geometry fields with NULL values. Thanks, whiteinge for the bug report and yourcelf for the initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12885 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-29 22:20:38 +00:00
Justin Bronn 381b10c2c6 Added another GDAL bug workaround for retrieving the correct coordinate dimension on geometry collections. Refs #12312.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12883 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-29 21:56:01 +00:00
Justin Bronn 85fa7d8894 Fixed #13070 -- Introduced fallback code to detect SpatiaLite 2.3.0 versions (which do not have `spatialite_version` function).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12882 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-29 19:40:59 +00:00
Justin Bronn 85e13681b0 Fixed #11785 -- Clarified error message when the layer geometry type doesn't match the model field. Thanks, esizikov for bug report and initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12880 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-29 18:33:23 +00:00
Justin Bronn 87302ac009 Fixed #12312 -- Set the coordinate dimension on each component of geometry collections after transform (refines GDAL bug workaround introduced in r11628). Thanks, yourcelf for bug report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12878 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-29 17:33:59 +00:00
Justin Bronn 9b50ec81a3 Peform smarter version detection of GDAL so development versions are supported.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12852 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-25 20:00:27 +00:00
Karen Tracey 9fab1467c7 Removed more stray tabs in Python files.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12616 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-27 16:30:27 +00:00
Justin Bronn dc1ad69f30 Fixed #11353 -- `GeometryProxy` descriptor no longer chokes when accessed from a class rather than an instance, thanks yml and Tobu; removed unnecessary imports from `types` and cleaned up whitespace.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12584 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-24 21:20:02 +00:00
Justin Bronn 0741fb6507 Fixed geographic feed test failure due to `Rss201rev2Feed` additions in r12338.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12357 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-29 18:07:49 +00:00
Justin Bronn 901b60e7e1 Now look for `DatabaseError` during PostGIS backend initialization, as it is now raised instead of a `ProgrammingError` after changes in r12352.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12354 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-29 17:58:55 +00:00
Justin Bronn 72c39410c8 Renamed `reverse` to `reverse_geom` because of clash with existing `QuerySet` method; added `GeoQuerySet.geohash` support for producing GeoHash reprsentations.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12350 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-29 02:46:07 +00:00
Justin Bronn 5b21033847 Added `reverse` and `force_rhr` methods to `GeoQuerySet`. Refs #12416.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12349 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-29 02:20:58 +00:00
Justin Bronn ff6b44980a `GeoQuerySet.distance` now allows calculations to/from non-point geodetic geometry fields as allowed on PostGIS 1.5.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12312 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-27 23:09:46 +00:00
Justin Bronn 9a8449afe1 Fixed #12605 -- Removed redundant import of `ImproperlyConfigured`. Thanks, tmcw.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12310 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-27 18:55:36 +00:00
Justin Bronn 14acace029 Fixed #12706 -- Forgot to pass `using` kwarg in parent class initialization of `GeoQuerySet`. Thanks, albsen.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12309 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-27 16:24:48 +00:00
Justin Bronn b0d218e9e2 `OGRGeometry` objects may now be pickled.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12303 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-27 03:47:37 +00:00
Justin Bronn 25f47bbbb6 Applied DRY and centralized geometry input regular expressions; `OGRGeometry` may now consume and output EWKT.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12302 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-27 03:32:30 +00:00
Justin Bronn f9f04a49e8 Got rid of Python 2.3 compatibility global, and thus `OGRGeomType` import wrapping with try/except no longer necessary.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12301 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-27 03:01:13 +00:00
Justin Bronn 474ce51ffd Fixed #12690 -- Fixed SQL template used for Oracle's with `SDO_RELATE` function, added `truncate_params` attribute to spatial backend, and re-enabled the `relate` lookup tests. Thanks, jtiai, for the bug report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12300 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-26 17:32:11 +00:00
Justin Bronn 5ec44450df Modified `GeoManager.get_query_set` to reflect changes made for database routing in r12272.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12275 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-22 18:30:23 +00:00
Russell Keith-Magee 1b3dc8ad9a Fixed #12540, #12541 -- Added database routers, allowing for configurable database use behavior in a multi-db setup, and improved error checking for cross-database joins.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12272 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-22 14:30:06 +00:00
Justin Bronn 6b659270d6 Fixed problems associated with the `GeometryField` SRID cache: it is now keyed by the connection alias rather than the spatial backend name (e.g., `spatial_ref_sys` tables may have different entries, even if backend is the same), explicitly pass in connection alias to `SpatialRefSys` query to ensure correct entry is retrieved, and removed unused code from `GeometryField.get_distance`. Thanks, Josh Livni, for the bug report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12258 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-18 21:49:13 +00:00
Justin Bronn a1fbc0dc36 Fixed #12637 -- GeoDjango's `inspectdb` command is now a subclass of Django's, and works with all spatial backends (Oracle and SpatiaLite did work before). This changeset introduces new introspection modules for all of the spatial backends and adds hooks to the original `inspectdb.Command` class to enable reuse.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12257 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-18 21:02:47 +00:00
Justin Bronn 19fad16414 Fixed #12591 -- Renamed `add_postgis_srs` to `add_srs_entry` (keeping backwards-compatible alias), added `database` keyword for multi-db, removed deprecated `SpatialBackend` references; no longer use `get_or_create` and look for existing entry based on SRID value.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12228 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-14 17:43:46 +00:00
Justin Bronn 32e0117abb Fixed #10923 -- The GEOS bindings now use the thread-safe API, when applicable. Thanks, Tuure Laurinolli, for assistance in developing this patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12214 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-12 18:40:54 +00:00
Adrian Holovaty 5ceed0a053 Changed a whole bunch of places to raise exception instances instead of old-style raising exception classes plus a comma. Good for the future Python 3 conversion
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12180 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-10 18:36:20 +00:00
Justin Bronn 89ded975fe Fixed #12479 -- Pass in connection argument to `as_sql` in `GeoSQLCompiler.get_columns`. Thanks, jpwatts, for bug report and initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12083 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-04 02:37:46 +00:00
Justin Bronn f2d0ae93f8 Fixed problem in which SpatiaLite library would not be loaded for the connection under certain circumstances, e.g., when using the geographic admin. Thanks, jtiai, for the bug report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12037 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-01 10:36:22 +00:00
Justin Bronn c35868ab9b Fixed #12468 -- Use the `DatabaseOperations` class from the `postgresql_psycopg2` backend as the base class for `PostGISOperations`. Thanks, drdaeman, for bug report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12033 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-31 08:03:50 +00:00
Justin Bronn ca64e9d85f Fixed #12458 -- no longer use try/except/finally syntax in PostGIS and SpatiaLite backends as it's incompatible with Python 2.4. Thanks, knutin, for bug report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12026 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-29 11:18:35 +00:00
Justin Bronn 2b9d216ffc When `GEOSFree` is not available on NT platforms, have to specifically use the MS C library.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12024 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-29 10:39:08 +00:00
Justin Bronn a488589461 Fixed #12344 -- Using `select_related()` on geographic fields with the Oracle spatial backend now works.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12022 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-29 10:18:56 +00:00
Justin Bronn 4ab21fbf40 Fixed `GeoManager.get_query_set` incompatibility with `db_manager` method.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12021 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-29 09:57:37 +00:00
Justin Bronn 1d581cda67 Fixed #11609 -- The `check_pointer` error checking routine and `GDALBase._set_ptr` are now able to handle the long pointer addresses used by some x86_64 platforms. Thanks, rmkemker, for the bug report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12006 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-27 09:06:33 +00:00
Justin Bronn f58fb383fb Fixed #12450 -- `GEOSFree` was really added in GEOS 3.1.1, not 3.1.0. Thanks, jpwatts for the bug report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12004 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-27 08:07:08 +00:00
Justin Bronn ac6273d675 Fixed `LayerMapping` to work with PostGIS geography fields; removed `LayerMapping.geometry_column` and replaced with `LayerMapping.geometry_field` because getting the `geometry_columns` entry was completely unnecessary, and only the geometry field instance is needed; cleaned up and fleshed out the `geogapp` tests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11983 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-25 14:37:57 +00:00
Justin Bronn 9b8e90f937 Yes, Virginia, `ST_MakeLine` really exists in PostGIS 1.3 and above.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11981 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-24 15:07:53 +00:00
Justin Bronn 474fb8c3ae Fixed #12438 -- now use `GEOSFree` to free string pointers allocated within GEOS when available; now parse out subminor version, and added a `GEOS_VERSION` tuple.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11979 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-24 14:53:51 +00:00
Justin Bronn e1f6b4b82f Added tests for PostGIS geography support; added `proj_version_tuple` to PostGIS spatial backend operations; made `distapp` tests take into account different datums in PROJ.4 4.7; and added svn:ignore properties for recently-added directories.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11971 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-23 20:45:08 +00:00
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