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
c06ec67a
Commit
c06ec67a
authored
May 31, 2019
by
Mario Chirinos Colunga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sorted json
parent
b6d7b956
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
L2ASCLtoJSON.py
geosentinel/L2ASCLtoJSON.py
+2
-1
mergeL2ASCL_JSON.py
geosentinel/mergeL2ASCL_JSON.py
+1
-1
No files found.
geosentinel/L2ASCLtoJSON.py
View file @
c06ec67a
...
...
@@ -8,6 +8,7 @@ import sys
import
os
import
json
from
collections
import
Counter
#from collections import OrderedDict
########### lee archivo de configuración ################
dirname
=
os
.
path
.
dirname
(
__file__
)
...
...
@@ -53,7 +54,7 @@ def main(argv):
jsonFile
=
open
(
argv
[
2
])
.
read
()
cfg
=
json
.
loads
(
jsonFile
)
dataDict
=
L2ASCLtoDict
(
argv
[
1
],
cfg
[
'wkt'
])
print
(
json
.
dumps
(
dataDict
))
print
(
json
.
dumps
(
dataDict
,
sort_keys
=
True
))
#-------------------------------------------------------------------------------
if
__name__
==
"__main__"
:
main
(
sys
.
argv
)
geosentinel/mergeL2ASCL_JSON.py
View file @
c06ec67a
...
...
@@ -23,7 +23,7 @@ def main(argv):
json_data
[
'date'
]
=
f
[:
f
.
find
(
"_"
)]
jsonList
.
append
(
json_data
)
# print(json_data)
print
(
json
.
dumps
({
i
[
'date'
]:
i
for
i
in
jsonList
}))
print
(
json
.
dumps
({
i
[
'date'
]:
i
for
i
in
jsonList
}
,
sort_keys
=
True
))
#-------------------------------------------------------------------------------
if
__name__
==
"__main__"
:
...
...
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