Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Writing Columns and Values from Graphics to Saved Features #90

Closed
mcalamito opened this issue Mar 22, 2016 · 17 comments
Closed

Writing Columns and Values from Graphics to Saved Features #90

mcalamito opened this issue Mar 22, 2016 · 17 comments

Comments

@mcalamito
Copy link

Saving graphics as features (shapefile, feature class, and KML) is crucial, but so is saving the attributes that correspond to these features. The user will be inputting information into the Distance and Direction form or drawing on the map interactively. These values must be present in the attribute table when the graphic is saved to a feature or the user will not have values associated with each feature.

For any input field that has a unit, the corresponding Column/Field header name in the attribute will end with "_x" where x = the unit in which defines the input field.

The following columns and values should be included when writing graphics to features:

Lines: Start_Pt, End Pt, Dist_x, Angle_x - where x is the unit the user chose from the unit dropdown.

Circle: Center_Pt, Radius_x OR Diameter_x - depending on if the user chose Radius or Diameter

Ellipse: Center_Pt, Minor_x, Major_x, Orient_x - where x is the unit the user chose from the unit dropdown.

Rings: Center_Pt, Rings, Dist_x, Radials - where x is the unit the user chose from the unit dropdown.

These are only suggested column names and I welcome any discussion.

@pshowalter
Copy link
Contributor

Additional consideration for this enhancement: The previous version of "MA" (10.1) had ability to use information from the metrics used to create graphics for labels on Geodesy features, and Range Ring. In addition to the graphics, generating from stored attributes would be nice additional functionality.

image

@nfeuerstein nfeuerstein added this to the Version - After Next milestone Dec 15, 2016
@rjones0 rjones0 self-assigned this Jan 30, 2017
@rjones0
Copy link
Contributor

rjones0 commented Feb 2, 2017

PR: #309

This PR contains the basics of writing the attributes into the exported FC. With this in place it should hopefully be a matter of fine tuning towards the exact functionality required.

@rjones0
Copy link
Contributor

rjones0 commented Feb 14, 2017

@mcalamito @pshowalter the basics of the functionality have been added. Please review and provide comments or close if appropriate. Note that saving from Pro is a little slow with this fix - this is due to a limitation in the API (the fields have to be added to the output Feature Class one by one).

@rjones0 rjones0 assigned rjones0 and unassigned rjones0 Feb 14, 2017
@rjones0
Copy link
Contributor

rjones0 commented Feb 20, 2017

@mcalamito @pshowalter I am going to close this issue as I am confident it is resolved. Please let me know if you disagree.

@rjones0 rjones0 closed this as completed Feb 20, 2017
@pshowalter
Copy link
Contributor

@rjones0
Would it make sense to copy an existing empty schema, and then populate with features, rather than building up the schema by adding fields one at atime?

@rjones0
Copy link
Contributor

rjones0 commented Mar 2, 2017

@pshowalter I think that is a superior approach, and I referred to similar/same in my PR: #309

I think the obvious method is to include files with template schema i.e. Shapefile/FGDB containing FC with appropriate fields as embedded resources in the solution. I would have to check if this approach works with an AddIn. Happy to investigate this, especially as the Pro SDK doesn't seem to have what I need to build up the schema fully in code, and the method I was forced to use (adding the fields one by one) seemed very slow in testing.

@kgonzago what is your opinion on above?

@kgonzago
Copy link
Member

kgonzago commented Mar 2, 2017

@rjones0 an empty shapefile with a predefined schema and executing the FC to FC tool to create output FC. Seems like a good approach which might be more efficient than calling the add field tool numerous times over.

@NatalieCampos
Copy link

This enhancement recommended the following fields be added when graphics are saved.

Lines: Start_Pt, End Pt, Dist_x, Angle_x - where x is the unit the user chose from the unit dropdown.
Circle: Center_Pt, Radius_x OR Diameter_x - depending on if the user chose Radius or Diameter
Ellipse: Center_Pt, Minor_x, Major_x, Orient_x - where x is the unit the user chose from the unit dropdown.
Rings: Center_Pt, Rings, Dist_x, Radials - where x is the unit the user chose from the unit dropdown.

However, only the following fields are added:
Lines: Angle, Distance
Circle: Distance, DistanceType
Elipse: Minor, Major, Angle
Rings: Rings, Distance, Angle

The following fields are still missing from the enhancement request:
Lines: Start_Pt, End Pt
Circle: Center_Pt
Ellipse: Center_Pt
Rings: Center_Pt

@nfeuerstein @lfunkhouser Do these fields need to be added?

@dfoll
Copy link
Collaborator

dfoll commented May 16, 2017

in Pro with build 1474 these fields are being added to feature class and shapefile for line, circle, and ellipse. In ArcMap, Rings are not populating the fields for distance unit and centerpoint. Still at 1474, some of the kmz are seemingly randomly getting corrupted, however the ones that did work did not have the fields added.

In ArcMap, only feature class is working

@pHill5136
Copy link
Contributor

please verify

@NatalieCampos
Copy link

NatalieCampos commented May 22, 2017

@pHill5136
There are differences in attribute when written to shp vs feature class. The lines are missing the DestinationX and DestinationY fields.
image

@NatalieCampos
Copy link

NatalieCampos commented May 22, 2017

@pHill5136 Also my KMZs still have no attributes when saved from Pro 1.4

@pHill5136
Copy link
Contributor

please verify pr: #391

@NatalieCampos
Copy link

The missing fields have been added. Closing issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment