This request is about PointGeometry, which is the parent of a few featgeom classes.
Currently, to modify PointGeometry.coords, one has to assign a new iterable of coordinates to that property as follows: PointGeometry.coords = new_coordinates. However, this instead creates a new simplekml.coordinates.Coordinates object that contains all the coordinates in new_coordinates, but simplekml.coordinates.Coordinates does not support indexing.
Thus, if the user wants to modify a portion of the coordinates, the user would need to create another simplekml.coordinates.Coordinates object again by assigning PointGeometry.coords = another_new_coordinates, which is not as straightforward and as clear (or readable) to do as simply indexing it: PointGeometry.coords[x:y] = some_coordinates.
It would be much more useful if Coordinates can be modified via indexing (to modify the hidden _coords attribute of the class).
This request is about
PointGeometry, which is the parent of a fewfeatgeomclasses.Currently, to modify
PointGeometry.coords, one has to assign a new iterable of coordinates to that property as follows:PointGeometry.coords = new_coordinates. However, this instead creates a newsimplekml.coordinates.Coordinatesobject that contains all the coordinates innew_coordinates, butsimplekml.coordinates.Coordinatesdoes not support indexing.Thus, if the user wants to modify a portion of the coordinates, the user would need to create another
simplekml.coordinates.Coordinatesobject again by assigningPointGeometry.coords = another_new_coordinates, which is not as straightforward and as clear (or readable) to do as simply indexing it:PointGeometry.coords[x:y] = some_coordinates.It would be much more useful if Coordinates can be modified via indexing (to modify the hidden
_coordsattribute of the class).