Skip to content

Convert DXF entities created by ezdxf to shapely geomerty objects.

License

Notifications You must be signed in to change notification settings

ChRen95/ezdxf-shapely

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EZDXF to Shapely Converter

Convert geometric entities loaded vom DXF files using ezdxf to shapely geometry objects.

First use ezdxf to load the DXF entities from file and filter them using query or similar.

import ezdxf

dxf_doc = ezdxf.readfile("your_file.dxf")
entities = dxf_doc.modelspace().query("*[layer==0]")

Then use ezdxf-shapely to convert the entities and refine the results.

import ezdxf_shapely

geoms = ezdxf_shapely.convert_all(entities)
polygons = ezdxf_shapely.polygonize(geoms) # optionally merge lines to polygons

License

Licensed under the terms of the MIT License

About

Convert DXF entities created by ezdxf to shapely geomerty objects.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%