Commit Graph

492 Commits

Author SHA1 Message Date
Justin Bronn 771fce45b4 Fixed #17212 -- Made GEOS version regular expression more robust. Thanks, strk.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17682 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-12 17:09:18 +00:00
Ramiro Morales ecc8208f88 Removed executable bits from some files that don't need them.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17673 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-09 12:13:31 +00:00
Jannis Leidel 2002ed9e09 Updated gis base translation files with new strings. Refs #17822.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17661 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-05 02:24:14 +00:00
Carl Meyer b9bf7cce89 Fixed #15169 -- Added conversion of 0/1 to False/True for MySQL GIS backend. Thanks zmsmith for report, and Ramiro for draft patch and review.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17632 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-02 22:32:22 +00:00
Adrian Holovaty 2ade1e916f Edited stuff from [17543] to [17629]
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17630 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-02 17:16:52 +00:00
Ramiro Morales ae640e5ea0 Fixed #17796 -- Rolled back [17588] because the fix for the original relatively
corner case (boolean fields under MySQL spatial backend) had a wider scope with
potentially unintended consequences affecting the main MySQL backend and the
required changes wouldn't be appropiate at this point of the 1.4 development
cycle.

Refs #15169.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17603 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-29 17:46:23 +00:00
Ramiro Morales d96ffa130e Added file missed in r17588.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17589 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-26 16:19:40 +00:00
Ramiro Morales 9f6859e1ea Fixed #15169 -- Corrected handling of model boolean fields in MySQL spatial backend.
Thanks goes to zmsmith and others for reporting the issue and to Justin Bronn for the fix.

Refs #7190, r12578, r12900, #13293, r12939.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17588 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-26 14:35:46 +00:00
Carl Meyer 354c84d277 Fixed #17678 -- Corrected setup of _meta.proxy_for_model and added _meta.concrete_model. Thanks Anssi Kääriäinen.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17573 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-22 05:26:50 +00:00
Ramiro Morales 4b81d790a8 Updated SpatiaLite GeoDjango test setup instructions for version 3.0.
Also, fixed documentation typos introduced in r17496.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17507 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-11 18:01:53 +00:00
Ramiro Morales d72d5ce827 Fixed #16409 (again, this time for GeoDjango).
Thanks Aymeric Augustin for the regression test and Petr Gorodechnyj for
the patch.

Refs r16522.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17506 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-11 13:50:27 +00:00
Ramiro Morales 5a4e63e62a Removed code duplicated in SQLite3 and SpatiaLite GeoDjango DB backends.
Moved it to an auxiliary method in the SQLite3 backend cursor class.
Did this to reduce the chances of us forgetting to port changes in DB
connection setup process from the former to the latter one like it
happened e.g. in r17205.

Refs #17258.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17499 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-11 03:09:54 +00:00
Ramiro Morales c406b554c7 Added, documented support for SpatiaLite 3.0 to GeoDjango.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17496 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-11 00:40:18 +00:00
Jannis Leidel 170e5d5f74 Fixed #17458 -- Marked Http404 error messages for translation. Thanks, Claude Paroz.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17447 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-04 21:01:11 +00:00
Jannis Leidel 4c376852fe Updated English base translation files in preparation of the alpha release so Transifex can pick them up.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17250 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-22 23:02:28 +00:00
Adrian Holovaty 20c8aa2a20 Fixed various dodgy behaviours
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17226 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-17 17:37:24 +00:00
Adrian Holovaty 8767439af4 Converted some of the built-in views to use content_type instead of mimetype HttpResponse argument. Refs #16519
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17223 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-17 03:53:25 +00:00
Aymeric Augustin d0eb4693ab Fixed #15255 -- Ensured createcachetable honors database routers.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17114 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-19 19:56:31 +00:00
Aymeric Augustin 01964fd7e4 Fixed an obsolete comment.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17060 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-31 18:54:24 +00:00
Justin Bronn 01f4ce4c49 Fixed #17059 -- Encode `GeoIP` query strings properly so `libGeoIP` returns results for unicode strings.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17019 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-20 20:08:33 +00:00
Alex Gaynor 66210cbc70 Remove a great many of the remaining relative imports.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17008 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-17 18:45:22 +00:00
Carl Meyer f91af72523 Fixed #16353 -- don't try to create Site objects on all databases. Refs #15573, #15346. Thanks Aymeric Augustin for the report and the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16868 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-21 22:46:48 +00:00
Justin Bronn e5aeba018f Updated geoadmin tests to reflect that OSM js is no longer required as of r16847.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16853 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-18 22:28:17 +00:00
Justin Bronn 1ec25c4fb7 OpenLayers has had built-in OSM support since 2.10, no need for extra JS.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16847 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-17 23:01:46 +00:00
Justin Bronn 30745b2e65 Updated the geographic admin to use OpenLayers 2.11.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16846 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-17 20:06:00 +00:00
Justin Bronn 3ac877840a Fixed #15277 -- Cleaned up `ogrinspect` command, added tests and extended support beyond file-based OGR data sources. Thanks, willinoed for bug report and jpaulett for initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16845 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-17 19:54:52 +00:00
Justin Bronn f97a574196 Fixed #16864 -- WKT regex now allows negative SRIDs. Thanks, Marcel Dancak for bug report and initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16843 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-16 21:19:30 +00:00
Justin Bronn 67e05fcd39 Fixed #16778 -- Improved escaping of geometries on PostgreSQL, allowing GeoDjango to work on 9.1. Thanks, piro for ticket and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16826 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-13 20:43:33 +00:00
Ramiro Morales 26b8122087 Fixed #14675 -- Completed removal of `from django.conf.urls.default import *` usage.
This applies to both our own [test] code and documentation examples. Also:
 * Moved the functions and handlers from `django.conf.urls.defaults` up to
   `django.conf.urls` deprecating the former module.
 * Added documentation for `handler403`.
 * Tweaked the URLs topic document a bit.

