Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW

Digitizing floor plans for use in Qlik GeoAnalytics (QGA)

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
Patric_Nordstrom
Employee
Employee

Digitizing floor plans for use in Qlik GeoAnalytics (QGA)

Last Update:

Apr 2, 2021 4:18:51 AM

Updated By:

Patric_Nordstrom

Created date:

Aug 1, 2018 8:06:23 AM

Attachments

Update, the example app now have the drawing as a background.

Floor plans and cad drawings can be useful, for instance in production dashboards, to visualize status and flows in a factory. However cad drawings are in many cases a mess to work with.

 

Here's a simple, pragmatic approach to digitize rather than import the actual drawing. The major issue with most CAD drawings is lack of structure, details without meaning and the objects on the right level are missing. It’s not the format or alignment that is the problem. In many cases it's better to use the drawing as a input to produce the polygons and information needed.

 

In this tutorial I use QGIS for digitizing and out put to a format that is easy to import to QGA. In this example the drawing is digitized in a local reference system, ie no alignment is made with the rest of the world.

Step-by-step guide

  1. Install QGA basic, Plus not needed if Dropbox et al is used.
  2. Install QGIS (https://www.qgis.org)
  3. Get a picture of the floor plan in an image format like PNG or JPG.
  4. Drag and drop the image to the layers panel of QGIS. Choose a meter based Coordinate Reference System, for instance EPSG:3857 is a good choice.

    step4.png

  5. Layer→ Create Layer→ New Shapefile Layer... Choose Polygon, same CRS, 3857. Add "Name" text field for convenience.

    step5.png

  6. Save layer in a folder. Preferable in dropbox folder.

    step6.png

  7. Right click on the new polygon layer and "Toggle editing" to start editing.

    step7.png
  8. Start adding features (Ctrl +)
    step8.png

  9. Click on the edges of the desired polygon, set id and name. Use node tool if fine tuning of edges is necessary.

    step9.png
  10. When done "Toggle editing"to save.

    step10.png
  11. Zip the shapefile to an archive and get the dropbox url. (replace www with dl to get direct link)
    step11.png

  12. Create a new Sense app and use the drop url in the Load operator of QGA connector. CRS: EPSG:3857. Note change url from 'www' to 'dl' for direct file access in dropbox.
    step12.png

Example app

The example app features sites and a drawing visible when one site is selected.app.png

 

If you want to add and image background, here's how to scale and translate the image, in my example:

image.png

 

 

 

 

 

Tip 1: get a white background use ='[[ [-180, -80], [-180,  80], [ 180,  80], [ 180, -80], [-180, -80] ]]' for location, set color to white and make the layer non selectable and not part of autozoom.

 

Tip 2, Use a bubble layer with coordinates for different sites, when one site is selected turn on drawing and the white background.

Tags (1)
Labels (2)
Comments
jfdierckx
Partner - Creator
Partner - Creator

This is a great way to leverage Geoanalytics !

Is there a way to get the original floor plan drawing as a background for this map ? This would allow to have other layers (such as points and density layers) directely on top of the drawing.

paulriedel
Partner - Contributor
Partner - Contributor

Hey @Patric_Nordstrom,

is there any chance of putting drawings as background layer within the map (regarding @jfdierckx's question)?

Thanks Paul

0 Likes
Patric_Nordstrom
Employee
Employee

Hi,

Plain png image as background is on the roadmap for the native Qlik map chart for 2019.

Meanwhile check out Christof Schwarz work:

https://www.youtube.com/watch?v=4uWlmNm95n8

Thanks,

Patric

0 Likes
joe_warbington
Luminary Alumni
Luminary Alumni

This is among my favorite innovations at Qlik! Thanks @Patric_Nordstrom for writing out the process to make things like this possible: the Qlik Body Map app.

Qlik Body Map appQlik Body Map app

Patric_Nordstrom
Employee
Employee

Thanks @joe_warbington !

I made a custom guide for converting an image into map, check this post:

https://community.qlik.com/t5/Qlik-GeoAnalytics-Documents/Image-to-Map/ta-p/1552580

Thanks,

Patric

keshu00_09
Contributor
Contributor

Hi @Patric_Nordstrom ,

I was implementing the steps as mentioned by Christof Schwartz to map a floor pan in Qlik Sense. However I am facing an issue. I have done all the steps asked by you but my floor pan is not mapping the points correctly. Its able to map the Latitude co-ordinates correctly but the longitude coordinates are not being mapped. So essentially i am getting all the points in a straight vertical line. Could you help me out?

0 Likes
Patric_Nordstrom
Employee
Employee

@keshu00_09  

Please check out Qlik Sense April 2019 ,the native mapchart now can have a plain image background, it's easier than the TMS approach unless the image is extremely big.

 

Thanks,

Patric

0 Likes
Radu
Contributor II
Contributor II

Hi Patric, I am trying right now to insert an image layer in a map chart but I can't seem to succeed due to:

1) Chart size (looks like I need huge images to adapt to the chart and not to be displayed as small pins

2) Setting the upper left and lower right coordinates in order to fill the chart as best as possible with the image

and so on...

Is there any tutorial (except the help pages) that could point me to the required steps?

Thanks,

Radu

0 Likes
Patric_Nordstrom
Employee
Employee

Image as map background

Having an image is a quick way to add floor plans or drawings to the map.
 
Usage
 
1. Set the map to blank projection and projection to undefined meters.
2. Add url to image (png, jpg, gif) (svg except in IE).
3. Define top left and bottom right, pixels is easiest.
4. Optional, add any layer on top using pixels as coordinates. Note that image software usually have origo in topleft corner while the geographic origo is bottom left.
 
Floor plans can also be added as CAD drawings but most of time the drawings are too messy and tends lacks the structure you want.
0 Likes
Patric_Nordstrom
Employee
Employee

Image as map background

Having an image is a quick way to add floor plans or drawings to the map.
 
Usage
 
1. Set the map to blank projection and projection to undefined meters.
2. Add url to image (png, jpg, gif) (svg except in IE).
3. Define top left and bottom right, pixels is easiest.
4. Optional, add any layer on top using pixels as coordinates. Note that image software usually have origo in topleft corner while the geographic origo is bottom left.
 
Floor plans can also be added as CAD drawings but most of time the drawings are too messy and tends lacks the structure you want.
0 Likes
Version history
Last update:
‎2021-04-02 04:18 AM
Updated by: