I have a raster : population density of Ivory Coast. I need to convert it to points, but I met several problems because of the size I think.
Here is what I tried :
1) GRASS GIS 7 command : r.to.vect => It works but takes several hours !
2) SAGA (2.1.2) : Raster values to points => It doesn't work (Couldn't load gdal_MrSID.dll -> but gdal_MrSID.dll is well installed in the SAGA package).
3) GDAL/ORG -> GDAL Conversion -> gdal2xyz -> It works but takes a lot of time (after 15min Processing algorithm still on 0%).
4) Raster -> Conversion -> Translate -> Save as ASCII grided XYZ. Then Layer -> Add Layer -> Add Delimited Text Layer :
File name : the created file : xyz file
File format : Custom delimiters : Tab & Space
Record option : Unchecked the "First record has field names"
Geometry definition : Point coordinates : X field = field_1 ; Y field = field_2.
Layer appears in the Layers Panel (contains 40 millions points).
Does anyone have a solution?
gdal_translate -of XYZ -src 0 0 1000 1000 input.tif output.xyz
. That command starts reading from the top-left corner (0 0) and converts a 1000x1000 pixel sized sample for you and it should be pretty fast. You can increase and slide the data window as you wish and use -projwin instead of -src if that suits you better.