Sampling raster returns no values

427
11
3 weeks ago
Labels (1)
DougTurk
New Contributor II

I am attempting to sample data from a vegetation raster layer using ArcGIS Pro v2.7.3, but the resulting sample file contains no data. I've tried using the Extract Values to Points tool and the Sample tool, and neither one seems to work (the jobs complete, but no sample data is ever collected). The raster layer I am using is part of a geodatabase that I obtained from CalFire. The raster layer includes an attribute table with 16 fields. I created a random series of sample points within a specific area covered by the vegetation raster layer. I've attached screenshots of the sample points over the raster layer, the vegetation layer attribute table, and images of the two empty sample tables. Any advice on why my approach isn't returning any data would be very much appreciated.

Thanks!

0 Kudos
11 Replies
DanPatterson
MVP Notable Contributor

Test....

copy one of the rasters to a folder as a *.tif

Make sure the coordinate system of both the *.tif and the point file are the same... project the point file if necessary to match the *.tif

run Sample

run Extract Values to Points

Results??


... sort of retired...
DougTurk
New Contributor II

Hi Dan,

Thanks for the reply. That mostly worked (see below), although I'm admittedly perplexed why changing the raster layer to a .tif file resolved the problem.

I say mostly, because the raster layer I'm sampling from has two fields: "ObjectID" and "Value", which both contain the same sequence of numbers up until 6598, at which point the "Value" field skips number 6598, while the ObjectID field does not. This wouldn't be a problem, except that the new sample data references the vegetation data with a field called "fveg15_1", which I assume is a sequence of numbers that ties back to either the ObjectID or Value field in the sampled raster layer. Since the raster attribute table has other information I need, I have to do a join, but now I'm not sure which field to join to. Any thoughts?

Thanks again for the help!

Doug

0 Kudos
DanPatterson
MVP Notable Contributor

Doug are you talking about the point file?

Is it a featureclass (in a gdb) or a shapefile?

from Extract Values to Points (Spatial Analyst)—ArcGIS Pro | Documentation

Oh... as as for *.tif... esri recommends them (can't place my hand on the link)  but using *.tif instead of gdb rasters and other formats has garnered many a solution in the esri Community over the years.

you should see a RASTERVALU in the point file containing the raster information for each point if one was found


... sort of retired...
DougTurk
New Contributor II

.tif - Interesting, and good to know for future reference.  

Regarding the file with two similar fields, I was referring to the sampled vegetation raster layer. The only fields that show up in the sample results shapefile table are: ObjectID, Shape, OID, X, Y and fveg15_1 (this is the name of the raster layer I sampled). Doing some random clicking of the vegetation raster layer to the associated sample points, it looks like the "fveg15_1" field (in the sample results data) references the "value" field in the (sampled) vegetation raster layer.

Thanks again for the assistance!

0 Kudos
JimTenbrink
Esri Contributor

Hi doug

can you post some anonymized data and precise steps to repro?

if both the raster and points have spatial references, then those tools should on-the-fly project the points to whatever raster is being sampled.

Can you check your geoprocessing environments? Is your analysis extent accidentally defined to somewhere where you don't want it to be?

regards,

-james tenbrink

spatial analyst team

0 Kudos
DougTurk
New Contributor II

Hi Jim,

Thanks for the reply. I followed Dan's suggestions above which seemed to "mostly" solve my issue. I did check the extent and spatial references and everything is correct. Like you, I'm still puzzled why the sample didn't work and why changing the raster layer to a .tif file solved the problem. Any thoughts on that?

Thanks,

Doug

0 Kudos
JimTenbrink
Esri Contributor

Doug

Kudos to Dan, but if switching to a tif 'fixed' this then there is a bug that we need to investigate.

Please post precise steps to repro along with the data.

We can do this outside the geonet context if you'd prefer. Send me a direct message. I'll summarize results to this thread when we know what's going on.

-jt

0 Kudos
DougTurk
New Contributor II

Hi Jim,

Hmm...  I don't see a way to send you a separate (private) message. Reading one of the blog posts, it looks like there's supposed to be a private message box somewhere, but I don't see that on my UI.  Is there another way I can get you this content?

0 Kudos
DougTurk
New Contributor II

Hi Jim,

Yes, I'll content with you directly.

Doug

0 Kudos