From the Arcade developer docs: Type System - Point:
A point is a zero-dimensional geometry.
What is meant by "zero-dimensional geometry"?
If anything, I would have thought that X, Y, Z would be the dimensions of geometry. How can there be zero dimensions?
Solved! Go to Solution.
Coordinates by themselves aren't dimensions. Points have no dimensions. Lines have a single dimension, length. Polygons are two dimensional, they have length and width, three dimensional geometries also have height or depth.
More specifically, the number of dimensions of an object is how many values or coordinates (note not coordinate pairs) are needed to locate a point on that object. You don't need anything to locate a point on a point. You can locate a point along a line with a single x or y coordinate (or distance value). To locate a point in a polygon or on a surface, you need both x and y. And to locate a point in a 3d object, say a cube, you need x, y and z coordinates.
Coordinates by themselves aren't dimensions. Points have no dimensions. Lines have a single dimension, length. Polygons are two dimensional, they have length and width, three dimensional geometries also have height or depth.
More specifically, the number of dimensions of an object is how many values or coordinates (note not coordinate pairs) are needed to locate a point on that object. You don't need anything to locate a point on a point. You can locate a point along a line with a single x or y coordinate (or distance value). To locate a point in a polygon or on a surface, you need both x and y. And to locate a point in a 3d object, say a cube, you need x, y and z coordinates.
Thanks. And I suppose the dimensions of the geometry are not to be confused with the dimensions of an array?
Polyline
A polyline is a one-dimensional geometry. This may be created by passing JSON in the format described below to the Polyline() function or by passing a polyline feature to the Geometry() function.
Property Type Description
type text Indicates the geometry type. This value is always polyline. paths number[][][] A three-dimensional array of numbers. The inner-most array contains the x,y,z,m coordinates of a single point. The second dimension contains additional points making up a line segment. The third dimension allows the polyline to have multiple segments.
I find the description of the paths array confusing.
I wonder if an explanation like this would be better (although, it is similar to Esri's explanation):
- An outer array to hold the multi-parts. [multiple parts here]
- A middle array of one or more multi-parts.[multiple parts: [p0] [p1] ]
- An inner array that is the sets of vertices: [multiple parts: [p0: [X,Y], [X,Y], [X,Y] ] [p:1 [X,Y], [X,Y] ] ]
That explanation seems more intuitive to me.
Related: Idea - Improve Arcade polyline paths array documentation
Multipart geometry confuses things, it's a bit of an artificial construct. Each part is a 1D line, but I guess a multipart line needs 2 values to locate a point on it, an x or y coordinate and the part number. So maybe it could be considered 2D......? To theoretical for me though!
I prefer the inner->outer Esri definition rather than the outer->inner order you describe. Just the way I think, building things up rather than picking it apart.
Three-dimensional space - Wikipedia
There are other types of dimensional space, but Arcade won't be able to handle those
No, the array can have more than one dimension, it is a different "dimension" A multipart shape polyline or multipart polygon or multipoint doesn't alter the underlying geometry dimensionality.
Simple multipart polygons with inner and outer rings as arrays (numpy arrays)
multi.prn_obj()
Array structure by sub-array.
0...
array([array([array([[ 10.00, 10.00],
[ 10.00, 0.00],
[ 1.50, 1.50],
[ 0.00, 10.00],
[ 10.00, 10.00]]), array([[ 3.00, 9.00],
[ 3.00, 3.00],
[ 9.00, 3.00],
[ 9.00, 9.00],
[ 3.00, 9.00]]), array([[2.00, 7.00],
[ 1.00, 7.00],
[ 2.00, 5.00],
[ 2.00, 7.00]]), array([[ 2.00, 8.00],
[ 1.00, 9.00],
[ 1.00, 8.00],
[ 2.00, 8.00]])],
dtype=object) ,
array([array([[ 8.00, 8.00],
[ 8.00, 4.00],
[ 4.00, 4.00],
[ 5.00, 7.00],
[ 8.00, 8.00]]), array([[ 6.00, 7.00],
[ 5.00, 5.00],
[ 7.00, 5.00],
[ 6.00, 7.00]])], dtype=object)], dtype=object)
1...
array([array([[ 25.00, 14.00],
[ 25.00, 4.00],
[ 15.00, 4.00],
[ 15.00, 6.00],
[ 23.00, 6.00],
[ 23.00, 12.00],
[ 15.00, 12.00],
[ 15.00, 14.00],
[ 25.00, 14.00]]),
array([array([[ 20.00, 10.00],
[ 20.00, 8.00],
[ 12.00, 8.00],
[ 12.00, 2.00],
[ 20.00, 2.00],
[ 20.00, 0.00],
[ 10.00, 0.00],
[ 10.00, 10.00],
[ 14.00, 10.00],
[ 20.00, 10.00]]), array([[ 11.00, 9.00],
[ 12.00, 8.50],
[ 12.00, 9.00],
[ 11.00, 9.00]]), array([[ 10.50, 8.50],
[ 10.50, 7.00],
[ 11.50, 7.00],
[ 10.50, 8.50]]), array([[ 10.50, 2.00],
[ 10.50, 0.50],
[ 11.50, 0.50],
[ 10.50, 2.00]])],
dtype=object) ],
dtype=object)
2...
array([[ 14.00, 10.00],
[ 10.00, 10.00],
[ 15.00, 18.00],
[ 14.00, 10.00]])
Related:
ST_Geometry SQL function reference (page 14)
Dimensionality
The dimensions of a geometry are the minimum coordinates (none, x, y) required to define the spatial extent of the geometry.
A geometry can have a dimension of 0, 1, or 2.The dimensions are as follows:
• 0—Has neither length nor area
• 1—Has a length (x or y)
• 2—Contains area (x and y)
Point features have a dimension of 0, lines a dimension of 1, polygons a dimension of 2.
Dimension is important not only as a property of the subtype but also in determining the spatial relationship of two features. The dimension of the resulting feature or features determines whether or not the operation was successful. The dimensions of the features are examined to determine how they should be compared.
The coordinates of a geometry also have dimensions. If a geometry has only x- and y-coordinates, the coordinate dimension is 2. If a geometry has x-, y-, and z-coordinates, the coordinate dimension is 3. If a geometry has x-, y-, z- , and m-coordinates, the coordinate dimension is 4.
So it sounds like there are different concepts of “dimensions”:
What's the difference between coordinateDimension and spatialDimension?
lets not forget the often missing, and assumed fixed, temporal dimension