FromWKB
Resumen
Creates a geometry object from a well-known binary (WKB) string stored as a bytearray or bytes object.
Sintaxis
FromWKB(byte_array)
| El parámetro | Explicación | Tipo de datos |
|---|---|---|
|
byte_array |
A WKB string stored in a |
Bytearray |
Valor de retorno
| Tipo de datos | Explicación |
|---|---|
|
Geometry |
Returns a geometry object ( |
Muestra de código
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)