Skip to main content
Solved

Swapping Attributes after Orienter


kimo
Contributor
Forum|alt.badge.img+10
  • Contributor

After using the Orienter on a line the attributes that are 'end sensitive' are no longer in the correct fields because of the flip. I used to use AttributeCopier (v2) which did a fine job. But an "upgrade" has broken the swap, overwriting so fields. I used to just not upgrade, but now the workbench just crashes. I cannot create a new workbench with the old AttributeCopier so I am stuck with a kludge using a whole lot of temporary variables unless there is a more elegant solution. Is there?

Just to be clear, I need to do this:

Source Target

LTO RFR

LFR RTO

RTO LFR

RFR LTO

etc for every "end sensitive" attribute. (You will remember that not only do you have to reverse the data values, but it has to be mirrored as well when a flip is done because left and right are also swapped.)

Preferably I would like AttributeCopier to revert to the original behaviour.

Best answer by jdh

The current behaviour of the transformer of altering the attributes one line at a time, rather than the transformer as a whole, matches the way the rest of the transformers work, so I doubt you'll see a reversion to the previous functionality.

 

 

Storing temporary attributes may seem kludgy, but it really only adds two transformers.

 

BulkAttributeRenamer and BulkAttributeRemover.

 

 

If performance is an issue and you have lots of end sensitive attributes, you could even only bulk rename half the attributes (either all the Froms, or all the Lefts, etc), as long as the AttributeCopier is setup in the right order. You could alternately replace the AttributeCopier with an AttributeCreator or AttributeManager.
View original
Did this help you find an answer to your question?

3 replies

redgeographics
Celebrity
Forum|alt.badge.img+50

Not exactly sure I understand what you're trying to do, but would a TopologyBuilder after the Orienter work for you?


bruceharold
Supporter
Forum|alt.badge.img+17
  • Supporter
  • June 13, 2018
redgeographics wrote:

Not exactly sure I understand what you're trying to do, but would a TopologyBuilder after the Orienter work for you?

Kim is dealing with street segments with house number ranges and side parity, when flipping a segment direction the attribute values need to change ends and left/right parity.

 

 


jdh
Contributor
Forum|alt.badge.img+28
  • Contributor
  • Best Answer
  • June 13, 2018

The current behaviour of the transformer of altering the attributes one line at a time, rather than the transformer as a whole, matches the way the rest of the transformers work, so I doubt you'll see a reversion to the previous functionality.

 

 

Storing temporary attributes may seem kludgy, but it really only adds two transformers.

 

BulkAttributeRenamer and BulkAttributeRemover.

 

 

If performance is an issue and you have lots of end sensitive attributes, you could even only bulk rename half the attributes (either all the Froms, or all the Lefts, etc), as long as the AttributeCopier is setup in the right order. You could alternately replace the AttributeCopier with an AttributeCreator or AttributeManager.

Reply


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