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
21322f92
Kaydet (Commit)
21322f92
authored
Kas 30, 2016
tarafından
Sergey Fedoseev
Kaydeden (comit)
Tim Graham
Kas 30, 2016
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #27552 -- Added docs/test for GEOSGeometry.normalize().
üst
8eb56f3c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
1 deletion
+17
-1
geometry.py
django/contrib/gis/geos/geometry.py
+1
-1
geos.txt
docs/ref/contrib/gis/geos.txt
+11
-0
test_geos.py
tests/gis_tests/geos_tests/test_geos.py
+5
-0
No files found.
django/contrib/gis/geos/geometry.py
Dosyayı görüntüle @
21322f92
...
...
@@ -259,7 +259,7 @@ class GEOSGeometry(GEOSBase, ListMixin):
def
normalize
(
self
):
"Converts this Geometry to normal form (or canonical form)."
return
capi
.
geos_normalize
(
self
.
ptr
)
capi
.
geos_normalize
(
self
.
ptr
)
# #### Unary predicates ####
@property
...
...
docs/ref/contrib/gis/geos.txt
Dosyayı görüntüle @
21322f92
...
...
@@ -652,6 +652,17 @@ Other Properties & Methods
positive integer even if it was called with a
:class:`~django.contrib.gis.gdal.CoordTransform` object.
.. method:: GEOSGeometry.normalize()
Converts this geometry to canonical form::
>>> g = MultiPoint(Point(0, 0), Point(2, 2), Point(1, 1))
>>> print(g)
MULTIPOINT (0 0, 2 2, 1 1)
>>> g.normalize()
>>> print(g)
MULTIPOINT (2 2, 1 1, 0 0)
``Point``
---------
...
...
tests/gis_tests/geos_tests/test_geos.py
Dosyayı görüntüle @
21322f92
...
...
@@ -1331,6 +1331,11 @@ class GEOSTest(SimpleTestCase, TestDataMixin):
),
)
def
test_normalize
(
self
):
g
=
MultiPoint
(
Point
(
0
,
0
),
Point
(
2
,
2
),
Point
(
1
,
1
))
self
.
assertIsNone
(
g
.
normalize
())
self
.
assertTrue
(
g
.
equals_exact
(
MultiPoint
(
Point
(
2
,
2
),
Point
(
1
,
1
),
Point
(
0
,
0
))))
@ignore_warnings
(
category
=
RemovedInDjango20Warning
)
def
test_deprecated_srid_getters_setters
(
self
):
p
=
Point
(
1
,
2
,
srid
=
123
)
...
...
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