[GIS] CAD and GeoServer

cadgeoserver

I have GeoServer and OpenLayers running quite nicely and now need to overlay a CAD drawing. I have looked at the geographic location part of CAD and set the Long/Lat to the appropriate values. I saved the drawing and then converted to a shapefile and then imported it into PostGIS. When I add to GeoServer the native bounds and Long/Lat generated in GeoServer are nowhere near where I would expect them to be. Can anyone point out what I am doing wrong?

When I set the Long/Lat in my drawing where does this point reference? Is it the center, top and left, bottom and left of the drawing? Also how can I find out what projection the drawing is in. It doesn't seem that you can set this in CAD. I've asked my CAD guys and no one seems to know.

Best Answer

There are several other questions here that have addressed this. It is not straight forward.

I'll assume the worst for now.

  1. Your drawing is probably not in a coordinate system. Most drafting is done an a "blind" cartesion system. Meaning they just take a blind stab at where they will start drafting and measure with whatever units happen to be the default.

  2. you need to geo-reference your cad drawing to a known crs. To do this you first decide on a system that is most like the "grid" the drawing was done on. (probably never giong to be lat/lon).

  3. once you decide what system to "convert" your drawing to, you need to move, rotate, and scale to make it match some other known features.
    That could be state boundaries, road network, municipalities, etc. (anything that you have feature references for in both your dwg, and reference data).

I normally move by grabbing one point and moving all my objects to the same point (in ref) first.
Then I rotate if the scale is anywhere near the same. If not, then scale the orignal to the ref. (just get it close until you get the right rotation). Then rotate using two known points in both data.

If you are using autocad map3d there are some nuances to this that can make it easier. Maybe you can fill us in with more after a read of this.

Related Question