Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Flex Extract
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Flexpart
Flex Extract
Commits
d2febd42
Commit
d2febd42
authored
6 years ago
by
Anne Philipp
Browse files
Options
Downloads
Patches
Plain Diff
fixed grid area check for negative values
parent
095dc73c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
source/python/mods/checks.py
+11
-10
11 additions, 10 deletions
source/python/mods/checks.py
with
11 additions
and
10 deletions
source/python/mods/checks.py
+
11
−
10
View file @
d2febd42
...
...
@@ -68,19 +68,19 @@ def check_area(grid, area, upper, lower, left , right):
upper
,
left
,
lower
,
right
=
components
# determine area format
if
(
float
(
upper
)
/
1000.
>=
0.05
and
float
(
lower
)
/
1000.
>=
0.05
and
float
(
left
)
/
1000.
>=
0.05
and
float
(
right
)
/
1000.
>=
0.05
):
if
(
abs
(
float
(
upper
)
/
1000.
)
>=
0.05
and
abs
(
float
(
lower
)
/
1000.
)
>=
0.05
and
abs
(
float
(
left
)
/
1000.
)
>=
0.05
and
abs
(
float
(
right
)
/
1000.
)
>=
0.05
):
# area is defined in 1/1000 degrees; old format
area
=
'
{}/{}/{}/{}
'
.
format
(
float
(
upper
)
/
1000.
,
float
(
left
)
/
1000.
,
float
(
lower
)
/
1000.
,
float
(
right
)
/
1000.
)
elif
(
float
(
upper
)
/
1000.
<
0.05
and
float
(
lower
)
/
1000.
<
0.05
and
float
(
left
)
/
1000.
<
0.05
and
float
(
right
)
/
1000.
<
0.05
):
elif
(
abs
(
float
(
upper
)
/
1000.
)
<
0.05
and
abs
(
float
(
lower
)
/
1000.
)
<
0.05
and
abs
(
float
(
left
)
/
1000.
)
<
0.05
and
abs
(
float
(
right
)
/
1000.
)
<
0.05
):
# area is already in new format
area
=
'
{}/{}/{}/{}
'
.
format
(
float
(
upper
),
float
(
left
),
...
...
@@ -88,7 +88,9 @@ def check_area(grid, area, upper, lower, left , right):
float
(
right
))
else
:
raise
ValueError
(
'
The area components have different
'
'
formats: %s
'
(
area
))
'
formats (upper, lower, left, right):
'
'
{}/{}/{}/{}
'
.
format
(
str
(
upper
),
str
(
lower
),
str
(
left
)
,
str
(
right
)))
return
area
...
...
@@ -152,7 +154,6 @@ def check_ppid(c, ppid):
return
def
check_
():
'''
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment