I have a large shapefile with 92 million points which I had converted from the pixels of a Brazil land cover map. I want to add latitude and longitude fields to the shapefile, and I did so using the Add XY Coordinates tool, but the process not only fails but also messes up my other fields. Below is a screenshot of what I get after running the process:
So POINT_X and POINT_Y are supposed to be the longitude and latitude added by the Add XY Coordinates tool. The landcover field was originally 50 for all the points seen here. The fields named "longitude" and "latitude" were mistakes but they were originally all 0. As seen here, the Add XY Coordinates tool not only failed to add the coordinates correctly (these values don't make sense), but they also changed the values of other fields - every landcover value became 0 and every latitude value turned from 0 to these weird numbers.
Why is this happening and what I can do to prevent this?
I had waited more than 3 hours for this process to run.
I also tried another method, i.e. the Calculate Geometry function in the attribute table, but it messes up the fields in a similar way (though the values it produces are different).
ST_X()
andST_Y()
without badly fragmenting the table by adding those columns.