You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
The text was updated successfully, but these errors were encountered:
This request is about
PointGeometry
, which is the parent of a fewfeatgeom
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 newsimplekml.coordinates.Coordinates
object that contains all the coordinates innew_coordinates
, butsimplekml.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 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
_coords
attribute of the class).The text was updated successfully, but these errors were encountered: