Skip to main content
replaced http://gis.stackexchange.com/ with https://gis.stackexchange.com/
Source Link

You can use the Sample tool to generate a table of X,Y,Z values:

Creates a table that shows the values of cells from a raster, or set of rasters, for defined locations. The locations are defined by raster cells or by a set of points.

Use the same raster as both the input and location dataset.

The tool will output a DBF or a GDB Table which you can then export to CSV.


Alternatively, see this answerthis answer for a non ArcGIS method that uses GDAL and doesn't include NoData values in the output.

You can use the Sample tool to generate a table of X,Y,Z values:

Creates a table that shows the values of cells from a raster, or set of rasters, for defined locations. The locations are defined by raster cells or by a set of points.

Use the same raster as both the input and location dataset.

The tool will output a DBF or a GDB Table which you can then export to CSV.


Alternatively, see this answer for a non ArcGIS method that uses GDAL and doesn't include NoData values in the output.

You can use the Sample tool to generate a table of X,Y,Z values:

Creates a table that shows the values of cells from a raster, or set of rasters, for defined locations. The locations are defined by raster cells or by a set of points.

Use the same raster as both the input and location dataset.

The tool will output a DBF or a GDB Table which you can then export to CSV.


Alternatively, see this answer for a non ArcGIS method that uses GDAL and doesn't include NoData values in the output.

deleted 468 characters in body
Source Link
user2856
  • 69.6k
  • 6
  • 119
  • 203

You can use the Sample tool to generate a table of X,Y,Z values:

Creates a table that shows the values of cells from a raster, or set of rasters, for defined locations. The locations are defined by raster cells or by a set of points.

Use the same raster as both the input and location dataset.

The tool will output a DBF or a GDB Table which you can then export to CSV.


Alternatively, as GDAL supports writing to X,Y,Z (CSV) ascii, you could usesee gdal_translate:

gdal_translate -of xyz -co ADD_HEADER_LINE=YES -co COLUMN_SEPARATOR="," input_raster output.csv

To avoid writingthis answer for a non ArcGIS method that uses GDAL and doesn't include NoData values to your output:

gdal_translate -q -of xyz -co ADD_HEADER_LINE=YES -co COLUMN_SEPARATOR="," input_raster /vsistdout | findstr /V /C:"your_nodata_value" > output.csv 

Runningin the above command (inc. findstr) on a 60 million pixel (7700x7800 Landsat scene) took 2 minutesoutput.

You can use the Sample tool to generate a table of X,Y,Z values:

Creates a table that shows the values of cells from a raster, or set of rasters, for defined locations. The locations are defined by raster cells or by a set of points.

Use the same raster as both the input and location dataset.

The tool will output a DBF or a GDB Table which you can then export to CSV.


Alternatively, as GDAL supports writing to X,Y,Z (CSV) ascii, you could use gdal_translate:

gdal_translate -of xyz -co ADD_HEADER_LINE=YES -co COLUMN_SEPARATOR="," input_raster output.csv

To avoid writing NoData values to your output:

gdal_translate -q -of xyz -co ADD_HEADER_LINE=YES -co COLUMN_SEPARATOR="," input_raster /vsistdout | findstr /V /C:"your_nodata_value" > output.csv 

Running the above command (inc. findstr) on a 60 million pixel (7700x7800 Landsat scene) took 2 minutes.

You can use the Sample tool to generate a table of X,Y,Z values:

Creates a table that shows the values of cells from a raster, or set of rasters, for defined locations. The locations are defined by raster cells or by a set of points.

Use the same raster as both the input and location dataset.

The tool will output a DBF or a GDB Table which you can then export to CSV.


Alternatively, see this answer for a non ArcGIS method that uses GDAL and doesn't include NoData values in the output.

added 647 characters in body
Source Link
user2856
  • 69.6k
  • 6
  • 119
  • 203

You can use the Sample tool to generate a table of X,Y,Z values:

Creates a table that shows the values of cells from a raster, or set of rasters, for defined locations. The locations are defined by raster cells or by a set of points.

Use the same raster as both the input and location dataset.

The tool will output a DBF or a GDB Table which you can then export to CSV.


Alternatively, as GDAL supports writing to X,Y,Z (CSV) ascii, you could use gdal_translate:

gdal_translate -of xyz -co ADD_HEADER_LINE=YES -co COLUMN_SEPARATOR="," input_raster output.csv

To avoid writing NoData values to your output:

gdal_translate -q -of xyz -co ADD_HEADER_LINE=YES -co COLUMN_SEPARATOR="," input_raster /vsistdout | findstr /V /C:"your_nodata_value" > output.csv 

Running the above command (inc. findstr) on a 60 million pixel (7700x7800 Landsat scene) took 2 minutes.

You can use the Sample tool to generate a table of X,Y,Z values:

Creates a table that shows the values of cells from a raster, or set of rasters, for defined locations. The locations are defined by raster cells or by a set of points.

Use the same raster as both the input and location dataset.

The tool will output a DBF or a GDB Table which you can then export to CSV.

You can use the Sample tool to generate a table of X,Y,Z values:

Creates a table that shows the values of cells from a raster, or set of rasters, for defined locations. The locations are defined by raster cells or by a set of points.

Use the same raster as both the input and location dataset.

The tool will output a DBF or a GDB Table which you can then export to CSV.


Alternatively, as GDAL supports writing to X,Y,Z (CSV) ascii, you could use gdal_translate:

gdal_translate -of xyz -co ADD_HEADER_LINE=YES -co COLUMN_SEPARATOR="," input_raster output.csv

To avoid writing NoData values to your output:

gdal_translate -q -of xyz -co ADD_HEADER_LINE=YES -co COLUMN_SEPARATOR="," input_raster /vsistdout | findstr /V /C:"your_nodata_value" > output.csv 

Running the above command (inc. findstr) on a 60 million pixel (7700x7800 Landsat scene) took 2 minutes.

Source Link
user2856
  • 69.6k
  • 6
  • 119
  • 203
Loading