Automatic Updates in X Y data fields

861
9
09-01-2016 02:50 PM
Highlighted
New Contributor III

Is it possible to display X Y coordinates for a point shapefile in a geodatabase which will cause the values to automatically update whenever the point is moved? Just like how the "shape.len" field in a line featureclass in a geodatabase works. When the line is stretched, the length is also increased accordingly. 

Awaiting your discussion!

Thanks in advance!

Gideon

Reply
0 Kudos
9 Replies
Highlighted
MVP Esteemed Contributor

shapefiles can't auto-update anything, nor do they have their coordinates in the table, unless actually calculated.  Even then, they would have to be manually updated upon change.

Could you clarify why this needs to be accomplished? Is this a convenience function?

Reply
0 Kudos
Highlighted
New Contributor III

Actually I'm working with a point featureclass in an enterprise geodatabase not a shapefile. Sorry for missleading. So I have thounsands of points which I want their lat longs to be displayed in the attribute table. Every day a few of these points locations will be changed. I would like for their new coordinates to be updated automatically. 

Reply
0 Kudos
Highlighted
Esri Esteemed Contributor

If the points were in a database instance you could create a trigger to automatically update both lon and lat when the geometry was updated (and vice versa -- update the geometry when either lon or lat was changed).  Neither shapfiles nor file geodatabase support the concept of triggers, which means your application will need to enforce the desired behavior, but this can be defeated by not using the application.

- V

Highlighted
New Contributor III

Sounds very interesting Vince. What's the first step in creating that trigger?

Reply
0 Kudos
Highlighted
Esri Esteemed Contributor

That entirely depends on what RDBMS you are using.  Please be sure to specify the exact version of ArcGIS and the exact database product (with complete version, to patch level) with each initial post (it will generate answers faster, since there won't need to be multiple queries for additional information, or answers not applicable to your environment).  Note that "shapefile" is a specific format, and when its data is loaded in a database it is no longer in that format.

- V

Reply
0 Kudos
Highlighted
Occasional Contributor II

Hi all

Additionally, I suppose that you can create a view that "exposes" ST_X and ST_Y of the original geometry...

Regards

Jesús de Diego

Reply
0 Kudos
Highlighted
New Contributor III

How do I create that viewJesús de Diego?

Reply
0 Kudos
Highlighted
Occasional Contributor II

Are you using an Enterprise Geodatabase? Which version? 

Is your base feature class registered as versioned? 

Which geometry type storage are you using for this layer? You should use ST_Geometry or your DMBS. specific geometry type.

Jesús de Diego

Reply
0 Kudos
Highlighted
by
Occasional Contributor II

Hello,

The attribute assistant add-in would do the trick, if you are doing the edits within ArcMap.

Attribute Assistant | ArcGIS Solutions 

Reply
0 Kudos