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
97e1d243
Kaydet (Commit)
97e1d243
authored
Kas 13, 2015
tarafından
Sergey Fedoseev
Kaydeden (comit)
Tim Graham
Kas 23, 2015
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Refs #25739 -- Lessened the prominence of geos.fromstr() in the docs.
üst
2ab244ff
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
db-api.txt
docs/ref/contrib/gis/db-api.txt
+2
-2
geos.txt
docs/ref/contrib/gis/geos.txt
+6
-4
No files found.
docs/ref/contrib/gis/db-api.txt
Dosyayı görüntüle @
97e1d243
...
...
@@ -229,11 +229,11 @@ in southern Texas::
Then distance queries may be performed as follows::
>>> from django.contrib.gis.geos import
fromstr
>>> from django.contrib.gis.geos import
GEOSGeometry
>>> from django.contrib.gis.measure import D # ``D`` is a shortcut for ``Distance``
>>> from geoapp.models import SouthTexasCity
# Distances will be calculated from this point, which does not have to be projected.
>>> pnt =
fromstr
('POINT(-96.876369 29.905320)', srid=4326)
>>> pnt =
GEOSGeometry
('POINT(-96.876369 29.905320)', srid=4326)
# If numeric parameter, units of field (meters in this case) are assumed.
>>> qs = SouthTexasCity.objects.filter(point__distance_lte=(pnt, 7000))
# Find all Cities within 7 km, > 20 miles away, and > 100 chains away (an obscure unit)
...
...
docs/ref/contrib/gis/geos.txt
Dosyayı görüntüle @
97e1d243
...
...
@@ -65,11 +65,10 @@ created by passing in the X and Y coordinates into its constructor::
>>> from django.contrib.gis.geos import Point
>>> pnt = Point(5, 23)
Finally, there
are :func:`fromstr` and :func:`fromfile` factory methods, which
return a :class:`GEOSGeometry` object from an input string or
a file::
Finally, there
is the :func:`fromfile` factory method which returns a
:class:`GEOSGeometry` object from
a file::
>>> from django.contrib.gis.geos import fromstr, fromfile
>>> pnt = fromstr('POINT(5 23)')
>>> from django.contrib.gis.geos import fromfile
>>> pnt = fromfile('/path/to/pnt.wkt')
>>> pnt = fromfile(open('/path/to/pnt.wkt'))
...
...
@@ -824,6 +823,9 @@ Example::
:type srid: int
:rtype: a :class:`GEOSGeometry` corresponding to the spatial data in the string
``fromstr(string, srid)`` is equivalent to :class:`GEOSGeometry(string, srid)
<GEOSGeometry>`.
Example::
>>> from django.contrib.gis.geos import fromstr
...
...
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