Skip to content

Commit f912c60

Browse files
committed
reduce size of nigeria test data, remove full resolution boundaries, update import to work with int osm_ids
1 parent fc0ba8c commit f912c60

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

temba/locations/management/commands/import_geojson.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def import_file(self, filename, file):
5353
props = feature.properties
5454

5555
# get parent id which is set in new file format
56-
parent_osm_id = props.get("parent_id")
56+
parent_osm_id = str(props.get("parent_id"))
5757

5858
# if parent_osm_id is not set and not LEVEL_COUNTRY check for old file format
5959
if not parent_osm_id and level != AdminBoundary.LEVEL_COUNTRY:
@@ -62,7 +62,7 @@ def import_file(self, filename, file):
6262
elif level == AdminBoundary.LEVEL_DISTRICT:
6363
parent_osm_id = props["is_in_state"]
6464

65-
osm_id = props["osm_id"]
65+
osm_id = str(props["osm_id"])
6666
name = props.get("name", "")
6767
if not name or name == "None" or level == AdminBoundary.LEVEL_COUNTRY:
6868
name = props.get("name_en", "")

test-data/nigeria.bin

-5.84 MB
Binary file not shown.

test-data/nigeria.zip

-4.05 MB
Binary file not shown.

0 commit comments

Comments
 (0)