Thanks to pupeno and cdestigter for their great work contributing patches.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16818 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-11 22:36:16 +00:00
Justin Bronn 28cb5bf162 Fixed #16231 -- Added support for GML and KML on the SpatiaLite backend. Thanks, steko for the bug report and jpaulett for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16800 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-11 00:52:08 +00:00
Justin Bronn a25413bf86 Fixed #15305 -- Made `Count` aggregate and `.values()` play nice together on `GeoQuerySets`. Thanks, vrehak for the bug report and milosu for initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16797 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-11 00:00:15 +00:00
Justin Bronn 2918c3de74 Fixed #14648 -- Fixed annotated date querysets when `GeoManager` is used. Thanks, codysoyland, for the bug report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16796 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-10 22:53:26 +00:00
Justin Bronn 05e29716b4 Fixed #16553 -- Refactored the `GeoIP` module, moving it `django.contrib.gis.geoip`; fixed memory leaks, and encoding issues.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16783 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-10 18:04:27 +00:00
Justin Bronn 36120f41a9 Fixed #16537 -- Fixed multi-db issues with GeoDjango utilities. Thanks, Shane Shifflett for the bug report and aaugustin for the initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16779 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-10 17:19:05 +00:00
Justin Bronn eaea9deca8 Fixed #16790 -- Modified the geographic admin to work after r16594. Thanks, jdiego, for the bug report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16775 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-10 03:04:30 +00:00
Justin Bronn 0516ac3d28 Fixed #13670 -- Comparisons with the spatial adapter won't blow up in some corner cases. Thanks, milosu for the bug report and jpaulett for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16757 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-10 00:29:34 +00:00
Justin Bronn c4d8b4c0b2 Removed extra call to `syncdb` that slipped in with r16749.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16750 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-09 22:47:18 +00:00
Justin Bronn 43329af2e3 Fixed #16408 -- Fixed conversion of dates, and other problems with the SpatiaLite backend.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16749 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-09 22:34:23 +00:00
Justin Bronn 6273db307e Fixed a brittle test in the `LayerMapping` tests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16741 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-09 19:51:06 +00:00
Jannis Leidel cb1d660962 Fixed #16387 -- Disabled localization in openlayers template. Thanks, claudep.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16600 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-12 14:14:33 +00:00
Jannis Leidel bce890ace4 Fixed #16584 -- Fixed a bunch of typos in code comments. Thanks, Bernhard Essl.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16598 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-12 14:14:15 +00:00
Jannis Leidel dc2bfae1e5 Fixed #16531 -- Fixed various instances of "undefined name" issues. Thanks, Bruno Renié.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16557 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-29 09:39:35 +00:00
Jannis Leidel 12b7c2a702 Fixed #15707 -- Made the GIS feed compatible to the class based feeds and introduced a little helper view that works like the previous feed view in the syndication app which was removed in r15976.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16540 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-13 09:36:07 +00:00
Jannis Leidel 24f4764a48 Fixed #16225 -- Removed unused imports. Many thanks to Aymeric Augustin for the work on the patch and Alex for reviewing.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16539 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-13 09:35:51 +00:00
Jannis Leidel 89c302cf3f Rolled back r16510, r16513 and r16514 because it wasn't ready.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16515 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-05 14:16:37 +00:00
Jannis Leidel 6de65ab76f Fixed #15255 -- Stopped database cache from ignoring database routers when creating the cache table. Thanks, aaugustin.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16510 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-04 21:53:17 +00:00
Justin Bronn a34e67031a Fixed #16007 -- Give POSIX platforms the same courtesy as NT for GDAL 1.8. Thanks, Leo.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16500 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-04 04:06:11 +00:00
Jannis Leidel 38a2444277 Fixed #16050 -- BACKWARDS-INCOMPATIBLE CHANGE: Moved static files of the admin to conventional file system location.
This also removes the need for ADMIN_MEDIA_PREFIX and replaces it with the convention to find admin's static files at STATIC_URL + 'admin/'.

