Skip to main content
Solved

Decomposing attribute table.

  • February 15, 2016
  • 2 replies
  • 10 views

Forum|alt.badge.img

Hello.

I have shapefiles as the source of my data. I have no knowledge of what the attributes in the shapefile are going to be.

 

What I need to do is to create an object (table row) , where for each object(row) I will have only one property and it's value (basically the oposite process of aggregator).

for example - the original (incoming) data are:

id1, property1_value, property2_value, property3_value

id2, property1_value, property2_value, property3_value

What I am trying to get:

id1, property1_name, property1_value

id1, property2_name, property2_value

id1, property3_name, property3_value

id2, property1_name, property1_value

id2, property2_name, property2_value

id2, property3_name, property3_value

Any help would be really appreciated. Thanks,

Radek

Best answer by takashi

How about this?

Rename property1/2/3_name into "prop{i}.value" and create "prop{i}.name" (i = 0, 1, 2).

Then, you can decompose the "prop{}" list with the ListExploder.

View original
Did this help you find an answer to your question?
This post is closed to further activity.
It may be a question with a best answer, an implemented idea, or just a post needing no comment.
If you have a follow-up or related question, 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.

2 replies

takashi
Contributor
Forum|alt.badge.img+19
  • Contributor
  • Best Answer
  • February 15, 2016

How about this?

Rename property1/2/3_name into "prop{i}.value" and create "prop{i}.name" (i = 0, 1, 2).

Then, you can decompose the "prop{}" list with the ListExploder.


Forum|alt.badge.img
  • Author
  • February 16, 2016
takashi wrote:

How about this?

Rename property1/2/3_name into "prop{i}.value" and create "prop{i}.name" (i = 0, 1, 2).

Then, you can decompose the "prop{}" list with the ListExploder.

Good answer, however I am not good with loops and scripting - there are going to be many more attributes, and I have no idea the exact number.

 

I have found a solution - use AttributeExploder followed by AttributeKeeper and id does exactly what I needed.

Thanks!


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings