CAD file (DXF or DWG) and OpenLayers 3

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

CAD file (DXF or DWG) and OpenLayers 3

Pedro Henriques
Hi,

This is my first post in this mailing-list and English isn't my native language :)

It's possible to add  a CAD file (DXF or DWG) inside one map using OpenLayers 3?


best regards
Pedro Henriques


_______________________________________________
Users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/openlayers-users
Reply | Threaded
Open this post in threaded view
|

Re: CAD file (DXF or DWG) and OpenLayers 3

kagelos
Hi Pedro,

I am pretty confident that it's absolutely impossible to display a DWG file in OL3 currently. Theoretically it could be possible to write a custom ol.format that parses any file type, but there is none right now.
I don't even believe that there is a way to display (directly) a DXF file either, even though it's a text format with documentation from Autodesk.

So what to do? I would try GDAL's ogr2ogr to convert the DXF to GeoJSON, which is supported by OL3. However don't expect the result to look exactly like what you see in AutoCAD.

Relevant links:
http://www.gdal.org/
http://www.gdal.org/ogr2ogr.html

Regards
Angelos


On 30/9/2015 13:16, Pedro Henriques wrote:
Hi,

This is my first post in this mailing-list and English isn't my native language :)

It's possible to add  a CAD file (DXF or DWG) inside one map using OpenLayers 3?


best regards
Pedro Henriques



_______________________________________________
Users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/openlayers-users


_______________________________________________
Users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/openlayers-users