Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
django
Commits
ade681b9
Kaydet (Commit)
ade681b9
authored
Agu 09, 2016
tarafından
Claude Paroz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Unified SpatiaLite spelling
üst
79a9603b
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
20 additions
and
20 deletions
+20
-20
introspection.py
django/contrib/gis/db/backends/spatialite/introspection.py
+1
-1
operations.py
django/contrib/gis/db/backends/spatialite/operations.py
+1
-1
functions.py
django/contrib/gis/db/models/functions.py
+1
-1
srs.py
django/contrib/gis/utils/srs.py
+1
-1
geoquerysets.txt
docs/ref/contrib/gis/geoquerysets.txt
+2
-2
geolibs.txt
docs/ref/contrib/gis/install/geolibs.txt
+4
-4
spatialite.txt
docs/ref/contrib/gis/install/spatialite.txt
+2
-2
model-api.txt
docs/ref/contrib/gis/model-api.txt
+1
-1
1.5.2.txt
docs/releases/1.5.2.txt
+1
-1
1.8.txt
docs/releases/1.8.txt
+2
-2
tests.py
tests/gis_tests/distapp/tests.py
+1
-1
test_functions.py
tests/gis_tests/geoapp/test_functions.py
+2
-2
tests.py
tests/gis_tests/inspectapp/tests.py
+1
-1
No files found.
django/contrib/gis/db/backends/spatialite/introspection.py
Dosyayı görüntüle @
ade681b9
...
@@ -42,7 +42,7 @@ class SpatiaLiteIntrospection(DatabaseIntrospection):
...
@@ -42,7 +42,7 @@ class SpatiaLiteIntrospection(DatabaseIntrospection):
# from OGC geom type name to Django field.
# from OGC geom type name to Django field.
ogr_type
=
row
[
2
]
ogr_type
=
row
[
2
]
if
isinstance
(
ogr_type
,
six
.
integer_types
)
and
ogr_type
>
1000
:
if
isinstance
(
ogr_type
,
six
.
integer_types
)
and
ogr_type
>
1000
:
# Spatia
l
ite versions >= 4 use the new SFSQL 1.2 offsets
# Spatia
L
ite versions >= 4 use the new SFSQL 1.2 offsets
# 1000 (Z), 2000 (M), and 3000 (ZM) to indicate the presence of
# 1000 (Z), 2000 (M), and 3000 (ZM) to indicate the presence of
# higher dimensional coordinates (M not yet supported by Django).
# higher dimensional coordinates (M not yet supported by Django).
ogr_type
=
ogr_type
%
1000
+
OGRGeomType
.
wkb25bit
ogr_type
=
ogr_type
%
1000
+
OGRGeomType
.
wkb25bit
...
...
django/contrib/gis/db/backends/spatialite/operations.py
Dosyayı görüntüle @
ade681b9
...
@@ -117,7 +117,7 @@ class SpatiaLiteOperations(BaseSpatialOperations, DatabaseOperations):
...
@@ -117,7 +117,7 @@ class SpatiaLiteOperations(BaseSpatialOperations, DatabaseOperations):
def
convert_extent
(
self
,
box
,
srid
):
def
convert_extent
(
self
,
box
,
srid
):
"""
"""
Convert the polygon data received from Spatia
l
ite to min/max values.
Convert the polygon data received from Spatia
L
ite to min/max values.
"""
"""
if
box
is
None
:
if
box
is
None
:
return
None
return
None
...
...
django/contrib/gis/db/models/functions.py
Dosyayı görüntüle @
ade681b9
...
@@ -340,7 +340,7 @@ class NumPoints(GeoFunc):
...
@@ -340,7 +340,7 @@ class NumPoints(GeoFunc):
def
as_sqlite
(
self
,
compiler
,
connection
):
def
as_sqlite
(
self
,
compiler
,
connection
):
if
self
.
source_expressions
[
self
.
geom_param_pos
]
.
output_field
.
geom_type
!=
'LINESTRING'
:
if
self
.
source_expressions
[
self
.
geom_param_pos
]
.
output_field
.
geom_type
!=
'LINESTRING'
:
raise
TypeError
(
"Spatia
l
ite NumPoints can only operate on LineString content"
)
raise
TypeError
(
"Spatia
L
ite NumPoints can only operate on LineString content"
)
return
super
(
NumPoints
,
self
)
.
as_sql
(
compiler
,
connection
)
return
super
(
NumPoints
,
self
)
.
as_sql
(
compiler
,
connection
)
...
...
django/contrib/gis/utils/srs.py
Dosyayı görüntüle @
ade681b9
...
@@ -65,7 +65,7 @@ def add_srs_entry(srs, auth_name='EPSG', auth_srid=None, ref_sys_name=None,
...
@@ -65,7 +65,7 @@ def add_srs_entry(srs, auth_name='EPSG', auth_srid=None, ref_sys_name=None,
if
'srtext'
in
srs_field_names
:
if
'srtext'
in
srs_field_names
:
kwargs
[
'srtext'
]
=
srs
.
wkt
kwargs
[
'srtext'
]
=
srs
.
wkt
if
'ref_sys_name'
in
srs_field_names
:
if
'ref_sys_name'
in
srs_field_names
:
# Spatia
l
ite specific
# Spatia
L
ite specific
kwargs
[
'ref_sys_name'
]
=
ref_sys_name
or
srs
.
name
kwargs
[
'ref_sys_name'
]
=
ref_sys_name
or
srs
.
name
# Creating the spatial_ref_sys model.
# Creating the spatial_ref_sys model.
...
...
docs/ref/contrib/gis/geoquerysets.txt
Dosyayı görüntüle @
ade681b9
...
@@ -1329,7 +1329,7 @@ Example::
...
@@ -1329,7 +1329,7 @@ Example::
.. class:: Collect(geo_field)
.. class:: Collect(geo_field)
*Availability*: PostGIS, Spatia
l
ite
*Availability*: PostGIS, Spatia
L
ite
Returns a ``GEOMETRYCOLLECTION`` or a ``MULTI`` geometry object from the geometry
Returns a ``GEOMETRYCOLLECTION`` or a ``MULTI`` geometry object from the geometry
column. This is analogous to a simplified version of the :class:`Union`
column. This is analogous to a simplified version of the :class:`Union`
...
@@ -1342,7 +1342,7 @@ not caring about dissolving boundaries.
...
@@ -1342,7 +1342,7 @@ not caring about dissolving boundaries.
.. class:: Extent(geo_field)
.. class:: Extent(geo_field)
*Availability*: PostGIS, Oracle, Spatia
l
ite
*Availability*: PostGIS, Oracle, Spatia
L
ite
Returns the extent of all ``geo_field`` in the ``QuerySet`` as a four-tuple,
Returns the extent of all ``geo_field`` in the ``QuerySet`` as a four-tuple,
comprising the lower left coordinate and the upper right coordinate.
comprising the lower left coordinate and the upper right coordinate.
...
...
docs/ref/contrib/gis/install/geolibs.txt
Dosyayı görüntüle @
ade681b9
...
@@ -37,10 +37,10 @@ totally fine with GeoDjango. Your mileage may vary.
...
@@ -37,10 +37,10 @@ totally fine with GeoDjango. Your mileage may vary.
GDAL 2.1.0 2016-04
GDAL 2.1.0 2016-04
PostGIS 2.1.0 2013-08-17
PostGIS 2.1.0 2013-08-17
PostGIS 2.2.0 2015-10-17
PostGIS 2.2.0 2015-10-17
Spatia
l
ite 4.0.0 2012-11-25
Spatia
L
ite 4.0.0 2012-11-25
Spatia
l
ite 4.1.0 2013-06-04
Spatia
L
ite 4.1.0 2013-06-04
Spatia
l
ite 4.2.0 2014-07-25
Spatia
L
ite 4.2.0 2014-07-25
Spatia
l
ite 4.3.0 2015-09-07
Spatia
L
ite 4.3.0 2015-09-07
.. note::
.. note::
...
...
docs/ref/contrib/gis/install/spatialite.txt
Dosyayı görüntüle @
ade681b9
=====================
=====================
Installing Spatia
l
ite
Installing Spatia
L
ite
=====================
=====================
`SpatiaLite`__ adds spatial support to SQLite, turning it into a full-featured
`SpatiaLite`__ adds spatial support to SQLite, turning it into a full-featured
spatial database.
spatial database.
First, check if you can install Spatia
l
ite from system packages or binaries.
First, check if you can install Spatia
L
ite from system packages or binaries.
For example, on Debian-based distributions, try to install the
For example, on Debian-based distributions, try to install the
``spatialite-bin`` package. For distributions that package SpatiaLite 4.2+,
``spatialite-bin`` package. For distributions that package SpatiaLite 4.2+,
...
...
docs/ref/contrib/gis/model-api.txt
Dosyayı görüntüle @
ade681b9
...
@@ -115,7 +115,7 @@ a flat surface is a straight line, the shortest path between two points on a cur
...
@@ -115,7 +115,7 @@ a flat surface is a straight line, the shortest path between two points on a cur
surface (such as the earth) is an *arc* of a `great circle`__. [#fnthematic]_ Thus,
surface (such as the earth) is an *arc* of a `great circle`__. [#fnthematic]_ Thus,
additional computation is required to obtain distances in planar units (e.g.,
additional computation is required to obtain distances in planar units (e.g.,
kilometers and miles). Using a geographic coordinate system may introduce
kilometers and miles). Using a geographic coordinate system may introduce
complications for the developer later on. For example, Spatia
l
ite does not have
complications for the developer later on. For example, Spatia
L
ite does not have
the capability to perform distance calculations between geometries using
the capability to perform distance calculations between geometries using
geographic coordinate systems, e.g. constructing a query to find all points
geographic coordinate systems, e.g. constructing a query to find all points
within 5 miles of a county boundary stored as WGS84.
within 5 miles of a county boundary stored as WGS84.
...
...
docs/releases/1.5.2.txt
Dosyayı görüntüle @
ade681b9
...
@@ -49,7 +49,7 @@ Bugfixes
...
@@ -49,7 +49,7 @@ Bugfixes
exceptions recursed infinitely (#20278).
exceptions recursed infinitely (#20278).
* :djadmin:`makemessages` no longer crashes with ``UnicodeDecodeError``
* :djadmin:`makemessages` no longer crashes with ``UnicodeDecodeError``
(#20354).
(#20354).
* Fixed ``geojson`` detection with Spatia
l
ite.
* Fixed ``geojson`` detection with Spatia
L
ite.
* :meth:`~django.test.SimpleTestCase.assertContains` once again works with
* :meth:`~django.test.SimpleTestCase.assertContains` once again works with
binary content (#20237).
binary content (#20237).
* Fixed :class:`~django.db.models.ManyToManyField` if it has a unicode ``name``
* Fixed :class:`~django.db.models.ManyToManyField` if it has a unicode ``name``
...
...
docs/releases/1.8.txt
Dosyayı görüntüle @
ade681b9
...
@@ -225,10 +225,10 @@ Minor features
...
@@ -225,10 +225,10 @@ Minor features
* It is now allowed to include a subquery as a geographic lookup argument, for
* It is now allowed to include a subquery as a geographic lookup argument, for
example ``City.objects.filter(point__within=Country.objects.filter(continent='Africa').values('mpoly'))``.
example ``City.objects.filter(point__within=Country.objects.filter(continent='Africa').values('mpoly'))``.
* The Spatia
l
ite backend now supports ``Collect`` and ``Extent`` aggregates
* The Spatia
L
ite backend now supports ``Collect`` and ``Extent`` aggregates
when the database version is 3.0 or later.
when the database version is 3.0 or later.
* The PostGIS 2 ``CREATE EXTENSION postgis`` and the Spatia
l
ite
* The PostGIS 2 ``CREATE EXTENSION postgis`` and the Spatia
L
ite
``SELECT InitSpatialMetaData`` initialization commands are now automatically
``SELECT InitSpatialMetaData`` initialization commands are now automatically
run by :djadmin:`migrate`.
run by :djadmin:`migrate`.
...
...
tests/gis_tests/distapp/tests.py
Dosyayı görüntüle @
ade681b9
...
@@ -448,7 +448,7 @@ ST_Perimeter(geom1) | OK | :-( (degr
...
@@ -448,7 +448,7 @@ ST_Perimeter(geom1) | OK | :-( (degr
================================
================================
Distance functions on Spatia
l
ite
Distance functions on Spatia
L
ite
================================
================================
| Projected Geometry | Lon/lat Geometry
| Projected Geometry | Lon/lat Geometry
...
...
tests/gis_tests/geoapp/test_functions.py
Dosyayı görüntüle @
ade681b9
...
@@ -292,7 +292,7 @@ class GISFunctionsTests(TestCase):
...
@@ -292,7 +292,7 @@ class GISFunctionsTests(TestCase):
qs
=
Track
.
objects
.
annotate
(
num_points
=
functions
.
NumPoints
(
'line'
))
qs
=
Track
.
objects
.
annotate
(
num_points
=
functions
.
NumPoints
(
'line'
))
self
.
assertEqual
(
qs
.
first
()
.
num_points
,
2
)
self
.
assertEqual
(
qs
.
first
()
.
num_points
,
2
)
if
spatialite
or
mysql
:
if
spatialite
or
mysql
:
# Spatia
l
ite and MySQL can only count points on LineStrings
# Spatia
L
ite and MySQL can only count points on LineStrings
return
return
for
c
in
Country
.
objects
.
annotate
(
num_points
=
functions
.
NumPoints
(
'mpoly'
)):
for
c
in
Country
.
objects
.
annotate
(
num_points
=
functions
.
NumPoints
(
'mpoly'
)):
...
@@ -321,7 +321,7 @@ class GISFunctionsTests(TestCase):
...
@@ -321,7 +321,7 @@ class GISFunctionsTests(TestCase):
qs
=
Country
.
objects
.
annotate
(
point_on_surface
=
functions
.
PointOnSurface
(
'mpoly'
))
qs
=
Country
.
objects
.
annotate
(
point_on_surface
=
functions
.
PointOnSurface
(
'mpoly'
))
for
country
in
qs
:
for
country
in
qs
:
tol
=
0.00001
# Spatia
l
ite might have WKT-translation-related precision issues
tol
=
0.00001
# Spatia
L
ite might have WKT-translation-related precision issues
self
.
assertTrue
(
ref
[
country
.
name
]
.
equals_exact
(
country
.
point_on_surface
,
tol
))
self
.
assertTrue
(
ref
[
country
.
name
]
.
equals_exact
(
country
.
point_on_surface
,
tol
))
@skipUnlessDBFeature
(
"has_Reverse_function"
)
@skipUnlessDBFeature
(
"has_Reverse_function"
)
...
...
tests/gis_tests/inspectapp/tests.py
Dosyayı görüntüle @
ade681b9
...
@@ -187,7 +187,7 @@ def get_ogr_db_string():
...
@@ -187,7 +187,7 @@ def get_ogr_db_string():
except
GDALException
:
except
GDALException
:
return
None
return
None
# SQLite/Spatia
l
ite in-memory databases
# SQLite/Spatia
L
ite in-memory databases
if
db
[
'NAME'
]
==
":memory:"
:
if
db
[
'NAME'
]
==
":memory:"
:
return
None
return
None
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment