Skip to main content
Question

Python getAllAttributeNames - order?

  • Nov 21, 2018 4:00 PM UTC
  • 5 replies
  • 77 views

ebygomm
Evangelist
Forum|alt.badge.img+54

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

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
Evangelist
Forum|alt.badge.img+54
  • Author
  • Evangelist
  • Nov 21, 2018 4:47 PM UTC

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+24
  • Safer
  • Nov 21, 2018 5:26 PM UTC

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
Evangelist
Forum|alt.badge.img+54
  • Author
  • Evangelist
  • Nov 21, 2018 7:21 PM UTC

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
  • Nov 21, 2018 11:00 PM UTC

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.