Raster to Point - Converting Multiple Files at a Time

244
15
Jump to solution
01-10-2022 03:11 PM
Labels (1)
ScottFraser_Key-West
New Contributor II

I've got about 200 DEM LiDAR raster files. Using the "Raster to Point" tool easily converts the cell data to points, but it'll be a slow process if I have to convert every file individually. 

Is there a tool in Pro that'll allow me to select multiple raster files at time for point conversion?  

0 Kudos
1 Solution

Accepted Solutions
Luke_Pinner
MVP Regular Contributor

Right click the "Raster to Point" tool and select "Batch".

View solution in original post

15 Replies
DanPatterson
MVP Esteemed Contributor

you will have to code it

Raster to Point (Conversion)—ArcGIS Pro | Documentation

or you can create a temporary batch tool and edit it to do 100's.

Below is an example of just creating a batch for 2 rasters.

batch_temp_tools.png

                                                    

arcpy.Tmp.BatchRasterToPoint("topo2raster.tif;Extract_topo1.tif",
 \RasterToPoint_OutPointFeatures_%Name%",
 "Value")
# or
in_rasters = #  use ListRasters to get the semi-colon list above
gdb = r"C:\Arc_projects\Test_29\Test_29.gdb"
base_name = "Out_"
arcpy.Tmp.BatchRasterToPoint(in_rasters, f"{gdb}\\{base_name}_{%Name%}")

totally untested though


... sort of retired...
0 Kudos
ScottFraser_Key-West
New Contributor II

Interesting. I haven't batched anything since pre-Windows DOS.  I'll have to give this a look.

Also wondering if I could merge several layers and run R-t-P on the new merge file?

0 Kudos
DanPatterson
MVP Esteemed Contributor

What you are doing will determine an appropriate solution.

I can only assume that raster to point is for some reason, since I would not normally want a bunch of closely spaced points holding the data. 

I would use RasterToNumPyArray if the spatial location of all the data were coincident.   You can make a multidimensional array,  The location (x, y) values of the cells can be determined and the multiple layers hold information from different layers occupying the same space.

If the rasters are adjacent I probably would only use points if the Z values were floats/doubles and I had to retain every last decimal place, otherwise I would convert to polygon using an appropriate reclassification.

Your end use isn't specified, so no specific recommendations can be made


... sort of retired...
0 Kudos
SteveLynch
Esri Regular Contributor

...or use ExtractMultiValuesToPoints

For this you'll run RasterToPoint once and then use that output to extract the values from all the remaining rasters.

 

0 Kudos
ScottFraser_Key-West
New Contributor II

The goal is to display elevation measurements every three feet.

So... I run RasterToPoint once, then use ExtractMultiValuesToPoints on multiple other companion raster files, directing the results into the first RTP result file?  Sound like that might result in one larger merged file... Interesting. 

The files were downloaded from five large geographical LiDAR blocks stretching 180 miles, with each block having about 50 files and some 28m points in each file. With the size of these ultimate files, I'm guessing it'd make sense to keep these blocks of points separate, thinking that five smaller blocks should be easier to utilize than one massive point file. Does this sound appropriate?

0 Kudos
DanPatterson
MVP Esteemed Contributor

An image would help.  Converting raster to point isn't going to help with a display issue.  And a point file covering the same spatial extent as an equivalent raster is going to be many times larger.  So I am still not seeing any advantage of a point file for visualization purposes


... sort of retired...
0 Kudos
ScottFraser_Key-West
New Contributor II

We display the elevation measurements for a variety of floodplain management purposes, both for staff, construction and the general public.

In the following example, the LiDAR measurements are shown in black. The measurements in red are ground-proofed Surveyor measurements, used for comparison to validate the accuracy of the LiDAR in given areas.

Capture2.PNG

0 Kudos
DanPatterson
MVP Esteemed Contributor

viewed at such a small extent, I can see the utility, 

carefully selecting areas which may be of interest prior to processing will certainly cut down on your output data size 

Did you try the suggestions


... sort of retired...
0 Kudos
Luke_Pinner
MVP Regular Contributor

Right click the "Raster to Point" tool and select "Batch".