本文介紹 django.contrib.gis.db.models.Union
的用法。
聲明
class Union(geo_field)
Availability
:PostGIS,甲骨文,SpatiaLite
此方法返回一個
對象,該對象包含查詢集中每個幾何圖形的並集。請注意,GEOSGeometry
Union
的使用是處理器密集型的,並且在大型查詢集上可能需要大量時間。
注意
如果使用此方法的計算時間太長,請考慮改用
。Collect
例子:
>>> u = Zipcode.objects.aggregate(Union(poly)) # This may take a long time.
>>> u = Zipcode.objects.filter(poly__within=bbox).aggregate(Union(poly)) # A more sensible approach.
腳注
[1] | See OpenGIS Simple Feature Specification For SQL ,在第。 2.1.13.2,頁。 2-13(尺寸擴展Nine-Intersection模型)。 |
[2] | See SDO_RELATE documentation ,來自 Oracle Spatial and Graph 開發人員指南。 |
[3] | (1, 2) 有關此例程的說明,請閱讀 Martin Davis(PostGIS 開發人員)的 Quirks of the “Contains” Spatial Predicate。 |
相關用法
- Python Union()用法及代碼示例
- Python Django UniqueConstraint.deferrable用法及代碼示例
- Python Django UniqueConstraint.condition用法及代碼示例
- Python Django UniqueConstraint.expressions用法及代碼示例
- Python Django UniqueConstraint.opclasses用法及代碼示例
- Python Unicode轉ASCII用法及代碼示例
- Python Django UniqueConstraint.include用法及代碼示例
- Python PIL UnsahrpMask()用法及代碼示例
- Python Django UUIDField用法及代碼示例
- Python MongoDB Update_one()用法及代碼示例
- Python Django USERNAME_FIELD用法及代碼示例
- Python Django UserPassesTestMixin.test_func用法及代碼示例
- Python Tableau UserItem用法及代碼示例
- Python Django Upper用法及代碼示例
- Python Django UpdateView.object用法及代碼示例
- Python cudf.core.column.string.StringMethods.is_vowel用法及代碼示例
- Python torch.distributed.rpc.rpc_async用法及代碼示例
- Python torch.nn.InstanceNorm3d用法及代碼示例
- Python sklearn.cluster.MiniBatchKMeans用法及代碼示例
- Python pandas.arrays.IntervalArray.is_empty用法及代碼示例
- Python tf.compat.v1.distributions.Multinomial.stddev用法及代碼示例
- Python numpy.less()用法及代碼示例
- Python Matplotlib.figure.Figure.add_gridspec()用法及代碼示例
- Python tf.compat.v1.distribute.MirroredStrategy.experimental_distribute_dataset用法及代碼示例
- Python Django File.save用法及代碼示例
注:本文由純淨天空篩選整理自djangoproject.com大神的英文原創作品 django.contrib.gis.db.models.Union。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。