Changeset d2febd4 in flex_extract.git
- Timestamp:
- Dec 7, 2018, 3:28:01 PM (5 years ago)
- Branches:
- master, ctbto, dev
- Children:
- c274d9a
- Parents:
- 095dc73
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
source/python/mods/checks.py
r3f36e42 rd2febd4 69 69 70 70 # determine area format 71 if ( float(upper) / 1000.>= 0.05 and72 float(lower) / 1000.>= 0.05 and73 float(left) / 1000.>= 0.05 and74 float(right) / 1000.>= 0.05):71 if (abs(float(upper) / 1000.) >= 0.05 and 72 abs(float(lower) / 1000.) >= 0.05 and 73 abs(float(left) / 1000.) >= 0.05 and 74 abs(float(right) / 1000.) >= 0.05): 75 75 # area is defined in 1/1000 degrees; old format 76 76 area = '{}/{}/{}/{}'.format(float(upper) / 1000., … … 78 78 float(lower) / 1000., 79 79 float(right) / 1000.) 80 elif ( float(upper) / 1000.< 0.05 and81 float(lower) / 1000.< 0.05 and82 float(left) / 1000.< 0.05 and83 float(right) / 1000.< 0.05):80 elif (abs(float(upper) / 1000.) < 0.05 and 81 abs(float(lower) / 1000.) < 0.05 and 82 abs(float(left) / 1000.) < 0.05 and 83 abs(float(right) / 1000.) < 0.05): 84 84 # area is already in new format 85 85 area = '{}/{}/{}/{}'.format(float(upper), … … 89 89 else: 90 90 raise ValueError('The area components have different ' 91 'formats: %s ' (area)) 91 'formats (upper, lower, left, right): ' 92 '{}/{}/{}/{}'.format(str(upper), str(lower), 93 str(left) , str(right))) 92 94 93 95 return area … … 153 155 return 154 156 155 156 157 def check_(): 157 158 '''
Note: See TracChangeset
for help on using the changeset viewer.