I am looking for FOSS (maybe GDAL/OGR) solutions to a problem. I need to go from raster (200 million records) to CSV. It is easy enough to do via point but the point file breaks the allowable 2GB “any component part” shapefile rule so I would technically have to go to another point format such as file geodb but would like to avoid points altogether. I need to get another raster value into the CSV as well.
The CSV must carry over
- The original raster Value (16 –bit integer).
- An X Y value (technically just a y is needed) that is the center of the raster cell. This is in DD to double precision.
- A value from another raster. Double precision.
What I’ve done.
- Raster (file GeoDB) to Point (file GeoDB).
- Add X Y coordiantes to the points.
- Extract Value to Points (from the other raster)
- Table (file geodb) to Table (csv).
- Run ArcGIS to get the raster out of the GeoDB and to tiff. I cannot find a way to go file geodb raster to tiff without ArcGIS so as I need to use ArcGIS I just go file geodb raster to point into a file GeoDB point feature class.
- OGR 2 OGR (file geodb to csv) export to csv carrying across X any Y using geometry as WKT.
- Still need to get the “other raster value” into (1) or (2) remember I cannot go to shapefile.
- I would like to avoid point altogether.
So I plan to get the file geodatabase rasters into GeoTiff to find a FOSS solution. I would like to go straight from Raster to CSV carrying across the raster value in each cell, generating the x,y value for the raster cell (center), and then get another raster value into the CSV via the x,y CSV coordinate pair. This would avoid going to point and avoid using Arc.