本文介紹 django.contrib.gis.geos.WKBWriter.outdim
的用法。
聲明
outdim
可以設置此屬性以更改幾何表示的輸出尺寸。換句話說,如果您有 3D 幾何體,則設置為 3,以便 Z 值包含在 WKB 中。
外圍值 | 說明 |
---|---|
2 | 默認情況下,輸出 2D WKB。 |
3 | 輸出 3D WKB。 |
例子:
>>> from django.contrib.gis.geos import Point, WKBWriter
>>> wkb_w = WKBWriter()
>>> wkb_w.outdim
2
>>> pnt = Point(1, 1, 1)
>>> wkb_w.write_hex(pnt) # By default, no Z value included:
'0101000000000000000000F03F000000000000F03F'
>>> wkb_w.outdim = 3 # Tell writer to include Z values
>>> wkb_w.write_hex(pnt)
'0101000080000000000000F03F000000000000F03F000000000000F03F'
相關用法
- Python Django WKBWriter.write_hex用法及代碼示例
- Python Django WKBWriter.byteorder用法及代碼示例
- Python Django WKBWriter.srid用法及代碼示例
- Python Django WKBWriter.write用法及代碼示例
- Python Django WKBReader用法及代碼示例
- Python Django WKTWriter.trim用法及代碼示例
- Python Django WKTReader用法及代碼示例
- Python Django WKTWriter.write用法及代碼示例
- Python Django WKTWriter.precision用法及代碼示例
- Python Wand negate()用法及代碼示例
- Python Wand wavelet_denoise()用法及代碼示例
- Python Wand local_contrast()用法及代碼示例
- Python Wand sample()用法及代碼示例
- Python Wand deskew()用法及代碼示例
- Python Wand color()用法及代碼示例
- Python Wand implode()用法及代碼示例
- Python Wand adaptive_blur()用法及代碼示例
- Python Wand unsharp_mask()用法及代碼示例
- Python Wand gaussian_blur()用法及代碼示例
- Python Wand polaroid()用法及代碼示例
- Python Wand adaptive_sharpen()用法及代碼示例
- Python Wand posterize()用法及代碼示例
- Python Wand path_move()用法及代碼示例
- Python Wand transform()用法及代碼示例
- Python Wand shave()用法及代碼示例
注:本文由純淨天空篩選整理自djangoproject.com大神的英文原創作品 django.contrib.gis.geos.WKBWriter.outdim。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。