mattijn / topojson

Encode spatial data as topology in Python! 🌍 https://mattijn.github.io/topojson
BSD 3-Clause "New" or "Revised" License
177 stars 27 forks source link

Converting GeoJSON FeatureCollection to TopoJSON #162

Closed ghost closed 2 years ago

ghost commented 2 years ago

Is it possible to convert GeoJSON feature collection to TopoJSON? I tried like this, but server fails to send any response:

    result = await db.zip_cr_boundaries(ziplist.zips, cr, zipc) # list of dict objects in GeoJSON format
    result = {"type": "FeatureCollection", "features": result}
    result = tp.Topology(result, prequantize=False)
    return result.to_dict()

No errors are being logged, I am using FastAPI to return this data Request just stalls on client side

ghost commented 2 years ago

Sorry, there is no issue. The response took a long time i.e. around 11 mins