Skip to content

Commit

Permalink
Ensure only rows with coordinates are considered
Browse files Browse the repository at this point in the history
  • Loading branch information
akariv committed Dec 1, 2023
1 parent ddbb733 commit c4a60a2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions taxonomies/trees/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,14 @@ class ConvertGeoCoordinates(ColumnTypeTester):
REQUIRED_COLUMN_TYPES = [
'location:x',
'location:y',
'location:grid',
]
PROHIBITED_COLUMN_TYPES = []

def convert_geo_coordinates(self):
def func(rows):
transformer = Transformer.from_crs('epsg:2039', 'epsg:4326', always_xy=True)
for row in rows:
grid = row['location-grid']
grid = row.get('location-grid')
if grid and grid.lower() in ('epsg:2039', 'itm', 'ישראל'):
x = row['location-x']
y = row['location-y']
Expand Down

0 comments on commit c4a60a2

Please sign in to comment.