-
Notifications
You must be signed in to change notification settings - Fork 14
Closed
Description
If you call assign_coords on a DataArray with one or more GeometryIndex, they all get downgraded to PandasIndex.
This also needs to be fixed before I can move on with #11 as it currently breaks transformation of multiple coordinates at the same time.
In [2]: geom_dataset = xarray.Dataset(
...: coords={"geom": numpy.array([shapely.Point(1, 2), shapely.Point(3, 4)]), "value": [1, 2]}
...: ).drop_indexes("geom").set_xindex("geom", GeometryIndex, crs=26915)
...: geom_dataset.xindexes
Out[2]:
Indexes:
value PandasIndex
geom GeometryIndex (crs=EPSG:26915)
In [3]: geom_dataset.assign_coords(new=['a', 'b']).xindexes
Out[3]:
Indexes:
value PandasIndex
geom PandasIndex
new PandasIndexReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels