Wednesday, 1 October 2014

Converting Images For Survey and Management Tools

Being able to convert electronic floor plans into formats supported by a wireless survey or management tool is a regular part of being a WiFi professional. A customer may often provide floor plans in a format that isn’t accepted by the particular tool that you are using, leaving you with a file-conversion headache. In this article we take a look at a solution (for Windows users) to convert two common file types into a useable format.


Background


When using a professional wireless survey tool, one of the first steps in preparing your survey project is to import an electronic copy of the building floor plans. The plans are used to show areas surveyed and the RF measurements (“heapmaps”) that have been taken.


Similarly, once a WiFi network has been installed, there is often a requirement to import floor plans into a network management system (NMS) to show the areas covered by the new deployment. This may be a cloud-based console or perhaps a dedicated on-site management server. The NMS may show the location of deployed access points, together with their status and heatmaps showing RF coverage.


In both of these cases, a file containing the floor plan needs to be imported so that AP positions and RF data can be overlaid on the plan within the tool. The challenge that we often face is that the floor plans supplied may be in a format that cannot be directly imported in to the survey or management tool. For instance, a tool may only support import formats of jpg, png and gif. However, the floors plans may only be available in pdf or dwg (AutoCad) format. This means we have to convert the files we have been given in to a useable format.


File Formats


In my experience, customers tend to provide floor plans in one of two formats: PDF or DWG. I’m not sure why this is - I suspect they ask their estates or facilities department for a copy of the floor plan and this is what they have on file. Both formats tend to present a challenge, as they are often not supported formats for importing into many tools.


PDF Plans
PDF is the number one format that I find customers tend to supply when I request building plans. Also, this format isn’t generally supported by the various tools I have used, so we have to find some way of converting it to an image file format.


Although PDF files are easy enough to open and view, using free viewers such as the Adobe Acrobat reader, the viewers do not allow you to save the file in an alternative format. If you are fortunate enough to have a full copy of the (rather expensive) Adobe Acrobat software, then you can extract the image from the PDF and save it as an alternative format. But, for the majority of us (on a tight budget), this isn’t an option.


PDF viewers also provide us with no option to manipulate the floor plan image. Often, it may be desirable to remove various features (e.g. borders and legends) from the original image before importing in to our survey tool. By converting to another image format, we have the opportunity to edit the image as required with a simple graphics editor (such as Paint).


DWG Plans
If customers haven’t supplied PDF-format plans, then I generally find that they will supply them as DWG files. These are the file format used by AutoCad software: a very large, very expensive piece of CAD software used to create drawings such as building plans.


Again, most of us won’t have a copy of AutoCad to enable us to open and manipulate our DWG files, but we can open them using the TrueView viewer package.


Trueview is a very useful package that will allow us to view a DWG file. It also allows us to do useful things such as turning layers on and off. Often, a DWG file will show many additional services that you perhaps don’t want included on your imported plan (such as pipework or electrical distribution). Many of these services are shown as a ‘layer’ of information that may be turned off in TrueView to de-clutter the final imported plan.


TrueView natively provides the ability to export the floor plan into an alternative file format, such as PNG of JPG. Rather confusingly, the feature you need to do this is referred to as ‘plot’ rather than export. By electing to plot a plan, it can be ‘plotted’ out to an PNG or JPG format. However, I have found this method to be quite difficult to get good results with, so I would advise avoiding this and using the method suggested later in this article.


‘Printing’ Required File Formats
Now that we have discussed the challenges that we face with DWG and PDF format files, it’s time to look at how we can consistently convert them into formats that we can use with our survey and management tools.
 
File Resolution and Plan Colour
Before we go ahead and look at how to  convert our files, it’s worth spending a few moments talking about file resolution. There is little point in spending time converting our floor plans into new formats if they end up as pixelated splodges which show no detail when you zoom in to view them. This is noticeable when performing operations such as placing access points on to plans and cannot see enough detail to accurately place them. Therefore, we need to ensure that during our conversion process, we create a reasonably high resolution image.


In addition to image resolution, I believe that image colour is also important. Many building plans may be multi-coloured, with different services and building materials shown in a variety of colours. When importing multi-coloured plans into any tool that will display information overlaid on to the plan, then I’d recommend using grayscale colouration. Grayscale simply means that all colours have been removed and that the plan is shown in varying shade of gray (like a black and white photograph). Trust me on this - it is much better to use a grayscale than colour images for your floor plans.


PDFCreator


