I'm attempting to plot a CAD file (.dxf) using GeoPandas then save it as a KML file. When I attempt to do so - the CAD file ends up showing up in the wrong place (in the middle of the ocean - when it should be in Florida). The strange part is this only occurs after opening the .dxf then saving it with Adobe Illustrator (in order to perform cleanup). If I run the same process without opening and saving with Illustrator - the files plot correctly.
I've done a considerable amount of research - but it appears I'm doing everything correctly using GeoPandas (I've reduced my code to the following few lines for simplicity - but the result is the same - once the .dxf has been opened with Illustrator - it ends up in the middle of the ocean when opening the .kml!)
import geopandas as gpd
from geopandas import GeoDataFrame
import os
import fiona
from fiona.crs import from_epsg
# Enable Fiona KML driver
gpd.io.file.fiona.drvsupport.supported_drivers['KML'] = 'rw'
# Read (and display) Data from CAD File
plano = gpd.read_file('C:/Users/dev/Desktop/ ... 2000.dxf')
# Add the Coordinate Reference System
plano.crs = {'init':'epsg:3517'}
plano.plot()
# Write KML file
with fiona.Env():
plano.to_file('C:/Users/dev/Desktop/ ... /2000.kml', driver='KML')
I have no idea why this is happening - any suggestions are GREATLY appreciated.
The fix / solution to this issue is to use an Adobe Illustrator plugin which allows for the preservation of GIS / Geo-spatial data. We've decided to use: https://www.avenza.com/mapublisher/
Thank you to everyone who provided input regarding this issue.