xy = (47.550976, 42.963041) array = arcpy.Array() with arcpy.da.InsertCursor(schetchiki_path,['SHAPE@XY', 'Name']) as c: c.insertRow([xy,name])
I changed to using Arcade so that the lat/longs are always up to date. No one remembers to change them when they move a point. Works great in a web map or ArcPro.
Another option if using SDE is Attribute Rules so that they autoupdate.
WGS 84 in Arcade
CurrentLatvar originShift = 2.0 * PI * 6378137.0 / 2.0;var lon = (Geometry($feature).x / originShift) * 180.0;var lat = (Geometry($feature).y / originShift) * 180.0;
lat = 180.0 / PI * (2.0 * Atan( Exp( lat * PI / 180.0)) - PI / 2.0);
return lat;
CurrentLongvar originShift = 2.0 * PI * 6378137.0 / 2.0;var lon = (Geometry($feature).x / originShift) * 180.0;var lat = (Geometry($feature).y / originShift) * 180.0;
return lon;
Make sure to config the popup to show 8 decimals.
Hope that helps. I know not what you asked but it may work for you.
See in the help for python examples: Write geometries.
Or (MUCH easier!) create a table with your xy values in it and use the XY Table To Point, or Make XY Event Layer tools to create your points.
That must be a partial script because whatever you are trying to do might just add a value to the Shape field but it won't do anything for the fields you have shown in your example
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.