Converting shapefile into a raster file using python | PART 1

preview_player
Показать описание
This video explains how to convert a shapefile into a raster file by using python

Gdal.RasterizeLayer function:

You should watch the following video if you have problem using Geopandas

#Python
Chapters
0:00 Introduction
00:44 Setting up Jupyter Notebook
02:13 Reading Shapefile using geopandas
05:18 Plotting the shapefile
07:44 Reading the shapefile and converting the shapefile into raster
Рекомендации по теме
Комментарии
Автор

Thank you so much for the video. However,

source_layer = input_shape.GetLayer()
defn = source_layer.GetLayerDefn
column_names = []
for n in range(defn.GetFieldCount()):
fdefn = defn.GetFieldDefn(n)


Gave me errors
AttributeError Traceback (most recent call last)
Cell In[33], line 4
2 defn = source_layer.GetLayerDefn
3 column_names = []
----> 4 for n in range(defn.GetFieldCount()):
5 fdefn = defn.GetFieldDefn(n)
6


Is there any solution.
Thanks

maheshmaskey