Need a "nearest" capability when doing an Extract To Values

178
6
Jump to solution
01-20-2022 07:33 PM
Labels (2)
LaurieKurilla1
New Contributor III

I am using continental environmental raster data which does not align tightly with the continental boundaries.  For much of my work this is not a problem.  However, I have a set of point data (landslide events) and I want to extract values from the environmental rasters to these event points.  However, the event points are designated accurately with lat/long  and the problem therefore arises at the coast and a few other internal areas - where the raster data does not fit.  I need the equivalent of a "near" function with the Extract to say ... either extract the raster value that the point sits on or the nearest raster value.

When I encounter this problem for a few dozen points, I manually update the data.  However, because I am working at the global level I have 1668 points that need this 'near' capability.  

Is there anything that will resolve this issue?

All ideas appreciated :)

Thank you

0 Kudos
1 Solution

Accepted Solutions
LaurieKurilla1
New Contributor III

I found a solution from a 6.20.2020 reply by Robert LeClair to a problem post similar to mine:

  1. Run the Raster to Point geoprocessing tool first to create a point feature class with the VALUE you wish to extract from the raster to the point attribute table.
  2. Then run the Spatial Join geoprocessing tool with the CLOSEST match_option parameter.  The target_features is your current point feature class and join_features is your output feature class from Step 1.

 

I used this procedure and it worked beautifully.  Thank you to everyone who attempted to resolve my problem.  It is MUCH appreciated.  I learned a few new things along the way.

Cheers

Laurie

 

 

View solution in original post

0 Kudos
6 Replies
David_Brooks
MVP Regular Contributor

@LaurieKurilla1 does interpolating the values not achieve what you're after in that GP tool?


David
..Maps with no limits..
0 Kudos
LaurieKurilla1
New Contributor III

Than you, I tried interpolation but it resulted in about 30% more points with a 'null' value.  

LJK

0 Kudos
JimTenbrink
Esri Contributor

Hi Laurie:

Can you post some anonymized screenshots of your inputs?

I think either the Nibble tool or direct use of Euclidean Allocation might work for your case. The basic idea is to 'spread' data from your environmental raster into areas of the raster that don't have data.

Instead of bringing the points to the data you bring the data to the points. :)

If your environmental raster is floating point then you might need to scale it and convert to integers first (I haven't tried nibble with floating point input).

 

-regards,

Jim TenBrink

0 Kudos
LaurieKurilla1
New Contributor III

These were great suggestions.  I was unaware of them and they seemed as though they would do exactly as I wanted... which is to stretch my raster out...to the borders of the continents ... where I could then do an extract of those values to my points.   I tried both tools with various options, unfortunately neither of them provided additional raster values out to the border areas of interest.  It is the colored raster that I am trying to extend to the continental borders (blue line) so that I can subsequently perform an "Extract Values to Points" to get the values from the raster assigned to the points (red dots).  The 'nibble' and the 'euclidean allocation' resulted in the same raster boundaries as the original.  The 1st image provided is my original data.  The 2nd image is the Euclidean Alloc - which assigns values OUTSIDE of my continental boundaries.  The 3rd image is the result of "nibble" which is essentially the same coverage as the original input.

LaurieKurilla1_0-1643050966424.png

LaurieKurilla1_1-1643051393781.png

 

LaurieKurilla1_2-1643051451802.png

 

 

0 Kudos
LaurieKurilla1
New Contributor III

I found a solution from a 6.20.2020 reply by Robert LeClair to a problem post similar to mine:

  1. Run the Raster to Point geoprocessing tool first to create a point feature class with the VALUE you wish to extract from the raster to the point attribute table.
  2. Then run the Spatial Join geoprocessing tool with the CLOSEST match_option parameter.  The target_features is your current point feature class and join_features is your output feature class from Step 1.

 

I used this procedure and it worked beautifully.  Thank you to everyone who attempted to resolve my problem.  It is MUCH appreciated.  I learned a few new things along the way.

Cheers

Laurie

 

 

0 Kudos
JamesTenbrink
New Contributor

Hi laurie,

logically, that is correct, but raster to point operation can get expensive and should not be necessary. 

i’ve asked a member of the spatial analyst team to continue working on this with you and investigate why nibble is causing difficulty. This is the type of operation that nibble was designed for, so if there’s a bug in it, we want to fix it.

regards,

jt

0 Kudos