Skip to content

Request: make simplekml.coordinates.Coordinates indexable #37

Description

@IWinarto

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions