how to retain attribute data

2081
6
07-17-2017 07:57 PM
LeslieJawili
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.

0 Kudos
6 Replies
DanPatterson_Retired
MVP Emeritus

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

shan_sarkar
Occasional Contributor III

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


~Shan
0 Kudos
DanPatterson_Retired
MVP Emeritus

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.) 

shan_sarkar
Occasional Contributor III

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.


~Shan
0 Kudos
DanPatterson_Retired
MVP Emeritus

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

0 Kudos
NormBetland
Occasional Contributor

Has anyone discovered a workable solution? I am trying to convert contour lines to polygons and so using a centroid will not work because many polygons here will have centroids within many polylines. 

0 Kudos