Creating a floor plan (ADVANCED)

Proximi.io team prepares the floorplan for your projects from the PNG, PDF or CAD file received from you. This tutorial is only to give you information, in case you are interested in learning more.


Creating Proximi.io-compatible floor plans with QGIS

Important! This is advanced documentation. If you are not familiar with QGIS as a programme, it can take you days to finish your floor plan. QGIS is a completely separate Open Source programme managed by a third party. We have no affiliation with QGIS. We cannot provide any support for issues with the QGIS software.

Training for creating floorplans and onboarding a venue takes around 4 hours, depending on the size of the venue.

Prerequisites for creating floorplans: - Detailed, architechtural floorplans of the venue in CAD or PDF format. Floorplan must have information on the scale and orientation. - If using CAD files, a CAD reader programme with a possibility to export as a PNG or PDF. - Picture editing tool, such as GIMP or Photoshop, installed on your computer. Main use is for cropping and resizing images. - QGIS programme installed on your computer. See installation instructions below. - Have the QuickMapServices plugin installed. - Any code editing tool (even Notepad works) installed on your computer.

Example floor plan created with QGIS with these instructions: https://maps.proximi.io/wayfinding-demo/map

Downloading QGIS

  1. Download QGIS programme, https://www.qgis.org/en/site/forusers/download.html. Go for the latest stable release. This download might take quite long, possibly 1-2h. QGIS is available for Windows, Mac and Linux. The installation process is trickier for Mac. If you encounter any problems with the installation process, do refer to any relevant YouTube videos. 

QuickMapServices plugin

  1. On the top menu, select Plugins. Click "Manage and Install Plugins"
  2. Search for QuickMapServices. 
  3. Install plugin. The process of installing plugins may be a bit tricky with a Mac. Do refer to any relevant YouTube videos to overcome the issues.
  4. Depending on your QGIS version, you might see a toolbar appearing. If not, you can find this plugin under Web ► QuickMapServices.

Getting started

  1. In order to make the process easier for you, it is recommended by starting with cropping the extra borders out of your floorplan and turning it into a png/jpg. You can use any photo editing tool, such as GIMP or Photoshop for this.
  2. Open a new project. Make sure that the projection used in the project is: EPSG:3857. This is very important!
  3. Create a new folder for your project, and save the project there. Make sure that you save all the different layers and files crated throughout the process in the same location.

Adding a map and reference floorplan

Adding a map

  1. Look for the QuickMapServices button in your toolbar. Go to OSM ► OSM Standard and click on that. This will add a basic Open Street Maps map at the bottom of your project.
  2. It is also possible to add satellite maps into your project. Click on Web ► QuickMapServices ► Settings and open the More services tab. Read with consideration the message of this tab and if you agree click on the Get Contributed pack button. You will now have access to satellite images and a lot of other maps.

Add reference floor plan - Option 1 for outdoor maps

  1. This method works better for outdoor maps. In Proximi.io case this typically refers to amusement parks and zoos. Zoom the map to your venue's location. If you want to make this process easier for you, you can install and use the OSM place search plugin.
  2. Use the built-in Georeferencer option. Select from the top menu Layer ► Georeferencer. This opens a Georeferencer pop-up. To make the process easier for you, it is recommended to dock this tool. Go to Settings ► Configure Georeferencer ..  and enable "Show georeferencer window docked". The tool now appears as a bottom bar. You can also move it to the side, if that feels more natural. Also recommended to enable View ► Panels ► GCP table
  3. Click on "Open raster" and search for the image on your computer.
  4. Search for reference points that you can identify both on your raster map and on OSM map. By using the "Add point" tool, click on that point on the Georeferencer window map. A pop-up opens, asking for the coordinates of that point. Click the "From map canvas" button. Find that same point on the map and click on it. Click ok.
  5. Repeat for multiple points.
  6. Click on the settings icon, and specify Transformation type: "Helmert" or "Polynomial 1" (test to see which one looks better). Enable "Load in QGIS when done".
  7. Click on the play button. A new map with correctly georeferenced map should appear in the layer list.

Add reference floor plan - Option 2 for indoor maps

  1. This method works better for indoor maps / floorplans. Zoom the map to your venue's location. If you want to make this process easier for you, you can install and use the OSM place search plugin.
  2. Add a floor plan image for aid. Needs to be either in PNG, JPG or PDF format. We recommend moving the extra white around your building, to make the next step easier.
  3.  Raster image comes by default without coordinates. The easiest way to come over this is to use Freehand raster georeferencer plugin. Use the move, rotate and scale -tools to place the floor plan correctly. When scaling, press down CTRL to make sure you are not adjusting the proportions. More instructions: http://gvellut.github.io/FreehandRasterGeoreferencer/
  4. This is a very important step, so use good time for it. If you know the real-world length of any feature in your floor plan, use the measure line tool to make sure the length on QGIS matches with the real-world length. For measuring in QGIS, use the measure tool (ctrl + shift + m).
  5. It is recommended to Export raster with word file once you are done. Save as a .tif file.
  6. Add floor plan images for any additional floors and pay special attention to matching the rotation degree, scaling with the previous floors.
  7. It is recommended that you add the tif layers back into the project by clicking Layer ► Add layer ► Add raster layer and search for the correct file on your computer.

Creating vectors layers

  1. Add a new shapefile layer (Layer >> Create Layer >> New Shapefile Layer). Add it to the same folder, where your project is. Location can be changed from the button saying "...". Important: geometry type is polygon, and projection EPSG:3857

  1. You will be creating a new layer for each floor, and for each main category of things that you want to visualize. The point of creating layers is to more easily separate items in the QGIS project. You will want to create a separate layer for the very bottom (=the floor), for the walls and rooms (= larger items) and for small details (=such as pillars, furniture, fountains etc).

  1. Select a layer from the Layer list to work on it. Each layer is locked by default. Unlock a layer to start editing it with the pen tool:

  1. Start adding your polygon shapes by clicking on the map with the Add Polygon Feature tool. If this tool is not visible, go to View ► Toolbars ► Digitizing toolbar. Edit with the Vertex tool as needed. Start from floors, and continue to rooms or walls. Edit transparency to make it easier to edit the vectors. Click with the left side button of the mouse to add vertexes, and end a polygon by clicking on the right side button of the mouse.

  2. Remember to save often. Save both layer edits and project edits.
  3. Prepare last the attribute table. If this tool is not visible, go to View ► Toolbars ► Attribute table.Start by deleting the default id field (it had wrong input format) The add the following compulsory attributes: (note: they are case sensitive)
attribute type length Why do we need this
id string 50 To identify the separate polygons. Must be in UUID format, generate one through https://www.uuidgenerator.net/ for each of your polygons separately or use the built-in UUID generator in QGIS.
level integer 2 Use numbers in format 2,3,4 (not 02, 03 etc). Must match with the floor numbers in Proximi.io portal. Ground floor is 0.
type string 20 We have a set of pre-programmed options to select from. Options presented below. You can also create your own types, based on project needs.
place_id (optional) string 50 To keep track of which floor belong to which Place. Makes it much easier for you to e.g. delete geoJSON in the long run, if you have multiple Places under your account. Copy the place_id from Proximi.io platform, under the correct place:
color (optional) string 7 The HTML-color code you want that polygon to be Recommended: edit this via style.css
height (optional) integer 2 The height of the individual polygon Recommended: edit this via style.css

Pre-programmed layer types in the order they will appear on the map from bottom to top. It is necessary to use these pre-programmed layer categories. However, it is possible to change the styling of how they appear on the map (2D / 3D, colour). For any styling changes, contact Proximi.io staff.

Layer name Type Explanation
ground Fill Use for correcting wrong building shape on OSM
parking_area Fill Outdoor or indoor parking area
grass_area Fill Grass
outdoor_walkway Line Walking ways outdoors where they are wrong or missing
floor Fill Important layer to cover the floor area. Used to create the 3D effect
cutout Fill Use to mark areas that are open to the floor below
outer_wall Fill extrusion
inner_wall Fill extrusion
outer_wall_line Line
inner_wall_line Line
level_changer_area Fill Use for areas covered by elevators, escalators and stairs
hall Fill Use for large open areas that can be walked through (if you want to visualize them as different colours)
room Fill Room that is open for visitors, e.g. office
room_private Fill Room that is closed from visitors, e.g. storage, electricals
shop Fill Commercial area (clothes, groceries, furniture…)
restaurant Fill Commercial area (café, restaurant, bar, bakery…)
entertainment Fill Commercial area (cinema, playground, art gallery…)
services Fill Commercial area (beauty salon, banks, shoemaker…). Note: services in plural!
personal_care Fill Area for personal care (restroom, baby change room, prayer room)
seating Fill Large seating area in e.g. concert hall or stadium
transport Fill Use for designating e.g. metro stations, train platforms, Uber pick-up points etc that are visible on the map, but are not the main focus of your project.
structure Fill extrusion Larger structure that you want to show on the map (e.g. a pillar)
furniture Fill extrusion Something that is movable, but you would still want to visualize on the map
  1. Handling attribute table in bulk. Save yourself hours of work and use the ability to edit all the rows in one go. Go to Attribute table -> Field Calculator. Update existing field -> id -> Record and attributes -> uuid -> 'WithoutBraces'. Repeat for level and type. For type, remember to use single quotation marks, e.g. 'shop'.

Special styling tips

Snapping

  • Recommended for nicer alignment of vectors.
  • Go to View ► Toolbars ► Snapping to get all the tools visible
  • To enable: 
    • Enable Snapping (U magnet button)
    • Select both vertex and segment
    • Enable topological editing
    • Enable snapping on intersection
    • Enable tracing

Cutouts

