1

Does anyone has idea how to deal with this error:

Warning 1: organizePolygons() recieved an unexpected geometry. Either a polygon with interior rings or a polygon with less than 4 points or a non-Polygon geometry. Retrun arguments as collection.

What does it mean 'retrun arguments as collection?

I am using data in osm format. Error occurs for some polygons while using:

temp_path = path_to_folder
element = name_of_file
path = path_for_element

r'ogr2ogr {0} {1}.osm multipolygons -nln {2}_ply -lco ENCODING=UTF-8'.format(
        temp_path, os.path.join(path, element), element)
  • 1
    I do not know what retrun arguments as collectionmeans but right thing to do is to skip the invalid geometries. You may try simply by adding -skipfailures to ogr2ogr command but it can make the process quite slow depending on which is your outputformat. – user30184 Feb 13 at 13:34
  • I am using osm -> shp and for me time is crucial in this case, but I will give it a try! Thank you! – JuniorPythonNewbie Feb 15 at 7:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.