本文介紹 django.contrib.gis.db.models.functions.AsGML
的用法。
聲明
class AsGML(expression, version=2, precision=8, **extra)
Availability
:甲骨文,PostGIS,SpatiaLite
接受單個地理字段或表達式並返回幾何的Geographic Markup Language (GML) 表示。
例子:
>>> qs = Zipcode.objects.annotate(gml=AsGML('poly'))
>>> print(qs[0].gml)
<gml:Polygon srsName="EPSG:4326"><gml:OuterBoundaryIs>-147.78711,70.245363 ...
-147.78711,70.245363</gml:OuterBoundaryIs></gml:Polygon>
關鍵字參數 | 說明 |
---|---|
precision |
指定 GML 表示中坐標的有效位數 - 默認值為 8。在 Oracle 上忽略。 |
version |
指定要使用的 GML 版本:2(默認)或 3。 |
相關用法
- Python Django AsGeoJSON用法及代碼示例
- Python Django AsWKB用法及代碼示例
- Python Django AsKML用法及代碼示例
- Python Django AsWKT用法及代碼示例
- Python Ascii()用法及代碼示例
- 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.AsGML。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。