Skip to main content
Question

Python getAllAttributeNames - order?

  • November 21, 2018
  • 5 replies
  • 35 views

ebygomm
Influencer
Forum|alt.badge.img+46

What controls the order that attribute names are listed when using feature.getAllAttributeNames ?

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

5 replies

mark2atsafe
Safer
Forum|alt.badge.img+59
  • Safer
  • November 21, 2018

Would getSequencedAttributeNames do what you need?

"This method gets a list of sequenced attribute names in the order they were added to the feature."

ebygomm
Influencer
Forum|alt.badge.img+46
  • Author
  • Influencer
  • November 21, 2018

Would getSequencedAttributeNames do what you need?

"This method gets a list of sequenced attribute names in the order they were added to the feature."

I think I have to have a schema to start with to use this, I'm trying to create a dynamic schema to use in a writer


daveatsafe
Safer
Forum|alt.badge.img+20
  • Safer
  • November 21, 2018

I think I have to have a schema to start with to use this, I'm trying to create a dynamic schema to use in a writer

Hi @egomm,

You can get a list of the attribute names on a feature without Python, using the AttributeExploder. This might be more useful for creating a schema feature.


ebygomm
Influencer
Forum|alt.badge.img+46
  • Author
  • Influencer
  • November 21, 2018

Hi @egomm,

You can get a list of the attribute names on a feature without Python, using the AttributeExploder. This might be more useful for creating a schema feature.

I can create the schema dynamically in python, i was just curious as I couldn't decipher what logic was being used to control the order of feature.getAllAttributeNames


takashi
Celebrity
  • November 21, 2018

I think that it depends on the implementation. If the name/value pairs of attributes was implemented with the Python dictionary and the getAllAttributeNames method would just return the list of its keys, the order would be unpredictable.