Select to view content in your preferred language

XYTableToPoint not working - no results

10497
18
Jump to solution
05-03-2021 11:44 PM
JinseoYoon
Emerging Contributor

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)

0 Kudos
18 Replies
JinseoYoon
Emerging Contributor

Messages

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

0 Kudos
DanPatterson
MVP Esteemed Contributor

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


... sort of retired...
JinseoYoon
Emerging Contributor

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! 

0 Kudos
DanPatterson
MVP Esteemed Contributor

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.

korea.png


... sort of retired...
JinseoYoon
Emerging Contributor

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!!! 

0 Kudos
JoaoPinto
Emerging Contributor

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

0 Kudos
DanPatterson
MVP Esteemed Contributor

No problem...


... sort of retired...
0 Kudos
AlessioRadice
New Contributor

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)

AlessioRadice_0-1642147471518.png

 

AlessioRadice_1-1642147471003.png

 

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

 
 
  
 
 
0 Kudos
AlessioRadice
New Contributor

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)

AlessioRadice_0-1641986709907.png

AlessioRadice_1-1641986757352.png

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

0 Kudos