how to retain attribute data

456
5
07-17-2017 07:57 PM
Highlighted
New Contributor II

Hi guys,

I was actually transforming polylines into polygon by using the feature to polygon command unfortunately, no attribute data retained if I did this command although I checked the preserve attributes option.

Please assist me on this.

Thank you.

Reply
0 Kudos
5 Replies
Highlighted
MVP Esteemed Contributor

the order should have been retained, join the polyline's table to the polygon's table using the objectid field, then save the result

Highlighted
Regular Contributor

Dan,

Whenever we are generating a new output the ObjectID starts from 1, in that case how can we link based on ObjectID?

I think it will be better to use some other field with unique values that can be used as a Primary Key for linking and retaining the records.

I have recently faced this issue, hence I am also looking for a solution to this. Please let me know if I am missing something.

~Shan

Reply
0 Kudos
Highlighted
MVP Esteemed Contributor

Snantonu...

The assumption and general practice, within a geodatabase, is that the polygons are converted to polylines in sequential order as they exist in the table.  The polylines would begin with the same sequential construction.  If the destination was to a shapefile, for instance, or there was some concern that the object id's wouldn't then be matched, then constructing a Long field with a sequential numbering would only help if the attributes were being carried over to the destination polyline... apparently, the attributes aren't being carried over in any event.  

To be extra stafe...

  • one could perform the polygon to polyline conversion
  • convert the polygons to centroids
  • spatially join the centroids to the polyline
  • save the result

Other approaches could include intersects etc. but I wouldn't even go there until I had finished validating the data (ie compare polygon and polyline perimeters, compare true centroids and a variety of other data validation tests.) 

Highlighted
Regular Contributor

Yes, I agree and that is in fact what I have done to get around this and it worked out quite nicely for me. I'll admit it is a little time consuming but it get the job done.

Reply
0 Kudos
Highlighted
MVP Esteemed Contributor

Of course if we had all read the most recent help topic

  • The Preserve attributes parameter (the attributes parameter in scripting) does not work and should not be used. It will not be removed for backward compatibility of scripts or models. The output attribute schema and field values for certain input combinations may be produced as described below; most of them are unintended.

    so data validation is really a good idea

Reply
0 Kudos