It is not possible to cut out holes in the polygons (even though there is a tool for this in QGIS, this is not supported in the Proximi.io platform! Use the cutout layer described above to mark them with different colours.

Also: do not create polygons that create a closed shape with itself, example: 

Always leave a small gap between the parts that would close the shape on itself:


Cutting areas

In order to format quickly multiple similarly shaped rooms, you can also cut shapes into two. Use the snip tool.


Copying

  • A tip for faster production of vectors is copying. You can just select items and copy/paste them in the same layer.
  • You can copy within the same layer, or copy into other layers. Just make sure both the copy and paste layers are editable. Copy all the elements you want to duplicate to the second layer and “Paste Features As New Vector Layer”. Make sure the file type is ESRI shapefile, so that you will be able to edit the vectors in the new layer.
  • Remember to make sure that all your polygons have unique IDs at the end, especially when you have done copy/pasting.

Lines

  • It is also possible to create shapes that are lines. Create a new layer that is "GeometryType: LineString".
  • Shape Digitizing toolbar has great tools for creating even rectangles, circles etc. Note that if you create a lot of circles, your geoJSON gets very complex. It is recommended that you simplify your circles through Vector -> Geometry tools -> Simplify (Selected shapes only, for example 0,05 meters). This will create a new layer with simplified circles, and you can delete the original ones in the previous layer. 


Rectangles

  • Rectanglify plugin is also great for straightening up your rectangles.
  • Geometry Shapes plugin is an easy way to create rectangle and oval/circle shapes directly. Hold down shift to create circles.

Outlines

You can add outlines to the polygons through the styling. No need to draw additional outlines in QGIS.


Offset curve

Add some space between polygons to make different shops stand out from each other. Use the offset curve tool (in Advanced Digitizing Toolbar) to decrease the size of a polygon. Try for example -0,2, which we use in our projects.

    • Zooming effects (items growing in size as you zoom in). Note that max zoom refers to the closest zoom level of when you want to display things, and min zoom the furthest when you want to show things.


Export geoJSON

  1. Right-click the layer in the layer listing. Select "Export" -> "Save features as"
  2. Select the following settings: Format: "GeoJSON". Search for the right location in your computer and give the file the name you wish. CRS: EPSG: 4326.
  3.  Also heavily recommended to disable "Add saved file to map". Otherwise you will get very easily confused between all the layers.

It is recommended to unselect "Add saved file to map".

Note that when you have hundreds of features, you will need to save them in smaller bulks. Select about 100 features with the select tool -> Export -> Save Selected Features as.

Adding existing layers to your project

Sometimes you might have readily existing layers that you want to add to your project. The files should be Esri shapefiles, SHP format. Otherwise you will not be able to edit them properly.

  1. Go to Layer -> Add Layer -> Add Vector Layer

  1. Select the file from the "..." button.
  2. Click "Add" to add it. If the layer does not appear, go back to this view and click "Add" again. Seems to be a common bug with the programme that you need to do it twice.

Uploading floorplans to Proximi.io portal

  1. Open each layer file one by one (you can just use Notepad or any other simple code editing app, e.g. Sublime Text), and copy the content
  2. Open the Wayfinding view in the web portal, and go to “Settings. You’ll find a “Add GeoJSON”. Paste the content there and press “Submit”.
  3. Repeat for all layers

Empty the box in between adding different layers.

Remember to save changes

Refresh the page before starting to edit Points of Interest, Paths etc.


Getting coordinates for raster floorplans

  • In order to make sure your beacons, routes etc are all perfectly aligned, it is important to update a raster floorplan that matches exactly with the size and orientation of the geoJSON floorplan. Here’s the instructions for extracting the orientation from QGIS:
  1. Create a new shapefile layer. This time you don't need to do any alterations on the attribute table.
  2. Add a polygon around the edges of the floorplan. Make sure you follow the edges of the picture, and not the building. This should be the exact same png you will be uploading to our portal.
  3. Go to the menu -> Vector -> Geometry tools -> polygon centroid and create a centroid point layer
  4. Export the coordinates of the created centroid to geoJSON
  5. Open the GeoJSON file we just created (e.g. in Notebook) and copy the coordinates from there to Proximi.io portal. The order is: longitude, latitude.
  6. Check rotation from your QGIS project and copy to Proximi.io portal
  7. Measure width of the picture in QGIS project with the measurement tool and copy to Proximi.io portal.

Common issues

  1. One polygon disappearing from a map. There are a couple of common reasons:
    1. Polygon crosses over itself. Identify the issue by selecting the vertex tool in QGIS and right-clicking on top of the polygon that keeps disappearing. If you see a green cross appearing on one of the vertexes, that one has an issue. Quite commonly two vertexes have been created in the same corner by accident, and that breaks the polygon shape. Fix by deleting one of the vertexes. 

    2. Multiple polygons have the same ID. Change the ID of one of them.
    3. The type specified for the polygon does not exist. Could be either misspelling or you need to edit your style.
    4. Polygon has wrong floor level.
  2. No polygon appearing on the map
    1. You determined wrong projection in the exporting phase. Export again with the correct one

3. Forbidden layer names. There are just a couple of forbidden terms (otherwise in use in our algorithm). Here is a list of them:

- door

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us