Thanks to Jacob for the review and general help.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16487 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-30 09:06:19 +00:00
Ramiro Morales b7715b4ae6 Fixed #15772 -- Corrected an oversight from r16016 in MySQL GeoDjango DB backend. Thanks JannKleen for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16021 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-06 11:19:37 +00:00
Ramiro Morales de5f07513b Tweaked r16016: Removed a now superflous __init__ method in the Oracle GIS backend DatabaseOperations class.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16017 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-05 11:29:16 +00:00
Ramiro Morales 30b3d51599 Fixed #13630 -- Made __init__ methods of all DB backends' DatabaseOperations classes take a `connection` argument. Thanks calexium for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16016 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-05 00:19:17 +00:00
Adrian Holovaty 71bf169ab1 Fixed geodjango postgis/creation.py to use postgresql_psycopg2 instead of legacy postgresql module that was removed recently
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16015 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-04 15:43:56 +00:00
Russell Keith-Magee fb55a1a77d Fixed #15747 -- Removed deprecated contrib.gis.db.backend module. Thanks to jonash for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16012 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-03 23:50:12 +00:00
Russell Keith-Magee d60ae0b721 Removed deprecated 'no' translation
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15988 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-02 08:43:43 +00:00
Russell Keith-Magee 765458363b Advanced deprecations in contrib.gis.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15973 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-02 08:34:50 +00:00
Justin Bronn 84226c0b84 Fixed `LayerMapping` to support `BigIntegerField` and removed support for `XMLField`.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15961 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-30 19:23:43 +00:00
Justin Bronn abab0742d0 Fixed integer overflows that occurred when `OFTReal` fields were treated as `OFTInteger`.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15946 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-30 16:56:53 +00:00
Justin Bronn 83246ca8b9 Fixed tests broke in r15926.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15945 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-30 16:46:24 +00:00
Adrian Holovaty a87be3554f Removed a bunch of Python 2.4 workarounds now that we don't support it. Refs #15702 -- thanks to jonash for the patch. Splitting this over muliple commits to make it more manageable.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15926 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-28 01:40:43 +00:00
Jannis Leidel 2cb2674048 Copied "Norwegian Bokmål (nb)" translation to old "Norwegian (no)" translation for backwards compatibility.
This change slightly extends what was decided in #11068 (to not update the "no" translation due to complicated maintenance, but only "nb"). Thanks, Transifex!

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15887 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-20 22:16:35 +00:00
Jannis Leidel ada8e2a6fa Pulled translation updates from Transifex again.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15886 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-20 22:16:14 +00:00
Ramiro Morales 5347bbd514 Fixed plural forms formula for the Croatian (hr) localization by manually overriding the header of affected .po files and re-generating .mo files, this seems to be a quirck in Transifex export to PO functionality. Thanks bmihelac fot the report. Refs #15634.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15875 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-17 22:56:10 +00:00
Justin Bronn d60a8777c1 Add `setUp` and `tearDown` methods to the geographic feed and sitemap tests to ensure `Site` exists for tests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15856 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-16 18:22:52 +00:00
Justin Bronn 4da019ea19 Fixed #15194 -- Add OSGeo4W DLL library names to GEOS and GDAL interfaces. Thanks, master for ticket and initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15852 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-16 04:44:26 +00:00
Justin Bronn ebd5682989 Fixed #15533 -- Now use 3857 as spherical mercator projection instead of deprecated 900913 on platforms that support it. Thanks to cnorthwood for bug report and Christopher Schmidt for OpenLayers JavaScript workaround.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15845 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-16 02:58:35 +00:00
Jannis Leidel 71e6f9b84d Pulled gis translation updates from Transifex.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15831 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-15 20:09:41 +00:00
Justin Bronn 1fdbcadd22 Fixed #15378 -- Now properly handle OGR layers that have features with invalid geometries. Thanks, kunitoki for bug report and initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15813 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-15 02:26:37 +00:00
Adrian Holovaty 4e25bc71b1 Fixed #15609 -- Fixed some 'raise' statements to use the newer style syntax. Thanks, DaNmarner
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15811 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-14 23:00:03 +00:00
Justin Bronn ab7ada16ed Fixed brittle tests that broke with release of GDAL 1.8.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15806 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-14 21:15:34 +00:00
Jannis Leidel 90564a156c Fixed Hungarian, Russian, Serbian and Ukranian plural forms introduced in r15680.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15752 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-04 01:07:11 +00:00
Jannis Leidel c11140d04b Fixed plural forms of Irish translation introduced in r15680.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15751 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-04 01:05:10 +00:00
Jannis Leidel 53b2a25396 Fixed plural forms of Welsh translation introduced in r15680.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15750 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-04 01:04:31 +00:00
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
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
Justin Bronn f146132831 No longer create tables for unnecessary applications when running the GeoDjango test suite.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10498 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-10 19:19:19 +00:00
Justin Bronn 5e58810e21 Applied latest changes to `ListMixin` from Aryeh Leib Taurog and added him to AUTHORS; fixed memory leak introduced in r10174 -- no longer call `ListMixin.__init__` and set methods manually because it created references that prevented garbage collection; fixed several routines that had no need to be class methods.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10494 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-10 18:32:17 +00:00
Justin Bronn ae7cb577dd Refactored `get_srid_info` to use the ORM (now possible since it's no longer used in `GeometryField.__init__`), and moved to `fields` module; removed unnecessary code.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10493 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-10 18:08:37 +00:00
Adrian Holovaty fd443959df Added an SRID_CACHE to GeoDjango db/models/fields/__init__.py so that we only hit the spatial_ref_sys table once per SRID per process
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10488 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-10 17:04:35 +00:00
Adrian Holovaty bb75efc050 Fixed typo in GeoDjango deprecation error message
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10487 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-10 16:58:47 +00:00
Adrian Holovaty 800b6cfbbe Changed GeoDjango GeometryField to lazily load units, units_name and _spheroid
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10486 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-10 16:58:29 +00:00
Justin Bronn 1dc72fe876 Now take advantage of new argument accepted by `AddGeometryColumn` in SpatiaLite 2.3 that allows geometry columns to specified as `NOT NULL`.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10443 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-08 00:09:06 +00:00
Justin Bronn a6356cad4d Fixed #10757 -- Fixed improper selection of primary keys across relations when using `GeoManager.values`.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10434 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-07 21:18:41 +00:00
Justin Bronn 2ec48a1dd9 Now support SVG output in SpatiaLite; added tests for SVG output.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10428 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-07 20:12:08 +00:00
Malcolm Tredinnick dded5f52cc Fixed #10695 -- Fixed implementation of deferred attribute retrieval.
The original implementation had a few silly bugs in it that meant that data was
not being used only on the instance of the class that it was appropriate for
(one of the traps when using class-level things). No more!

Thanks to Justin Bronn and Alex Gaynor for the patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@10382 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-04 03:21:31 +00:00
Malcolm Tredinnick 19d1450929 Tweaked a GIS expected test failure.
The test was only checking for geos version 3.0.0, but it failed for all
3.0.x versions. This change makes the version check skip the test for
anything 3.0-ish.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@10381 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-04 03:20:39 +00:00
Justin Bronn 8d42902f19 Fixed #9745 -- Added the `GeoQuerySet` methods `snap_to_grid` and `geojson`.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10369 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-02 16:50:44 +00:00
Justin Bronn c398566aa2 Forgot to include the SpatiaLite test SQL files.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10327 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-01 16:06:22 +00:00
Justin Bronn 03de1fe5f4 Fixed #9871 -- Geometry objects are now returned in dictionaries and tuples returned by `values()` and `values_list()`, respectively; updated `GeoQuery` methods to be compatible with `defer()` and `only`; removed defunct `GeomSQL` class; and removed redundant logic from `Query.get_default_columns`.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10326 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-01 16:01:50 +00:00
Justin Bronn 449a83ba2e Forgot to remove import of defunct `GeoMixin`.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10275 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-31 17:19:03 +00:00
Justin Bronn 3a0950739b Fixed #9437 -- Now close database connection within `get_srid_info`. Thanks, mattxbart.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10254 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-31 15:49:25 +00:00
Justin Bronn a1e7723c79 Fixed the `add_postgis_srs` routine to support SpatiaLite.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10229 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-30 22:54:24 +00:00
Justin Bronn 8eca2df3a4 Fixed #9686 -- SpatiaLite is now a supported spatial database backend. Thanks to Matthew Hancher for initial patch and hard work in implementing this feature.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10222 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-30 22:15:41 +00:00
Gary Wilson Jr 5ff1703f41 Fixed #9130 -- Fixed typo in comment, thanks scel.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10220 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-30 22:10:36 +00:00
Justin Bronn 867e71501c Refactored and cleaned up parts of the spatial database backend. Changes include:
* Laid foundations for SpatiaLite support in `GeoQuerySet`, `GeoWhereNode` and the tests.
* Added the `Collect` aggregate for PostGIS (still needs tests).
* Oracle now goes to 11.
* The backend-specific `SpatialRefSys` and `GeometryColumns` models are now attributes of `SpatialBackend`.
* Renamed `GeometryField` attributes to be public that were private (e.g., `_srid` -> `srid` and `_geom` -> `geom_type`).
* Renamed `create_test_db` to `create_test_spatial_db`.
* Removed the legacy classes `GeoMixin` and `GeoQ`.
* Removed evil `\` from spatial backend fields.
* Moved shapefile data from `tests/layermap` to `tests/data`.

Fixed #9794.  Refs #9686.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@10197 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-30 17:15:49 +00:00
Justin Bronn f0b7cc4a23 Cleanup, bug fixes, and new tests for the GEOS I/O objects and `GEOSBase` object.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10177 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-28 16:36:48 +00:00
Justin Bronn 0b9a855bed Fixed #10620 -- removed carriage returns in a GEOS tests module; fixed other errata such as unnecessary `pymutable_geometries` module and not having `GEOSGeometry` call `__init__`.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10174 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-26 02:07:11 +00:00
Justin Bronn 91ebe9acae Fixed error when trying to import the GEOS tests from their new location.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10137 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-24 04:26:56 +00:00
Justin Bronn 66e1670efa Refactored the GEOS interface. Improvements include:
* Geometries now allow list-like manipulation, e.g., can add, insert, delete vertexes (or other geometries in collections) like Python lists.  Thanks, Aryeh Leib Taurog.
* Added support for GEOS prepared geometries via `prepared` property.  Prepared geometries significantly speed up certain operations.
* Added support for GEOS cascaded union as `MultiPolygon.cascaded_union` property.
* Added support for GEOS line merge as `merged` property on `LineString`, and `MultiLineString` geometries.  Thanks, Paul Smith.
* No longer use the deprecated C API for serialization to/from WKB and WKT.  Now use the GEOS I/O classes, which are now exposed as `WKTReader`, `WKTWriter`, `WKBReader`, and `WKBWriter` (which supports 3D and SRID inclusion)
* Moved each type of geometry to their own module, eliminating the cluttered `geometries.py`.
* Internally, all C API methods are explicitly called from a module rather than a star import.

Fixed #9557, #9877, #10222


git-svn-id: http://code.djangoproject.com/svn/django/trunk@10131 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-24 00:12:21 +00:00
Justin Bronn 44b0f68f44 GeoDjango test suite now takes advantage of `importlib` added in r10088.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10103 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-20 02:50:48 +00:00
Justin Bronn 9eb061b2c0 Fixed #10480 -- made `icons` a property to add more flexibility.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10102 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-20 02:10:47 +00:00
Malcolm Tredinnick 0543f33bbc Fixed the django.contrib.gis test database creation as well.
Refs r10026 and r10027.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@10028 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-11 05:48:26 +00:00
Justin Bronn 6aa5aacc86 Fixed #9204 -- Added `GIcon` overlay, allowing customization for icons of `GMarker` objects. Thanks to qingfeng for initial ticket/patch, and to prairiedogg for final implementation.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10021 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-10 18:03:35 +00:00
Justin Bronn d45e24a1f8 Fixed #9955 -- Added `GoogleMapSet`, which enables multiple `GoogleMap` objects to placed on the same page; moved all templates to `google` parent dir, and added 'google-map.html' for an included example. Thanks to mandric for the ticket and aromano for initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10011 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-09 19:22:24 +00:00
Malcolm Tredinnick 35f934f5a7 Pass values through get_db_prep_save() in a QuerySet.update() call.
This removes a long-standing FIXME in the update() handling and allows for
greater flexibility in the values passed in. In particular, it brings updates
into line with saves for django.contrib.gis fields, so fixed #10411.

Thanks to Justin Bronn and Russell Keith-Magee for help with this patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@10003 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-09 00:03:03 +00:00
Justin Bronn cee31735f7 Fixed #10072 -- `GMarker` overlays now have `draggable` option. Thanks to prairiedogg for ticket and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10002 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-08 18:34:24 +00:00
Justin Bronn f1ada99997 Maintenance refactor of the GDAL (OGR) ctypes interface. Changes include:
* All C API method explictly called from their prototype module, no longer imported via *.
* Applied DRY to C pointer management, classes that do so subclass from `GDALBase`.
* `OGRGeometry`: Added `from_bbox` class method (patch from Christopher Schmidt) and `kml` property.
* `SpatialReference`: Now initialize with `SetFromUserInput` (initialization is now more simple and flexible); removed duplicate methods.
* `Envelope`: Added `expand_to_include` method and now allow same coordinates for lower left and upper right points.  Thanks to Paul Smith for tickets and patches.
* `OGRGeomType`: Now treat OGC 'Geometry' type as 'Unknown'.

Fixed #9855, #10368, #10380.  Refs #9806.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@9985 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-07 23:02:48 +00:00
Justin Bronn 68f81c873d Fixed #10397 -- made GIS test runner compatible with changes in r9756.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9978 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-06 02:01:20 +00:00
Justin Bronn 9b8c712ca7 Fixed #10159 -- `F()` expressions now work on geographic fields. The tests are in `relatedapp`, which has been retrofitted to work with Oracle (minus the prior offending tests). I'm back.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9963 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-03 22:10:15 +00:00
Malcolm Tredinnick fdca9e55e8 Fixed #10395 -- Fixed more fallout from r9945.
(Simultaneously, stop django.contrib.gis using some internal attribute when
there's a perfectly good public property available to do the same thing.)

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9960 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-03 02:45:15 +00:00
Justin Bronn 2b8e768b22 Fixed #9858 -- Added ability to use PostGIS template with GIS test runner via `POSTGIS_TEMPLATE` setting. Thanks to Aryeh Leib Taurog for feature suggestion and initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9803 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-01 18:22:57 +00:00
Justin Bronn d982edff4b Now use `subprocess.Popen` instead of the deprecated os.popen3 to issue PostGIS test database creation commands.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9801 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-01 17:49:33 +00:00
Justin Bronn 547649f962 Fixed geographic admin to be compatible with `ModelAdmin.formfield_for_dbfield` changes in r9760.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9763 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-16 20:05:39 +00:00
Ian Kelly acfe5cc880 Fixed #6767: changed the way the Oracle backend fetches numbers to prevent decimals being returned as floats.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9750 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-15 20:39:09 +00:00
Justin Bronn f60d0f597a Forgot to actually enable the extent aggregate for Oracle.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9749 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-15 19:50:29 +00:00
Justin Bronn f671a5c961 Fixed incomplete merge of geographic aggregates; added support for `Extent` aggregate to Oracle spatial backend. Refs #3566.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9748 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-15 19:35:04 +00:00
Russell Keith-Magee cc4e4d9aee Fixed #3566 -- Added support for aggregation to the ORM. See the documentation for details on usage.
Many thanks to:
 * Nicolas Lara, who worked on this feature during the 2008 Google Summer of Code.
 * Alex Gaynor for his help debugging and fixing a number of issues.
 * Justin Bronn for his help integrating with contrib.gis.
 * Karen Tracey for her help with cross-platform testing.
 * Ian Kelly for his help testing and fixing Oracle support.
 * Malcolm Tredinnick for his invaluable review notes.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9742 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-15 11:06:34 +00:00
Justin Bronn 6c4e5f0f0e Fixed #9278, #9694 -- Geographic overlays now display in admin with right to left langauges; simplified transformation process in `OpenLayersWidget` to fix Ubuntu 8.10/Apache 2.2.9 crash; updated OpenLayers version to 2.7.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9733 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-13 02:08:26 +00:00
Justin Bronn 300752bd6c Return None for null date/time fields in OGR-supported data sources. Thanks to Ariel Mauricio Nunez Gomez for bug report and initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9711 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-07 20:21:19 +00:00