Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
GeoSentinel
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mario Chirinos Colunga
GeoSentinel
Commits
30c6cf08
Commit
30c6cf08
authored
Sep 24, 2019
by
Mario Chirinos Colunga
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wkt from json
parent
dd5ee94a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
wktToShape.py
geosentinel/wktToShape.py
+8
-2
L2ASCL_AreaProcessing.sh
tools/L2ASCL_AreaProcessing.sh
+1
-1
No files found.
geosentinel/wktToShape.py
View file @
30c6cf08
...
...
@@ -4,7 +4,8 @@
import
osgeo.ogr
as
ogr
import
osgeo.osr
as
osr
import
sys
import
json
#-----------------------------------------------------------------------------
def
wktToShape
(
wkt
,
shapefileName
,
layerName
=
"wkt"
):
'''!
'''
...
...
@@ -34,7 +35,12 @@ def wktToShape(wkt, shapefileName, layerName="wkt"):
def
main
(
argv
):
# print (argv[1])
wktToShape
(
argv
[
1
],
argv
[
2
])
if
len
(
argv
)
!=
3
:
print
(
"usage: "
+
argv
[
0
]
+
"<jsonfile> <shapefileName>"
)
with
open
(
argv
[
1
]
)
as
json_file
:
data
=
json
.
load
(
json_file
)
wktToShape
(
data
[
"wkt"
],
argv
[
2
])
if
__name__
==
"__main__"
:
main
(
sys
.
argv
)
tools/L2ASCL_AreaProcessing.sh
View file @
30c6cf08
...
...
@@ -22,7 +22,7 @@ cd $USERDIR
#0.- Create Shape File From WKT
echo
"
${
RED
}
Creating Shape file...
${
NC
}
"
rm
-r
myshape
wktToShape.py
"
$wkt
"
"myshape"
wktToShape.py
$USERDIR
"findProducts.json
"
"myshape"
#1.- Link L2A products
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment