Rasterize Shapefile Training Data for Object-Based Image Analysis with Python

preview_player
Показать описание
Link training data to image segments by using GDAL RasterizeLayer to convert a shapefile to a raster dataset.

Рекомендации по теме
Комментарии
Автор

I am getting maximum as zero and when I run the Random Forest Classification algorithm, ValueError: Expected 2D array, got 1D array instead:
array=[].
Reshape your data either using array.reshape(-1, 1) if your data has a single feature or array.reshape(1, -1) if it contains a single sample.

I get this error. I am working on Australia, and I downloded the naip type image from QGIS from Satellite Only connection in XYZ tiles

nmacharla
Автор

Why the minimum id is 0 not 1, if the landscape id is from 1 to 7?

kevinliu