Commit a34f8f1e authored by Mario Chirinos Colunga's avatar Mario Chirinos Colunga 💬

wkt raster

parent b64c93aa
...@@ -52,7 +52,7 @@ def getPolygonArray(image, wkt): ...@@ -52,7 +52,7 @@ def getPolygonArray(image, wkt):
geometry = ogr.CreateGeometryFromWkt(wkt) geometry = ogr.CreateGeometryFromWkt(wkt)
feature = ogr.Feature(layer.GetLayerDefn()) feature = ogr.Feature(layer.GetLayerDefn())
feature.SetStyleString("PEN(c:#FF0000,w:5px);") # feature.SetStyleString("PEN(c:#FF0000,w:5px);")
feature.SetGeometry(geometry) feature.SetGeometry(geometry)
layer.CreateFeature(feature) layer.CreateFeature(feature)
...@@ -61,6 +61,7 @@ def getPolygonArray(image, wkt): ...@@ -61,6 +61,7 @@ def getPolygonArray(image, wkt):
np_polygon = polygonRaster.GetRasterBand(1).ReadAsArray(0,0,cols,rows) np_polygon = polygonRaster.GetRasterBand(1).ReadAsArray(0,0,cols,rows)
feature = None
data_source = None data_source = None
polygonRaster = None polygonRaster = None
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment