How can I play older worlds on newer versions of minecraft?
You're on the right track. Curved geometries were brought into GDAL/OGR 2.x. You can approximate curved geometries as a linear geometry. Both OGR and Shapely can export as a GeoJSON-like dict
(via mapping
):
from osgeo import ogr
from shapely import wkb
from shapely.geometry import mapping
# Import as an OGR curved geometry
wkt_in = 'CURVEPOLYGON(CIRCULARSTRING(1 3, 3 5, 4 7, 7 3, 1 3))'
g1 = ogr.CreateGeometryFromWkt(wkt_in)
# Approximate as linear geometry, and export to GeoJSON
g1l = g1.GetLinearGeometry()
geojson_out = g1l.ExportToJson()
# Or transfer to shapely, then export as GeoJSON
g2 = wkb.loads(g1l.ExportToWkb())
geojson_dict = mapping(g2)