Skip to main content
Solved

Split spreadsheet of car park data in to sections for each car park

  • August 10, 2020
  • 4 replies
  • 28 views

markcoopersdc
Contributor
Forum|alt.badge.img+6

I have a spreadsheet derived from a pdf report containing dates/times tickets were purchased in a number of car parks. Unfortunately, the car park name is not a separate column, but instead it appears as a heading before the data. Is there a way to split the data at the end of each section? Eventually I would like the car park name as a separate column, but I guess to start with I need to split the data into different sections?

 

Any ideas how this could be done?

 

Many thanks

Best answer by ebygomm

You can use an attributecreator with adjacent attribute handling to create a new attribute on each feature that lists the car park. So check if first column begins with the word Car Park, if it does create an attribute called Car Park with that value, if it doesn't use the value of Car Park from the previous feature to set the value of Car Park

Capture

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.

4 replies

ebygomm
Influencer
Forum|alt.badge.img+45
  • Influencer
  • Best Answer
  • August 10, 2020

You can use an attributecreator with adjacent attribute handling to create a new attribute on each feature that lists the car park. So check if first column begins with the word Car Park, if it does create an attribute called Car Park with that value, if it doesn't use the value of Car Park from the previous feature to set the value of Car Park

Capture


markcoopersdc
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • August 11, 2020

Hi

 

Thanks for this. Unfortunately the actual data does not contain the word car park but i have got the data just to have the name of the car park in a column or an empty string.

 

However, I am failing on attribute creator bit. Ive set up the adjacent feature (which is an amazing feature I did not know about) and the conditional statement but it will not let me use the value of this new attribute in the calculation - it just highlights it red. Any clues to what I am doing wrong?

 

Thanks

CarPark2


ebygomm
Influencer
Forum|alt.badge.img+45
  • Influencer
  • August 11, 2020

Hi

 

Thanks for this. Unfortunately the actual data does not contain the word car park but i have got the data just to have the name of the car park in a column or an empty string.

 

However, I am failing on attribute creator bit. Ive set up the adjacent feature (which is an amazing feature I did not know about) and the conditional statement but it will not let me use the value of this new attribute in the calculation - it just highlights it red. Any clues to what I am doing wrong?

 

Thanks

CarPark2

The easiest way to remove this is to add an additional AttributeCreator before the one that does hte adjacent feature handling which creates the CarPark attribute. I'm pretty sure it still works, even when it's highlighted red like that, but it's annoying so I normally add in the extra AttributeCreator

 

It doesn't look like your conditional statement is set up quite right at hte moment, as it looks like you're using the empty location attribute to set the value


markcoopersdc
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • August 11, 2020

Hi

 

I have added the extra AttributeCreator in (and corrected the Location statement to NOT empty!) and it works perfectly. Thank you so much for your help.