@@ -13,10 +13,10 @@ kernelspec:
13
13
14
14
# Geometries
15
15
16
- See
16
+ See
17
17
18
- 1 . {py: func }` cf_xarray.shapely_to_cf `
19
- 1 . {py: func }` cf_xarray.cf_to_shapely `
18
+ 1 . {py: func }` cf_xarray.shapely_to_cf `
19
+ 1 . {py: func }` cf_xarray.cf_to_shapely `
20
20
21
21
In order to support vectors as well as arrays ` cf_xarray ` can convert between shapely objects
22
22
and CF-compliant representations of those geometries.
@@ -37,7 +37,7 @@ da = xr.DataArray(
37
37
Point(3.0, 4.0),
38
38
Point(4.0, 5.0),
39
39
Point(3.0, 4.0),
40
- ],
40
+ ],
41
41
dims=("index",),
42
42
name="geometry"
43
43
)
@@ -49,7 +49,7 @@ da = xr.DataArray(
49
49
geometries of the same type.
50
50
```
51
51
52
- Now we can take that ` xr.DataArray ` containing shapely geometries and convert it to cf:
52
+ Now we can take that ` xr.DataArray ` containing shapely geometries and convert it to cf:
53
53
54
54
``` {code-cell}
55
55
ds_cf = cfxr.shapely_to_cf(da)
@@ -61,12 +61,12 @@ geometries. In particular there are:
61
61
62
62
- 'x', 'y' : the node coordinates
63
63
- 'crd_x', 'crd_y' : the feature coordinates (might have different names if ` grid_mapping ` is available).
64
- - 'node_count' : The number of nodes per feature. Always present for Lines and Polygons. For
65
- Points: only present if there are multipart geometries.
66
- - part_node_count : The number of nodes per individual geometry. Only for Lines with multipart
67
- geometries and for Polygons with multipart geometries or holes.
64
+ - 'node_count' : The number of nodes per feature. Always present for Lines and Polygons. For
65
+ Points: only present if there are multipart geometries.
66
+ - part_node_count : The number of nodes per individual geometry. Only for Lines with multipart
67
+ geometries and for Polygons with multipart geometries or holes.
68
68
- interior_ring : Integer boolean indicating whether ring is interior or exterior. Only for
69
- Polygons with holes.
69
+ Polygons with holes.
70
70
- 'geometry_container' : Empty variable with attributes describing the geometry type.
71
71
72
72
Here are the attributes on ` geometry_container ` . This pattern mimics the convention of
@@ -93,6 +93,6 @@ By default these are called `crd_x` and `crd_y` unless `grid_mapping` is specifi
93
93
94
94
For MultiPolygons with holes the CF notation is slightly ambiguous on which hole is associated
95
95
with which polygon. This is problematic because shapely stores holes within the polygon
96
- object that they are associated with. ` cf_xarray ` assumes that the the shapes are interleaved
97
- such that the holes (interior rings) are associated with the exteriors (exterior rings) that
96
+ object that they are associated with. ` cf_xarray ` assumes that the the shapes are interleaved
97
+ such that the holes (interior rings) are associated with the exteriors (exterior rings) that
98
98
immediately precede them.
0 commit comments