diff --git a/dragonfly/model.py b/dragonfly/model.py index bc902eea..f94bc1db 100644 --- a/dragonfly/model.py +++ b/dragonfly/model.py @@ -537,7 +537,7 @@ def to_geojson(self, location, point=Point2D(0, 0), folder=None, tolerance=0.01) feature_dict['properties']['floor_area'] = bldg.floor_area feature_dict['properties']['footprint_area'] = \ sum((face.area for face in footprint)) - feature_dict['properties']['id'] = i + feature_dict['properties']['id'] = str(i + 1) feature_dict['properties']['name'] = bldg.name feature_dict['properties']['number_of_stories'] = bldg.story_count feature_dict['properties']['type'] = 'Building' diff --git a/tests/geojson/NewDevelopment.geojson b/tests/geojson/NewDevelopment.geojson index 798602ef..118c46f2 100644 --- a/tests/geojson/NewDevelopment.geojson +++ b/tests/geojson/NewDevelopment.geojson @@ -41,7 +41,7 @@ "building_type": "Mixed use", "floor_area": 600.0, "footprint_area": 200.0, - "id": 0, + "id": "1", "name": "ResidenceBuilding", "number_of_stories": 3, "type": "Building", @@ -81,7 +81,7 @@ "building_type": "Mixed use", "floor_area": 200.0, "footprint_area": 200.0, - "id": 1, + "id": "2", "name": "RetailBuildingBig", "number_of_stories": 1, "type": "Building", @@ -185,7 +185,7 @@ "building_type": "Mixed use", "floor_area": 1625.0, "footprint_area": 325.0, - "id": 2, + "id": "3", "name": "OfficeBuilding", "number_of_stories": 5, "type": "Building",