Maptitude GISDK Help |
Copies an array to a vector.
Added to Version 6.0/2012.
vec = ArrayToVector(array arr [, array options])
Argument |
Contents |
arr |
The array to convert to a vector |
Options |
Type |
Contents |
Row Based |
String |
"True" (the default) means v.rowbased will be "True"; "False" means v.columnbased will be "True" |
Type |
String |
The type of number ("Double", "Float", "Long", or "Short"), or the type "String" |
A vector.
The options array is an optional argument.
If no Type is provided, the array elements are scanned and a reasonable type is chosen. Double will be chosen rather than Float to prevent loss of precision.
If an array element cannot be converted to the Type of the vector, it is set to null.
Can also be called as A2V().
For more information on vectors, see Vectors.
arr = {1, 3, 5.6, 7, 9}
vec = ArrayToVector(arr)
ShowArray({vec}) // vec = 1.0, 3.0, 5.6, 7.0, 9.0 as doubles
arr = {1, 3, 5.6, "7", 9}
vec = ArrayToVector(arr)
ShowArray({vec}) // vec = "1", "3", "5.6", "7", "9"
arr = {1.2, 3.4, 5.6, "7", 9}
vec = ArrayToVector(arr, {{"Type","Float"}})
ShowArray({vec}) // vec = 1.2, 3.4, 5.6, null, 9.0
GISDK Function |
Summary |
Copies a vector to a new vector |
|
Constructs a cumulative vector in a new vector |
|
Concatenates vectors into one, combined long vector |
|
Creates a vector from a field in a view|set |
|
Creates vectors from fields in a view|set |
|
Fills values into a field in a view|set from a vector |
|
Fills values into fields in a view|set from vectors |
|
Sorts the elements of a vector in ascending order |
|
Sorts an array of vectors in ascending order, based on the first vector |
|
Transposes an array of arrays, where element b[i][j] = a[j][i] |
|
Creates a vector |
|
Computes a given statistic for the vector |
|
Copies a vector to an array |
©2025 Caliper Corporation | www.caliper.com |