AnsweredAssumed Answered

Rounded/Erroneous Lat/Long point feature locations using arcpy.da.FeatureClassToNumPyArray

Question asked by allisonb on Dec 28, 2016
Latest reply on Dec 30, 2016 by vangelo-esristaff

I created a NumPy array from a CSV file and sued arcpy.da.NumPyArrayToFeatureClass to convert it to a point feature class using the lat/long columns (decimal degrees).   The output location coordinates appear to be rounded, so that many of the features are now co-located.     I checked the input NumPy array values, and they are correct.

 

Below is a snippet of the first 10 line of the input file (lat/long in 5th/6th columns):

core002,1,6/2/2014,17:41:16,48.563868,-122.922793,-6.018824,-6.018824,0,1,0,0,0
core002,1,6/2/2014,17:41:17,48.563868,-122.922793,-6.248483,-6.248483,0,1,0,0,0
core002,1,6/2/2014,17:41:18,48.563868,-122.922792,-6.346908,-6.346908,0,1,0,0,0
core002,1,6/2/2014,17:41:19,48.563868,-122.922788,-6.478141,-6.478141,0,1,0,0,0
core002,1,6/2/2014,17:41:20,48.563868,-122.922787,-6.839035,-6.839035,0,1,0,0,0
core002,1,6/2/2014,17:41:21,48.563870,-122.922785,-7.167119,-7.167119,0,1,0,0,0
core002,1,6/2/2014,17:41:22,48.563870,-122.922783,-9999.000000,-7.380373,0,1,0,0,0
core002,1,6/2/2014,17:41:23,48.563870,-122.922782,-7.593627,-7.593627,0,1,0,0,0
core002,1,6/2/2014,17:41:24,48.563870,-122.922778,-7.757669,-7.757669,0,1,0,0,0
core002,1,6/2/2014,17:41:25,48.563870,-122.922777,-7.888903,-7.888903,0,1,0,0,0

I compared that to an output NumPy array exported using arcpy.da.FeatureClassToNumPyArray from the point feature class that I created.   All of the XY locations for these 10 records are now identical (and incorrect).   They do change as you go further into the file, but this sample exhibits the co-location issue.

core002,1,6/2/2014,17:41:16,48.563904,-122.922791,-6.018824,-6.018824,0,1,0,0,0
core002,1,6/2/2014,17:41:17,48.563904,-122.922791,-6.248483,-6.248483,0,1,0,0,0
core002,1,6/2/2014,17:41:18,48.563904,-122.922791,-6.346908,-6.346908,0,1,0,0,0
core002,1,6/2/2014,17:41:19,48.563904,-122.922791,-6.478141,-6.478141,0,1,0,0,0
core002,1,6/2/2014,17:41:20,48.563904,-122.922791,-6.839035,-6.839035,0,1,0,0,0
core002,1,6/2/2014,17:41:21,48.563904,-122.922791,-7.167119,-7.167119,0,1,0,0,0
core002,1,6/2/2014,17:41:22,48.563904,-122.922791,-9999.000000,-7.380373,0,1,0,0,0
core002,1,6/2/2014,17:41:23,48.563904,-122.922791,-7.593627,-7.593627,0,1,0,0,0
core002,1,6/2/2014,17:41:24,48.563904,-122.922791,-7.757669,-7.757669,0,1,0,0,0
core002,1,6/2/2014,17:41:25,48.563904,-122.922791,-7.888903,-7.888903,0,1,0,0,0

Anyone have any idea why this is happening.  And, if so, is there a solution?

Outcomes