0

I have a code which goes like this

with fiona.open(some_file, 'r') as to_dissolve:
    out = to_dissolve.schema
    with fiona.open(another_file, 'w', 'ESRI Shapefile', out) as dissolved:
        # Get properties
        dissolved.write({'geometry': geom, 'properties': property})

The problem is that when multiple points are dissolved, they become multi-points instead. How do I make sure that the output schema will always match no matter what sort of inputs I get?

  • You Need to coerce all the geoms to be MultiPoints - even if they're MultiPoints of one. If you post the code that does the dissolving it will be easier to make more concrete suggestions. – RoperMaps Apr 30 '18 at 12:46
  • My issue is that I'm not necessarily dissolving points. I may be dissolving lines, polygons, etc. – absolutelydevastated May 8 '18 at 7:15

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.