Skip to main content

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

Would getSequencedAttributeNames do what you need?

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

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


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.


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


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.


Reply