Python script to convert raster pixels to points
- État: Closed
- Prix: $20
- Propositions reçues: 4
- Gagnant: siddhantrajsinha
Résumé du concours
I need a python script to convert all the TIFF files present in a directory to shape files. This can be done in QGIS by using Vector Creation -> Raster pixels to points command. But I need it to run on my Linux machine where all the TIFF files are present.
I have attached the sample TIFF file. I want the script to convert this file into points. Each pixel of the TIFF must be converted into a point. These points are elevation levels of that particular location.
Sample points : check the attachments
1) screenshot of sample points after extraction.png
2) points from shape file.png
I have used the below commands in QGIS tool
from qgis import processing
'FIELD_NAME' : 'elevation',
'INPUT_RASTER' : 'D:/Work/Lidar/NT60ne_DTM_2m.tif',
'OUTPUT' : 'D:/Work/Lidar/NT60NE_PROGRAMMATICAL_CONVERTED.shp', 'RASTER_BAND' : 1
Let me know if you have any questions
Commentaire de l'employeur
“Good job. Will hire Siddhant again.”
abhisyc70, United States.