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

wkt to shape

parent 99b2a0ca
......@@ -5,7 +5,7 @@ import osgeo.ogr as ogr
import osgeo.osr as osr
import sys
def wktToShape(wkt, shapefileName):
def wktToShape(wkt, shapefileName, layerName="wkt"):
'''!
'''
# set up the shapefile driver
......@@ -17,7 +17,7 @@ def wktToShape(wkt, shapefileName):
# create the spatial reference, WGS84
srs = osr.SpatialReference()
srs.ImportFromEPSG(4326)
layer = data_source.CreateLayer("layer", srs, ogr.wkbPolygon)
layer = data_source.CreateLayer(layerName, srs, ogr.wkbPolygon)
# Create the point from the Well Known Text
geometry = ogr.CreateGeometryFromWkt(wkt)
......
......@@ -24,7 +24,6 @@ do
echo PASS $f
fi
RGBCROPED=$JP2DIR"rgbCroped/"
if [ ! -d $RGBCROPED ]; then
mkdir $RGBCROPED
......@@ -33,12 +32,6 @@ do
fileout1=$(echo $filepattern | cut -d"_" -f1)
fileout2=$(echo $filepattern | cut -d"_" -f2)
#
# if [ ! -e rgb/$fileout2"_"$fileout1".tiff" ]; then
# gdal_merge.py -separate -co PHOTOMETRIC=RGB -o rgb/$fileout2"_"$fileout1".tiff" $filepattern"04.jp2" $filepattern"03.jp2" $filepattern"02.jp2"
# fi
if [ ! -d $RGBCROPED$fileout1 ]; then
mkdir $RGBCROPED$fileout1
fi
......@@ -50,8 +43,9 @@ do
## rm rgb/$fileout1/$fileout2"_"$fileout1"_t.jpg"
fi
cd $PRODCUTSDIR
# cd $PRODCUTSDIR
done
rm *.xml
## if [ ! -d "video" ]; then
## mkdir video
## fi
......
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