Select to view content in your preferred language

raster to .csv bug- using sample tool

492
0
05-18-2020 10:09 AM
AmandaTemple
New Contributor

A colleague of mine who works in R requested a .csv table of a habitat/landcover raster dataset, including the habitat values as well as the location x,y coordinate data. I was trying to save my colleague a step of converting to .csv in R studio, but was unsure if there is a solution in ArcPro at the moment?

As a work around to converting a raster dataset (categorical) to a .csv I used the Sample tool, Sample Tool Description , to create a table and then exported this table to a .csv in ArcPro 2.5.1. However, one persistent issue was brought to my attention by the colleague when they imported the .csv table into R.

I found a sneaky little bug in the habitat layer that I'm hoping you could help me with. When I rasterized the point's you provided I saw these horizontal white lines, as shown below.

I thought these were just plotting artifacts, but it turns out that there's actually missing habitat values across these bands. I dug into it and found which rows in the habitat data were missing, and realized these bands were 140 rows apart (so if the row with index "i" is missing, so is the row with index "i + 140").

image.png

Any thoughts? Has anyone else encountered this issue of missing Y values every x# of rows or has other suggestions for converting direct to .csv in ArcPro?

Thanks everyone

0 Kudos
0 Replies