0

I have ten geodataframe; I would like to export each one of them to DXF:

geodataframes= [gdf1,gfd2,gdf2]
for geodataframe in geodataframes:
    #geodataframe to dxf

it would be possible?

PolyGeo
  • 65,136
  • 29
  • 109
  • 338
Gregor D
  • 321
  • 2
  • 9

1 Answers1

5

GeoPandas supports dxf. You just have to keep in mind that dxf can hold only geometry, not attributes, which means that you have to save GeoSeries, not GeoDataFrame.

geodataframes = [gdf1, gfd2, gdf3]
for i, geodataframe in enumerate(geodataframes):
    geodataframe.geometry.to_file(f'file_{i}.dxf', driver='DXF')
martinfleis
  • 2,407
  • 11
  • 17