Import Data

This page provides an overview (and some detailed explanation) of possible data import pathways.

Formats

Our source material could come from anywhere and be in any format. Our task, at this point, is to turn it into a set of SketchUp features.

CAD Model

If the input data is an architectural CAD model, our main tasks will be simplification and format transformation. The information is in vector format, with accurate dimensions and lots of metadata, but there's far more information than we can use. Also, getting a CAD model into SketchUp could be challenging.

If the CAD system is available, the simplest approach may be to export a document from it in a format that SketchUp understands.

OSM Data

OpenStreetMap data is stored as XML, but (typically) rendered as SVG. In any case, there are many possible ways to filter and transform this data on its way to SketchUp.

My current notion is to use XSLT to generate some sort of image or textual data file (possibly Ruby code!).

Raster Image

If the input data is a raster image (e.g., a floor plan intended for the general public), the initial task will be vectorization, followed (perhaps) by enhancement.

Examples

GDC Floor Plans

In the initial Utiles project, I was given a set of JPEG images. Each image was a simplified floor plan of the Gates Dell Complex (GDC), a two-tower, multi-story building at UT Austin. After preprocessing the images, I was able to trace the walls using the SketchUp Line tool.

I'm using a shell-like pseudocode below, but the instructions must be followed manually. Although it's possible to do this work in a single directory, I find it less confusing (and safer!) to create and use a new directory for each stage of the process.

Note: I use GraphicConverter and SketchUp on Mac OS X. With any other applications or operating system, YMMV!

Preprocess

GraphicConverter, which began as a file format translator, offers a variety of interactive image manipulation tools. In order to trace the floor plan images more easily, I use GraphicConverter to lighten the color of the walls:

  • open sample.jpg in GraphicConverter
  • change black to medium gray
  • save as sample_g.jpg

Import Image

SketchUp can import images in a variety of formats. The format I received (JPEG) isn't ideal, being both lossy and raster-based. However, SketchUp is well suited to dealing with this sort of thing.

  • open MPT.jpg
  • save as sample_o.skp
  • drag in the image file
  • place and scale as appropriate
  • save sample_o.skp

Trace Walls

Although the floor plan images look like they contain lines, all they really contain are colored pixels. So, we need to trace over the walls, producing SketchUp's (vector-based) lines.

  • using the Pencil tool, trace features (e.g., walls); save
  • select and delete the image
  • make all but the lines invisible
  • select all; Menu Bar > Edit > Make Group
  • in Entity Info, set the group's layer to Lines
  • save sample_o.skp

Add Features

The GDC floor plans did not provide details on some types of rooms (e.g., meeting rooms, offices) which a student might need to visit. There were also some amenities (e.g., drinking fountains, patios, seating areas) that I felt would make the maps more useful.

So, based on some independent descriptions and measurements, I added features for these items. The locations for some of these (e.g, doorways) tend to be fairly accurate, but others (e.g., interior walls) may be based on pure speculation. Fortunately, the tile only needs to get the user to the room in question; once there, the wall placement can be determined as needed.


This wiki page is maintained by Rich Morin, an independent consultant specializing in software design, development, and documentation. Please feel free to email comments, inquiries, suggestions, etc!

Topic revision: r9 - 28 Nov 2015, RichMorin
This site is powered by Foswiki Copyright © by the contributing authors. All material on this wiki is the property of the contributing authors.
Foswiki version v2.1.6, Release Foswiki-2.1.6, Plugin API version 2.4
Ideas, requests, problems regarding CFCL Wiki? Send us email