Convert multi-layer DWG into several KML or geoJSON files (one per layer)

المشرف العام

Administrator
طاقم الإدارة
I have some big DWG files, with 5 to 50 layers, which I draw and geolocated using AutoCAD (with some external modules).Now I need to use them in a map on a website (using Google Maps or Leaflet). I need to convert them to KML or geoJSON so that the JS library can load them and display them on the map.

I used AutoCAD to export my .DWG into .DXF, then I installed GDAL and used ogr2ogr to convert those DXFs into geoJSON. It works, but the generated geoJSON is very big (more than 10 megabytes) and it loads forever once I try to display it into a google map or a leaflet map.

What I would like to do, is to have a separated geoJSON/KML for every layer of my DWG/DXF file, so that I can load and display each layer separately which hopefully would increase performance.

I am trying to have an automated workflow, because as I have a lot of files, it would take too much time to take every one of them and split layers manually.

Any idea ?



أكثر...
 
أعلى