Hi,
I am using Arcgis pro notebook for geocoding XY coordinations. While I can do it with "Display XY data" function (by right clicking the layer in the content panel), I cannot do it with a very simple code in the notebook.
The code and output are copied here.
Nothing has been created, either the table or the point shape file.
Can anyone help? Thank you very much in advance.
------ code ---------
arcpy.env.workspace = r"c:\WORK\GIS\OUTPUT.gdb"
# Set the local variables
in_folder = r"c:\WORK\GIS\PED_MOVE\flow_age_ymd_202006_sample.csv"
x_coords = "X_COORD"
y_coords = "Y_COORD"
z_coords = ""
out_fc = "flow_age_ymd_202006_sample"
arcpy.management.XYTableToPoint(in_folder, out_fc, x_coords, y_coords, z_coords, arcpy.SpatialReference("Korea Geodetic Datum 2000"))
----------------
Output
c:\WORK\GIS\OUTPUT.gdb\flow_age_ymd_202006_sample
Messages
Start Time: XXX
WARNING 100160: Some of the features have invalid geometry and have been removed from the result
WARNING 000192: Invalid value for rows: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49
Succeeded at XXX (Elapsed Time: 1.79 seconds)
Solved! Go to Solution.
Start Time: 2021년 5월 7일 금요일 오전 5:58:25
WARNING 100160: Some of the features have invalid geometry and have been removed from the result
WARNING 000192: Invalid value for rows: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49
That leaves issues with your csv, assuming that you have 49 point features, it seems they are all wrong or not properly formatted as a *.csv file.
Perhaps posting a few sample lines of the file might help
A, B, C
1, 2, 3
4, 5, 6
....
for instance
Thank you and sorry for the late response.
I thought that too, but with this data, the xy point shape file could be successfully made with the "Display XY Data" tool by simply right clicking the table in the content panel.
I attach the file here, would you please take a look? It would be very much appreciated. Thank you very much!
The coordinates are in a projected coordinate system.
I had to use another one for Korea, so the results may not be correct.
Yours isn't listed in the available projected coordinates for Korea.
Here is what I got with what I used.
Back to you to figure out what to use, to make the error go away.
Thank you very much!! The problem was in the coordination system as you pointed out. Thank you for making this work!!! I really appreciate it!!!
Hi DanPatterson!
I have the same problem.
My points maybe projected in ETRS89.
Initially I thought there was conflict with the esri basemap coordinate system.
But the same errors appear as JinseoYoon.
I attach my csv.
Thanks
No problem...
Sorry to crash into a solved issue but I have the same problem trying to display XY data from a table provided (as .txt, as .csv, as .xlsx, I tried different ways)
Data are in European Datum 1950 reference system.
I do not really figure out what is going wrong.
I also point out that, for another project, I could successfully do it some time ago. Then, today I tried to redo the same command and got the same warning message.
Many thanks, alessio
Sorry to crash into a solved issue but I have the same problem trying to display XY data from a table provided (as .txt, as .csv, as .xlsx, I tried different ways)
Data are in European Datum 1950 reference system.
I do not really figure out what is going wrong.
I also point out that, for another project, I could successfully do it some time ago. Then, today I tried to redo the same command and got the same warning message.
Many thanks, alessio