Python script to convert raster pixels to points

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
processing.algorithmHelp("native:pixelstopoints")
processing.run("native:pixelstopoints", {
'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

Compétences recommandées

Commentaire de l'employeur

“Good job. Will hire Siddhant again.”

Image de profil abhisyc70, United States.

Meilleures propositions de ce concours

Afficher plus de propositions

Tableau de clarification publique

Comment commencez des concours

  • Publiez votre concours

    Publiez votre concours Rapide et facile

  • Obtenez des tonnes de propositions

    Obtenez des tonnes de propositions De partout dans le monde

  • Attribuez la meilleure proposition

    Attribuez la meilleure proposition Télécharger les fichiers - Facile !

Publier un concours maintenant ou rejoignez-nous maintenant !