Skip to main content
Solved

how to rename multiple reader feature type attributes with different names to a single writer feature type attribute

  • February 17, 2015
  • 8 replies
  • 45 views

iew
Contributor
Forum|alt.badge.img+2
  • Contributor
I have multiple FCs in multiple FGDBs which I need to run through NeighbourFinder to generate distance/proximity info and then write into a single Excel writer feature type. These FCs have certain attributes I want to carry over into the writer but they are all named slightly differently. I would like some suggestions on the best way to carry this out please so it is easy to swap different combinations of Attribute in and out.

Best answer by takashi

Hi,

 

 

I cannot grasp your requirement exactly yet, but try "super-clairvoyance" ;)

 

If each of "SSSI_NAME", "Location", "Name", "TYPE" and "LNR_NAME" is from different feature type and you are trying to replace all of them with an identical name, this could be a solution.

 

 

Takashi
View original
Did this help you find an answer to your question?
<strong>This post is closed to further activity.</strong><br /> It may be a question with a best answer, an implemented idea, or just a post needing no comment.<br /> If you have a follow-up or related question, please <a href="https://community.safe.com/topic/new">post a new question or idea</a>.<br /> If there is a genuine update to be made, please contact us and request that the post is reopened.

8 replies

david_r
Celebrity
  • February 17, 2015
Hi,

 

 

have a look at the BulkAttributeRenamer. If that isn't enough, the SchemaMapper might be the next step (more powerful, but also a lot more complex to configure).

 

 

David

iew
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • February 17, 2015
Thanks. I have had a look at the BulkAttributeRenamer but can't seem to get it to work. I have tried RegEx and String replacer but I am not getting the desired reuslt. Is it best to rename everyting to a 'new' name or match to an existing one?

david_r
Celebrity
  • February 18, 2015
Hi,

 

 

can you give us an example of what you're trying to accomplish?

 

 

David

iew
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • February 18, 2015

 

All of the attributes in above AttributeKeeper come from different FCs but hold the same type of attribute. i would like to be able to write these to a single Excel writer as a single attribute, possibly NewName, and have an attribute that contains the name of the source feature type.

david_r
Celebrity
  • February 18, 2015
If I suppose only one of these attributes hold a value for any given feature, you could use a few chained NullAttributeMappers to isolate the one attribute holding a value, then rename it using a regular AttributeRenamer.

 

 

David

takashi
Influencer
  • Best Answer
  • February 18, 2015
Hi,

 

 

I cannot grasp your requirement exactly yet, but try "super-clairvoyance" ;)

 

If each of "SSSI_NAME", "Location", "Name", "TYPE" and "LNR_NAME" is from different feature type and you are trying to replace all of them with an identical name, this could be a solution.

 

 

Takashi

iew
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • February 18, 2015
Takashi

 

That's it! I think I had just been incorrect with the sytax I was using for the RegEx. This now does what I what it too. In this example I provided a subset of attributes to handle, but I think I will be able to now use this technique on other combinations, such as each FC has a different attribute for their Unquie IDs which I would want to handle in this way also. There are a few other groups of Attribute which need to consolidated in this way so I guess a BulkAttributeRenamer for each insatnce.

iew
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • February 18, 2015
David

 

Thank you also for your help, much appreciated.

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