The porblem I have is that I fetched the data about the administrative level of vienna (from OSM via overpass --> vienna relation id = 109166) as xml format. (json didn't work it had encoding problems) As I did not find any information of how to get it directly, I had to see if I could create the filled polygon with the data provided. With the ways included, forming a polygon itself doesn't work as some ways only have two nodes. Therefore, I created LineStrings in order to generate the border of vienna and saved it as a shapefile.
Indicated by the different colors, one can see the LineStrings that form a polygon. Now I would like to fill the area so that I can use it as a filled polygon. I am using ipython (with python 2.7) and currently searching for answers for the best approach to do this. Would be nice if there is a function that ipython can interpret all LineStrings and see that they are closed so it can write it as a polygon. Then I could identify it as polygon in order to fill the area. Working with programs like QGIS is not an option as I want to avoid manual corrections.
What I want is just a filled polygon of this relation in ipython.