Select to view content in your preferred language

converting .csv to .tiff

2578
3
Jump to solution
01-07-2023 12:46 PM
Labels (1)
AlexanderZirilli
Emerging Contributor

I have an excel workbook, in which I converted one of the sheets to .csv format. I want to convert this file to .tiff, so I can use the RasterCellIterator class on a specific column, and create raster analysis on PCB levels of different regions of the Hudson river. Does anyone have any ideas? I tried using RasterToOtherFormat_conversion, but I don't think .csv is a supported file type.

0 Kudos
1 Solution

Accepted Solutions
LanceCole
MVP Regular Contributor

@AlexanderZirilli,

A CSV file is just a table and a TIFF is a raster image with data in each cell (pixel).  You will need to convert your tabular data to points then you can generate a raster from the point data.

Depending upon your licensing level you could use Point to Raster (Conversion)  You would need to correlate the River MILE column to a lat/lon then convert the CSV to points using XY Table To Point (Data Management) 

You may want to generate rasters for each year and then Create a mosaic dataset containing raster data from multiple dates.  Either way, these raster (TIFF) files can be consumed by RasterCellIterator.

View solution in original post

3 Replies
LanceCole
MVP Regular Contributor

@AlexanderZirilli,

A CSV file is just a table and a TIFF is a raster image with data in each cell (pixel).  You will need to convert your tabular data to points then you can generate a raster from the point data.

Depending upon your licensing level you could use Point to Raster (Conversion)  You would need to correlate the River MILE column to a lat/lon then convert the CSV to points using XY Table To Point (Data Management) 

You may want to generate rasters for each year and then Create a mosaic dataset containing raster data from multiple dates.  Either way, these raster (TIFF) files can be consumed by RasterCellIterator.

David_Brooks
MVP Regular Contributor

I'm assuming the CSV has coordinate fields? If so, convert to a point feature class and then convert points to raster.


David
..Maps with no limits..
0 Kudos
LanceCole
MVP Regular Contributor
As CSV file does not have coordinates unless there is a column with x,y or lat,long. The file you provided had river mileage for which you could determine coordinates.
0 Kudos