![]() ![]() 3) Read in KML with fastkml, which returns Shapely objects It is not clear which route to take to get from GeoJSON features to features Shapely understands. Looking at the Shapley code, the problem is that basic GeoJSON types such as "Feature" and "FeatureCollection" are not recognised. This error is the same for a minimal, valid GeoJSON example. ![]() Which gives: ValueError: Unknown geometry type: featurecollection 2) Converting to GeoJSON and using the build in Shapely asShape function ogr2ogr2 -f GeoJSON wijken.json wijken.kml The CSV-file contains multiple columns, perhaps something is wrong there, but I have not found a comparable online WKT-example to test. Which gives (same for wkt()): ReadingError: Could not create geometry because of errors while reading input.Īs it provides no further info, and the Python code wraps other (C?) libraries, I do not know what is wrong with the format. Routes I have tried: 1) Converting to WKT or WKB format, and reading in with build in functionsĬonversion: ogr2ogr -f CSV wijken.csv wijken.kml -lco GEOMETRY=AS_WKT The KML-file is validated against the proper XML schema, so I guess the input is correct. I am trying to get a KML-file ( wijken.kml) into Shapely. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |