Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request: make simplekml.coordinates.Coordinates indexable #37

Open
IWinarto opened this issue May 18, 2018 · 0 comments
Open

Request: make simplekml.coordinates.Coordinates indexable #37

IWinarto opened this issue May 18, 2018 · 0 comments

Comments

@IWinarto
Copy link

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant