FromWKB

サマリー

Creates a geometry object from a well-known binary (WKB) string stored as a bytearray or bytes object.

構文

FromWKB (byte_array)
パラメーター説明データ タイプ
byte_array

A WKB string stored in a bytearray or bytes object.

Bytearray
戻り値
データ タイプ説明
Geometry

Returns a geometry object (PointGeometry, Multipoint, Polyline, or Polygon) based on the input bytearray or bytes object.

コードのサンプル

FromWKB example

This example illustrates the use of converting a WKB to a geometry object.

import arcpy

fc = "c:/base/gdb.gdb/counties"

rows = arcpy.da.SearchCursor(fc, ['SHAPE@'])
studyarea = rows.next()[0]

# Create geometry to WKB
polyWKB = studyarea.WKB

# Convert WKB back to a geometry
polyGeom = arcpy.FromWKB(polyWKB)

関連トピック


このトピックの内容