[GIS] Converting CAD to map tiles

apiccadsoftware-recommendationstiles

My team is working on an application that has a map feature, and we want to extend this feature greatly. Among other things, we want the user to be able to load a CAD drawing, and place it on the map. The map is just a single image right now, but we want a more advanced and flexible solution, like eg. tile based. Some of our users have showed us some CAD drawings (DWG) they want to use, and they are absolutely huge, so we are afraid that performance will be bad. I have snooped around and found that (eg.) bing maps support map tile overlays, and I guess that converting the huge CAD drawings to overlayed map tiles could make performance much better, while still maintaing a certain level of control, like clicking layers on and off. But how can I convert the CAD drawings to map tiles from within our application? Is there any API out there that can help with that? In C#?

Best Answer

The MapTiler is tool for creating the map tiles for bing, google maps, leaflet or openlayers.

To process the CAD files you may need to save it first as a PDF. If geographic coordinates are used in the CAD then export to GeoPDF. Alternatively you could export the data from the CAD software as an image such as TIFF/GeoTIFF or JPEG.

MapTiler will open such files and create the tiles and even sample viewers for you. The existing geocoordinates are loaded automatically. If the file is missing location info then it can be assigned visually from the graphical user interface.

If you develop a desktop application then you could probably agree on redistribution rights of the MapTiler binaries together with you application. If you develop a web application then the MapTiler Pro can be integrated easily.

Your code in C# can call the maptiler.exe directly and use it as the rendering core for the tiles. All functions of the software are available as parameters on the command-line so the process can be fully automated and hidden to your customers. You can make your own frontend.

The size of the input file is not an issue. MapTiler can render tiles for detailed maps of whole countries. The PDF/GeoPDF support has been recently improved (in MapTiler 0.6.1 and newer) to support huge PDFs generated by AutoCAD, Microstation and other CAD software tools.

Related Question