Finally! We’re now ready to look at how to convert our floor plan into a high-resolution, grayscale image. Although there are a number of file formats that are supported by most survey and management tools (e.g. JPG, PNG, BMP, GIF etc.), my personal favourite format is PNG - it seems to be supported pretty much everywhere and gives great results in terms of file sizes and quality.


The tool we’re going to use for the conversion process is PDFCreator. It’s a free, Open Source project over at SourceForge.  Don’t be fooled by the name - although it can be used to create PDF files, it can also be used to create files in a wide variety of other formats (including many image file formats). Once it has been installed, it adds a new ‘virtual’ printer to your list of available printers within Windows. By simply printing the files you are displaying within your PDF or DWG viewer, it is ‘printed’ to a new file in the desired file format. Before printing, a number of options are available to control the resolution and colouration of the file that will be created.


Now that we’ve described how PDFCreator operates, we’ll run through an example of how to convert both a PDF and DWG file to a high resolution, grayscale PNG image file.


Creating A PNG Grayscale File


In both instances (DWG & PDF), the conversion is actually very simple. To convert our floor plan, we’ll perform the following steps:


  1. Open the image in the PDF or DWG viewer
  2. Select the ‘print’ (or plot) option
  3. Select the virtual PDFCreator printer
  4. Set options for resolution and colouration
  5. ‘Print’ the file to the virtual printer (this actually saves the image in the selected format)


Converting a PDF File


First let’s look at converting a PDF file. Here’s a step-by-step guide:


  1. Open our floor plan image using our selected PDF viewer (e.g. Adobe Acrobat Reader, Foxit PDF Reader) and hit the ‘Print’ button (highlighted in the image below) and view the print dialog box:


  1. Select the ‘PDFCreator’ printer and hit the ‘Properties’ button.





  1. In the Properties pop-up, hit the ‘Advanced’ button so that we can set our paper size (to ensure we get good resolution):




  1. In the ‘Advanced’ pop-up select a large paper size - this will ensure a high resolution to provide a clear, detailed image, instead of a pixelated mess.

    The size depends on the detail on your floor plan - the more details, the larger the paper size you need to get a good resolution. In this example I’ve gone for an ‘A2’ paper size (bear in mind that many DWG diagrams are ‘A0’ in their original format):





  1. Hit OK on the 2 pop-ups you have open and hit the ‘Print’ button on the original ‘Print’ pop-up  window.The initial PDFCreator pop-up will appear. Select the 'Options' button:



  1. You’ll now be presented with the PDFCreator options where you can select the screen resolution and  colouration on the final image. Use 300 dpi and Grayscale:





  1. Finally, ensure you select the ‘PNG’ file type when saving the image file that is created:





  1. If all goes well, you should end up with a nice, high resolution graphic that will be exactly what you need for your survey project or management software (Note: this was trimmed with Paint to remove extra white-space that wasn't required):




Converting a DWG  File


Now we’ll take a look at converting a DWG file. Here’s a step-by-step guide:


  1. Open the DWG file using the TrueView  viewer. Before we create our image file, you might like to experiment with turning of some layers that are  perhaps showing extraneous information on the floor plan






  1. Once you have made any required updates to layer visibility, hit the ‘Plot’ icon at the top of the panel (‘Plot’ is the equivalent to ‘Print’ in this software):





  1. In the ‘Plot’ pop-up that appears, select ‘PDFCreator’ as the printer, select a large paper size for good resolution of your final image. As with the PDF conversion, you may need to experiment with the paper size, which will vary depending on the detail in the plan that you are converting. The more detailed the plan, the larger the paper size you should select to obtain the detail you will require for your survey project or management software.

    Ensure that you select the Fit to Paper’ option:




  1. Hit the ‘OK’ button and then view the PDFCreator pop-up. Simply select the  ‘Options’ button in this window:





  1. In the PDFCreator options pop-up, select the PNG file type and set the resolution to 300dpi and colouration to grayscale:



  1. Finally, ensure you select the ‘PNG’ file type when saving the image file that is created:





Conclusion


In this article we have looked at why we might need to convert image file formats when we need to import floor plans into a wireless survey tool or network management tool.


We looked at two of the most common file types that are often supplied when electronic floor plans have been requested: DWG or PDF files. Both file types may be viewed with freely available software packages, but they may have limitations when exporting floor plan images into usable formats for survey and management tools.

Finally, we looked at a step-by-step guide of how to convert both DWG and PDF files into a commonly supported graphic file format: PNG. We also converted the image into a grayscale image to facilitate ease of use when overlaying information on the plan (e.g. network components such as APs, and RF heatmaps).