Skip to content

sids_from_polygon() vs make_sids() #155

@NiklasPhabian

Description

@NiklasPhabian

Question

On the whole, I’m unsure as to why there are so many options, or when to use one over the other, or why add_sids doesn’t give the same results as calling a_sdf.make_sids() or starepandas.tools.sids_from_polygon. It seems to me given the title STAREPandas that I should prefer dataframe operations like add_sids or a_sdf.make_sids over calling extra-df methods like
starepandas.tools.sids_from_polygon.

Answer

  • STAREDataFrame.make_sids() will return a series of SIDs computed from the geometry column of the STAREDataFrame object.
  • The STAREDataFrame constructor has an option to add_sids when bootstrapping an SDF from a GDF. Unfortunately, the constructor does not allow setting force_ccw and convex. It sets force_ccw=True and convex=False. If you have a CW polygon, the constructor will force it to be CCW, while make_sids allows you to keep it CW.
  • starepandas.tools.sids_from* are indeed internal methods that make_sids utilizes. Users are not expected to interact with them, though they can be useful to access directly in certain situations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions