CMDBuild Forum

How to load custom 2D floor plan on the map

Is there any tutorial or step by step guide that explain how to load a 2D floor plan into CMDBuild for it to be displayed on the map please?
Is Geoserver required?

The administration/technical/user guides are quite vague:

Please note that CMDBuild allows you to import vector maps as background files in “Shape” format
(usually created by AutoCAD in DWG format and then converted).

What about DWG generated by other 3D tools? What are the DWG requirements?

Thanks

1 Like

Hi,
Geoserver=>Yes you must have geoserver installed in order to use shapefiles as background files.

DWG=>You can use a recent version of Qgis to convert DWG/DXF to shapefiles. But file format conversion is only the first part of the work as you must also georeference the result.

It would be easier for you if you find someone able to help you about gis workflows.

J.-M.

Hi jmk,
Have you ever done it yourself? If so, could you please give us some more information?

You said:

But file format conversion is only the first part of the work as you must also georeference the result.

What are the other parts of the work?

Hi,
“other part of the work” will depend on your use cases :slight_smile:

“Georeferencing” a dataset (cad file) in gis consists to associate a “projection” to the drawing. This projection will locate data on earth (hence “georeferencing”).
Note that, sometimes, cad files are already georeferenced (mainly when they come from a “land surveyor” bus. service).

Roughly the cases are the following:

  1. There is only one building and you do not need to align your building shapes with a geographical map (openstreetmap for example).
    You can use the “pseudo mercator projection” in qgis. That will locate the building on the X/Y coordinate system used by the dwg file.

  2. You have two (or more) buildings and you do not need to align your building shapes with a geographical map. You may also use the “pseudo mercator” projection. but if the coordinates system are the same in the two cad files, the buildings will end up at the same position. (buildings will overlap). : in this case you will have to apply a shift in order to translate one of the building coordinates (for exemple to translate the second building by 200 meters on the right of the first).

  3. you need to align your buillding shape(s) with a geographical map. It is likely that your cad coordinates are not in the “good” coordinate system (the coordinate system used by your geographical national agency or the coodinate system used by openlayers). So you will have to move the (cad) building to the “good” location , by applying an affine transformation (translation, scaling, rotation) to the cad/dwg file. Note that this affine transformation could be done through matrix multiplication or (I prefer this solution) using an “oblique mercator projection (omerc in qgis/proj4)”.

1 Like