1
0
mirror of https://github.com/django/django.git synced 2025-07-04 01:39:20 +00:00

2983 Commits

Author SHA1 Message Date
Justin Bronn
00292ad02e gis: Merged revisions 6990-7043 via svnmerge from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@7044 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-01-28 15:35:46 +00:00
Justin Bronn
398eca3fb2 gis: Added the extent method to GeoQuerySet; moved various spatial-backend settings into the SpatialBackend container class.
git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@7028 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-01-22 01:22:27 +00:00
Justin Bronn
feebe39429 gis: Fixed #6289 (added extra_context keyword to GoogleMap). Thanks omat & arien.
git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@7027 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-01-18 16:49:51 +00:00
Justin Bronn
8da13e60c2 gis: Fixed #6357, and added a validator to WKTField.
git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@7026 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-01-18 16:38:51 +00:00
Justin Bronn
3dd6b422ca gis: LayerMapping: Fixed bug that would occur when mapping OFTReal fields with precision > 0 to an IntegerField.
git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@7024 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-01-18 15:52:37 +00:00
Justin Bronn
730b1f6d7a gis: LayerMapping: Added the fid_range and step keywords to save(); moved the silent, strict, and pipe (now stream) keywords from __init__() to save().
git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@7013 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-01-10 17:11:02 +00:00
Justin Bronn
5655cf1b2a gis: gdal: GeometryCollection.add() now accepts other collections, and associated tests.
git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@7012 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-01-09 19:42:23 +00:00
Justin Bronn
298074d5b8 gis: gdal: Fixed Driver and DataSource bug reported by David Hancock in django-users and reproduced by tlp.
git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@7003 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-01-06 22:20:39 +00:00
Justin Bronn
1d5e689af2 gis: gdal: Now supports the official GDAL 1.5 binaries for Windows, greatly simplifying installation for that platform; implemented STDCALL aliases for OSR routines that have inconsistent calling convention via the std_call function; removed unused prototypes module code.
git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@6993 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-01-04 06:41:13 +00:00
Justin Bronn
b11172e4e7 gis: LayerMapping: Improved the internals (i.e., checking every feature in OGR Layer is no longer needed, removed unnecessary class constants); added real support ForeignKey model fields; added field_types property to Layer; fixed county shapefile because of Harris County, Georgia.
git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@6992 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-01-03 19:02:18 +00:00
Justin Bronn
7e322b5908 gis: Merged revisions 6920-6989 via svnmerge from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@6990 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-01-02 16:57:53 +00:00
Justin Bronn
ef0f46f1d0 gis: LayerMapping: Added the unique keyword parameter and tests for the transform keyword and geometry collection conversion.
git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@6980 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-29 07:48:08 +00:00
Justin Bronn
387e6cca92 gis: lowered test transformation precision due to variations in updated PROJ and GDAL versions (i.e., tests run for GDAL 1.5 and PROJ 4.6.0).
git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@6979 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-27 21:44:33 +00:00
Justin Bronn
31111857cb gis: geos: all pointer access is now done via the ptr property to prevent calling GEOS routines on NULL pointers; added the geos_version_info routine; added __copy__ and __deepcopy__ interfaces that return clones (for compatibility w/queryset-refactor); __eq__ may now compare WKT strings (for compatibility w/newforms-admin); made tests compatible w/GEOS 3.0.0 release.
git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@6978 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-25 21:27:56 +00:00
Justin Bronn
24617b1667 gis: Fixed #6246 (Thanks jos3ph); removed unnecessary commented debugging code.
git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@6966 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-21 21:36:54 +00:00
Justin Bronn
34560a01da gis: Merged revisions 6672,6686-6688,6690,6693,6707-6708,6726,6730,6753,6755-6762,6764,6776-6777,6779,6782-6919 via svnmerge from trunk; reverted oracle backend base.py due to ikelly's patch in r6905.
git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@6920 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-15 01:38:43 +00:00
Justin Bronn
5799c2e048 gis: Applied DRY to spatial SQL generation in anticipation of queryset-refactor; fixed gml function for PostGIS 1.3.2 parameter ordering.
git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@6919 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-15 00:30:48 +00:00
Justin Bronn
9270d47d80 gis: Fixed #6196 in GeoIP refactor. Added unit tests, improved path setup, and made mostly compatible w/existing MaxMind Python API.
git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@6918 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-14 21:42:37 +00:00
Justin Bronn
40a7292a8d gis: gdal: Fixed bug in the property so that no exception is raised when the spatial reference is undefined (Thanks Joe).
git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@6916 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-13 03:08:06 +00:00
Justin Bronn
6349985e70 gis: gdal: removed errcheck_flag, not needed after all (I misread the C header file).
git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@6914 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-11 16:18:48 +00:00
Justin Bronn
fae19f8ced gis: Added distance querying capabilites via the distance manager method and the distance_[gt|gte|lt|lte] lookup types (works for both PostGIS and Oracle); improved Oracle query construction and fixed transform issues.
git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@6886 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-04 17:44:37 +00:00
Justin Bronn
cc0cc9fa08 gis: geos: Added support for EWKT (SRID only), and a transform routine that uses the GDAL facilities to transform the GEOS geometry.
git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@6884 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-04 15:09:06 +00:00
Justin Bronn
d2fd4f0dc6 gis: added additional units (including WKT aliases) and the unit_attname class method to Distance.
git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@6865 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-03 18:15:57 +00:00
Justin Bronn
1c45c6f753 gis: gdal: Added GDAL_LIBRARY_PATH setting; added tests and extended support geometry transform; added the units method for spatial reference objects.
git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@6862 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-03 08:16:09 +00:00
Justin Bronn
facc725d21 gis: renamed GEOSGeometryIndexError to GEOSIndexError; added GEOS_LIBRARY_PATH settings option.
git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@6861 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-03 06:27:16 +00:00
Jeremy Dunck
23384af79b gis: Merged 6672-6783 vis svnmerge from trunk
git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@6815 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-01 22:12:44 +00:00
Justin Bronn
85ce45bc44 gis: Fixed DecimalField verification in LayerMapping.
git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@6708 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-20 15:13:55 +00:00
Justin Bronn
f23597cdd7 gis: gdal: Fixed memory leak introduced in the refactor caused by unnecessary cloning of SpatialReference objects from Features; fixed windows-compatibility issues (no error code returned by some destruction routines by windows libraries); OFTDate/Time fields return None if invalid date is encountered (thanks tlp).
git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@6707 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-20 15:10:20 +00:00
Justin Bronn
20a1c654f0 gis: Added the ogrinspect module (via patch from tlp), which provides utilities for the generation of GeoDjango models from OGR data sources as well as generation of LayerMapping dictionaries.
git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@6688 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-17 22:04:05 +00:00
Justin Bronn
e88ce426b6 gis: LayerMapping refactor
(1) Moved all routines into LayerMapping class (for easier subclassing) and modularized the routines.
 (2) OFTString and OFTReal OGR fields are verified w/the Django fields prior to insertion, thus avoiding invalidating a large transaction.
 (3) Added keyword options for specifying the transaction mode, not performing transformations, and status printing.
 (4) Created unit tests.
Other Changes:
 Updated `ogrinfo` for GDAL refactor and fixed an iterating bug; simplified a few lines in `geoapp` model tests.


git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@6687 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-17 21:57:12 +00:00
Justin Bronn
ef32f913a0 gis: gdal: refactor of the GDAL ctypes interface
(1) All interactions with the GDAL library take place through predefined ctypes prototypes, abstracting away error-checking.
 (2) Fixed memory leaks by properly freeing pointers allocated w/in GDAL.
 (3) Improved OFTField support, and added support for the OGR date/time fields.
 (4) Significantly improved the OGRGeometry tests.


git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@6686 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-17 21:38:36 +00:00
Justin Bronn
f66821deae gis: Merged revisions 6614-6671 via svnmerge from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@6672 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-14 19:13:37 +00:00
Justin Bronn
1c7ad200c7 gis: geos: Re-factored GEOS interface. Improvements include:
(1) All interactions with the GEOS library take place through 
     pre-defined ctypes prototypes, abstracting away return-value
     error-checking.
 (2) Mutability is now safe. Because GEOS geometry pointers are
     marked as `const` (Thanks Hobu), previous modification techniques 
     caused unpredictable instability when geometries were constructed 
     from the pointers of other geometries (e.g., a Polygon with rings 
     from another Polygon).  Geometry components are cloned first before 
     creation of the modified geometry.
 (3) Fixed memory leaks by freeing pointers from strings allocated
     in GEOS because ctypes only frees pointers allocated in Python.

