I want to overlay a cad drawing on a Google map using GeoServer. Any tips on how I can do this? Do I need to convert to CAD file to a shapefile? I'm presuming I do.

If so what tools are available to do this?


If you're not afraid of using command-line tools, then GDAL/OGR is your friend! It is a free set of tools for manipulating raster and vector data that has become pretty much the de-facto standard. It will take Autocad DXF and Microstation DGN (and others, but those are the only CAD formats I can see in the list), and will convert them to pretty much any other format. If your dataset isn't huge (on the order of a gigabyte or so), then shapefiles will be fine; anything bigger and you should look at database formats such as PostgreSQL.

If you're not confident with command-line tools, then the free GIS application QGIS is a good place to start. It uses GDAL/OGR under the bonnet, and has lots of other GIS features as well. You'll be able to import the CAD file directly and view it to make sure it looks how you expect, then you can export it as a shapefile.

Having worked with CAD files before, remember that GIS applications like QGIS and GeoServer expect data to be georeferenced in some known projection, but CAD files often have a local coordinate system. If that is the case, moving it isn't too hard, but if you don't, you might find your data is somewhere in the Atlantic off the coast of Africa... If you need help with that, feel free to post more details.

Once you've set up your GeoServer, you can choose to export it to KML which will drop into Google Earth nicely. If you want it as raster data for other web mapping clients, then setting it up as a WMS datasource is necessary. WMS can be imported into Google Earth, but it's a little obscure. You have to create an Image Overlay, then under the "refresh" tab, there's a "WMS Parameters" button that you have to type in your server details into. IIRC, GeoServer will tell you what you would need to type if this is completely new to you.

  • 1
    thanks. Just downloading QGIS now. Ill have a play. This is all brand new to me so your help is greatly appreciated. – Richard Banks Apr 11 '11 at 9:59
  • It seems geolocating vector data isn't as easy as I thought with GDAL/OGR/QGIS. As far as I can tell at the moment, setting the origin in the CAD program is the way to do it. – MerseyViking Apr 11 '11 at 13:48
  • If your data (original) is drawn in a standard projection (x,y being the same measure or scale) you would need to set the origin, rotation and scale. It helps greatly if there are corresponding objects in both the original and projected data. if a direct move, rotate, scale won't get you there you will need a tool to rubbersheet (fit) your data to the intended projection. – Brad Nesom Apr 11 '11 at 14:23
  • thanks guys. I should be getting a cad drawing today which includes coords to test. – Richard Banks Apr 12 '11 at 8:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.