Python script to convert raster pixels to points

  • Status: Closed
  • Prêmio: $20
  • Inscrições Recebidas: 4
  • Vencedor: siddhantrajsinha

Síntese do concurso

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

Habilidades Recomendadas

Feedback do Empregador

“Good job. Will hire Siddhant again.”

Foto do perfil abhisyc70, United States.

Principais inscrições deste concurso

Ver Mais Inscrições

Painel de Comentários

Como começar com concursos

  • Publique seu concurso

    Publique seu Concurso Rápido e fácil

  • Receba muitas inscrições

    Obtenha Toneladas de Inscrições De todo o mundo

  • Premie a melhor inscrição

    Premie a melhor inscrição Baixe os arquivos, é fácil!

Poste um Concurso ou Junte-se a nós Hoje!