The API response contains the main item itself (found by its ID, 3939519) and children (shown as a tag within the main item).
The previous code only imported children that are ways, but they can also be relations. This PR detects whether a child is a way or relation and processes it accordingly. If it's a relation, it needs its own fresh request to the API, so that has also been copied in from another function.
We get building outlines from the openstreetmap API, and they come as a 'way' or 'relation': https://api.openstreetmap.org/api/0.6/relation/3939519/full
The API response contains the main item itself (found by its ID, 3939519) and children (shown as a tag within the main item).
The previous code only imported children that are ways, but they can also be relations. This PR detects whether a child is a way or relation and processes it accordingly. If it's a relation, it needs its own fresh request to the API, so that has also been copied in from another function.