Backwards-Incompatibility Notice:
 All children geometries (e.g., rings from a Polygon, geometries from a 
 collection) are now clones -- modifications will not propagate up to
 the parent geometry as before.


git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@6653 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-06 00:39:36 +00:00
Justin Bronn
2694fffcc0 gis: gdal:
(1) Added the `field_widths` and `field_precision` properties to Layer with patch from tlp.
 (2) Field definition is now passed into the Feature from the Layer.
 (3) Fixed memory leak issue with Feature not being properly deleted.
 (4) OGR_L_GetNextFeature() now used for iteration on Layer.
 (5) Added the `gdal_version`, `gdal_full_version`, and `gdal_release_date` functions.
 (6) Made all initial pointers None instead of 0.


git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@6639 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-04 00:48:10 +00:00
Justin Bronn
4ffbddf92d gis: Merged revisions 6525-6613 via svnmerge from [repos:django/trunk trunk].
git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@6615 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-26 20:47:20 +00:00
Justin Bronn
f66ee9d006 gis: added get_srid() spatial backend utility that takes into account -1 SRID values; removed from_hex flag from GEOS initialization; added tests for SRID values, and changed test_gdal module docstring.
git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@6596 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-22 23:37:26 +00:00
Justin Bronn
aed1db8266 gis: Fixed #5779, thanks tlp; added type checking to SpatialReference.__getitem__.
git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@6574 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-21 04:27:22 +00:00
Justin Bronn
712df76528 gis: Added preliminary spatial backend for MySQL (which only supports MBR queries), and added limited test suite for it; updated a few comments in the Oracle backend.
git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@6527 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-19 00:34:29 +00:00
Justin Bronn
58fc789765 Merged revisions 6442-6524 via svnmerge from [repos:django/trunk trunk].
git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@6525 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-16 16:54:23 +00:00
Justin Bronn
ba9fa9844c gis: Added preliminary spatial backend for Oracle; added GEOS routine fromfile.
git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@6524 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-16 06:41:16 +00:00
Justin Bronn
189335acaa gis: removed import to the PostGIS proxy module.
git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@6509 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-14 20:48:33 +00:00
Justin Bronn
c049672a74 gis: spatial-backend enhancements:
(1) GEOS no longer has psycopg2-specific routines, functionality now part of PostGIS adaptor in the spatial backend.
 (2) ST_GeomFromWKB() now used to enhance performance.
 (3) Moved GeometryProxy back to its original location.
 (4) Should resolve #5498, but not yet confirmed.
 (5) Test-sql files are now backend-specific.


git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@6508 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-14 20:13:11 +00:00
Justin Bronn
b6c8bba5b6 gis: spatial-database compatibility and usability changes:
(1) The SpatialRefSys and GeometryColumns models and GeometryProxy have been moved to the PostGIS backend because their functionality depends on the spatial databse.
 (2) The GeoMixin is no longer required, as all the functionality contributed by the extra instance methods has been moved to the GeometryProxy.
 (3) The `_post_create_sql` field now returns a tuple of SQL statements, instead of a string.


git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@6467 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-08 18:18:17 +00:00
Justin Bronn
5d7fd63423 gis: geos: Fixed #5630 with patch from rcoup; added the ogr and srs properties.
git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@6465 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-07 22:42:26 +00:00
Justin Bronn
ddc9361d93 gis: gdal: added support exporting/creating geometries to/from WKB and HEX.
git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@6464 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-07 20:29:59 +00:00
Justin Bronn
ad3e9e99a2 gis: gdal: The OGRGeometry srs property is now mutable, and added the srid property.
git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@6460 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-07 04:21:31 +00:00
Justin Bronn
acbc766894 gis: Merged revisions 6394-6441 via svnmerge from [repos:django/trunk trunk].
git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@6442 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-01 03:58:05 +00:00
Justin Bronn
41709bf315 gis: Added the gml() and union() GeoQuerySet routines w/tests.
git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@6441 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-30 17:44:13 +00:00
Justin Bronn
091ba8c2ea gis: gdal: fixed GML property, and added tests.
git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@6440 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-30 15:16:22 +00:00
Justin Bronn
867a74495f gis: PostGIS backend improvements: test spatial databases may now be created on NT platforms; changed exception style.
git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@6439 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-30 04:19:31 +00:00