本文介紹 django.contrib.gis.db.models.functions.AsKML
的用法。
聲明
class AsKML(expression, precision=8, **extra)
Availability
:PostGIS,SpatiaLite
接受單個地理字段或表達式並返回幾何的Keyhole Markup Language (KML) 表示。
例子:
>>> qs = Zipcode.objects.annotate(kml=AsKML('poly'))
>>> print(qs[0].kml)
<Polygon><outerBoundaryIs><LinearRing><coordinates>-103.04135,36.217596,0 ...
-103.04135,36.217596,0</coordinates></LinearRing></outerBoundaryIs></Polygon>
關鍵字參數 | 說明 |
---|---|
precision |
此關鍵字可用於指定 KML 表示中坐標的有效位數 - 默認值為 8。 |
相關用法
- Python Django AsWKB用法及代碼示例
- Python Django AsWKT用法及代碼示例
- Python Django AsGML用法及代碼示例
- Python Ascii()用法及代碼示例
- Python Django AsGeoJSON用法及代碼示例
- Python Tweepy API.mentions_timeline()用法及代碼示例
- Python Tweepy API.get_user()用法及代碼示例
- Python Tweepy API.list_timeline()用法及代碼示例
- Python Django ACos用法及代碼示例
- Python Django Area用法及代碼示例
- Python Tweepy API.add_list_members()用法及代碼示例
- Python Django Abs用法及代碼示例
- Python Django AuthenticationForm.confirm_login_allowed用法及代碼示例
- Python Tweepy API.create_block()用法及代碼示例
- Python Django ATan用法及代碼示例
- Python Tweepy API.trends_closest()用法及代碼示例
- Python Django ArchiveIndexView用法及代碼示例
- Python Tweepy API.send_direct_message()用法及代碼示例
- Python Tweepy API.destroy_status()用法及代碼示例
- Python Tweepy API.destroy_saved_search()用法及代碼示例
- Python Django ArraySubquery用法及代碼示例
- Python Tweepy API.get_list()用法及代碼示例
- Python Tweepy API.favorites()用法及代碼示例
- Python Tweepy API.blocks_ids()用法及代碼示例
- Python Tweepy API.configuration()用法及代碼示例
注:本文由純淨天空篩選整理自djangoproject.com大神的英文原創作品 django.contrib.gis.db.models.functions.AsKML。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。