Fothaí GeografachaLink to this heading
Tá a fho-aicme féin ag GeodJango: aicme: Feed a d'fhéadfadh faisnéis suímh a leabú i bhfothaí RSS/Atom atá formáidithe de réir na gcaighdeán Simple Georss `__ nó `W3C Geo. Toisc gur superset de Django é API sindiciúcháin GeodJango, téigh i gcomhairle le do thoil: doc: 'Doiciméadú sionnaithe Django' le haghaidh sonraí maidir le húsáid ghinearálta </ref/contrib/syndication>.
SamplaLink to this heading
Tagairt APILink to this heading
Fo-aicme FeathLink to this heading
- class FeedLink to this definition
Chomh maith le modhanna a sholáthraíonn an:class: Django.Contrib.Syndication.Views.Feed bunaicme, soláthraíonn rang ``Feed ``GeoDjango na foriompaithe seo a leanas. Tabhair faoi deara gur féidir na sáruithe seo a dhéanamh ar bhealaí éagsúla:
from django.contrib.gis.feeds import Feed class MyFeed(Feed): # First, as a class attribute. geometry = ... item_geometry = ... # Also a function with no arguments def geometry(self): ... def item_geometry(self): ... # And as a function with a single argument def geometry(self, obj): ... def item_geometry(self, item): ...- geometry(obj)Link to this definition
Tógann sé an réad ar ais ag ``get_object () ``agus filleann sé an geoiméadrachta*feed's* ar ais. De ghnáth is cás “Geosgeoiméadracht” é seo, nó féadann sé a bheith ina tuple chun pointe nó bosca a léiriú. Mar shampla:
class ZipcodeFeed(Feed): def geometry(self, obj): # Can also return: `obj.poly`, and `obj.poly.centroid`. return obj.poly.extent # tuple like: (X0, Y0, X1, Y1).- item_geometry(item)Link to this definition
Socraigh é seo chun an geoiméadracht do ghach* míre* sa bheatha a thabhairt ar ais. Is féidir seo a bheith ina shampla ``Geosgeoimetry', nó tuple a léiríonn comhordú pointe nó bosca teorainneacha. Mar shampla:
class ZipcodeFeed(Feed): def item_geometry(self, obj): # Returns the polygon. return obj.poly