{"word_count": 888, "character_count": 5728}
3. Loading your data into SketchUp¶Once you have installed t4su, click on File&#62;Import.... As you click on the available file types, you can notice that several new types of imports are available :You can import geometries : ASCII Gridfile types (*.asc) Solene output files (*.cir) WellKnownText (*.wkt) / Comma-Separated Values (*.csv) Geography Markup Language (*.gml) / Exentible Markup Language(*.xml)  Mesh Files produced by Gmsh (*.msh) Shapefiles (*.shp)Once you’ve selected your file and clicked import, a first window will inform you of the number of geometries found. A second window will then appear: this is the Bounding Box.The X, Y and Z values correspond to the minimum and maximum coordinates of the geometry. By leaving the default values, the geometry is re-positioned by taking the lower-left corner of the imported geometry and setting it at the lower-left corner of the Sketchup local coordinate system.3.1. Importing CSV Files¶“Comma-Seperated Value” files store tabular data in the form of a plain text file. These files are very  common in GIS, partly because they can be combined with the Well-Known Text format, which translate geometries into text. Here’s an example of a CSV file opened in Qgis :To import csv/wkt files :Open the file with a traditional GIS software. If need be, refine your selected area, then save your selection as csv.[caption id="" align="alignnone" width="616"] Saving a CSV file.[/caption]Chose the following Save Options :CREATE_CSVT: NOGEOMETRY: AS_WKTLINEFORMAT: DefaultSEPARATOR: SEMICOLONWRITE_BOM: NOOpen your new CSV file in a text editor. In a regular csv file, your first few lines should resemble something like this :[caption id="" align="alignnone" width="616"] Original QGIS export file[/caption]SketchUp needs to know the type of each attribute to properly read csv files, so replace the first line from this :WKT;id;elevationto this :# the_geom:Polygon; id:int; elevation:floatOf course, Polygon should be replaced accordingly by Linestring or Point. You may also have other attributes other than these basic ones, including boolean and string types.Delete the “” at the start and end of each line. The fastest way to do this is by clicking Edit &#62; Replace, entering ” in the find line and leaving the replace by line empty, and clicking Replace All.[caption id="" align="alignnone" width="616"] Modified SketchUp import file.[/caption]You can then import you file into SketchUp.Let’s change it up a bit by calculating the sky view factor on the sampled bounding box :[caption id="" align="alignnone" width="616"] Sky View Factor on Sampled Bounding Box.[/caption]Now that we’ve found what we’re looking for, how can we import this file back to our standard cartography software?To export CSV files:Click on t4su &#62; New I/O &#62; CsvWktWriter. The following command box will appear :[caption id="" align="alignnone" width="569"] CsvWktWriter Command Box.[/caption]You can choose to import all (*) or a single Layer at a time. In our example, we’re just interested in our new bounding box. You will also need to supply the geometry type to correctly instantiate the WKT portion of the csv file. In this example, we’re just going to export our bounding box as the oether geometry layer hasn’t been modified.If you’ve decided to import all your layers (*), you can choose create a single document for all your geometries. Be warned though, this will not work if you have conflicting geometry types : a single csv file cannot contain more than one geometry type. Here’s what our exported bounding box looks like :[caption id="" align="alignnone" width="616"] Original Sketchup Output File.[/caption]Once again, you’ll have to change the first line of your new CSV file : remove the attribute types and replace #the_geom:GEOMETRY by WKT so as to mimic the original file.[caption id="" align="alignnone" width="616"] Modified Qgis Input File.[/caption]If your file is part of a larger map, select yes at Back to world coordinates. This will reset the geometries to their original geographic location. This way, any geometries or features we have added on SketchUp can be found again at the correct location and coordinate system when re-exporting to a tradition GIS system. To view the Sky Viw Factor in Qgis, right-click on the layer name &#62; Properties &#62; Style &#62; Categorized &#62; svf &#62; classify.[caption id="" align="alignnone" width="616"] Bounding Box with Sky View Factor viewed in QGIS.[/caption]My thanks to Houda Belgacem for letting me use her geometry file and for her help with .csv file conversion.3.2. Importing Solene Files¶.cir files are Solene’s geometry files. Solene is T4su’s standalone counterpart, so switching from one software to another is pretty straightforward in this case.Skp2Solene export.pngExporting a Layer to SoleneYou can only import one layer at a time, so make sure everything you need is in the correct one. You can further choose to keep your geometries in a local coordinate system, or use the coordinate system used during the original file import. Solene also uses local coordinates, so choose no unless you’re planning on exporting your Solene file back into real world coordinates further on. You can also choose whether or not to have a unique output file if you’re importing several layers at a time. Unlike other I/O options, this command box does not ask the geometry type because Solene only uses faces.[caption id="" align="alignnone" width="569"] Solene Export Command Box.[/caption]Once you hit OK, choose your export path and file name to finalize the .cir file creation. Once in Solene, create a new project, then click on the icon with the red box, file and arrow to import your .cir file.