SketchUp and GIS software ; An interoperable work flow for generating elevation data

Data creation is often the only way for researchers to produce basic geospatial information for the pursuit of more complex tasks and procedures such as those that lead to the production of new data for studies concerning river basins, slope morphodynamics, applied geomorphology and geology, urban and territorial planning, detailed studies, for example, in architecture and civil engineering, among others. This exercise results from a reflection where specific data processing tasks executed in Google Sketchup (Pro version, 2018) can be used in a context of interoperability with Geographical Information Systems (GIS) software. The focus is based on the production of contour lines and Digital Elevation Models (DEM) using an innovative sequence of tasks and procedures in both environments (GS and GIS). It starts in Google Sketchup (GS) graphic interface, with the selection of a satellite image referring to the study area – which can be anywhere on Earth's surface; subsequent processing steps lead to the production of elevation data at the selected scale and equidistance. This new data must be exported to GIS software in vector formats such as Autodesk Design Web format – DWG or Autodesk Drawing Exchange format – DXF. In this essay the option for the use of GIS Open Source Software (gvSIG and QGIS) was made. Correcting the original SHP by removing "data noise" that resulted from DXF file conversion permits the author to create new clean vector data in SHP format and, at a later stage, generate DEM data. This means that new elevation data becomes available, using simple but intuitive and interoperable procedures and techniques which confgures a costless work flow.


Introduction
Geomorphometry is generally understood as a sub-branch of Geomorphology, whose object is related to the analysis and comparison of quantitative parameters (descriptive measuresattributes) related to the relief forms (objects) of the terrestrial surface.As referred by Hengl & MacMillan (2009, apud Silveira & Silveira, 2015) [1], DEM documents are widely used for providing continuous covering for large areas at a relative low cost.This automated digital computing provides measurements of surface shapes, context, patterns and texture, that can be used as substitutes for the criteria considered in image or aerial photo interpretation.In the same work, the main argument for its use is the variety of procedures associated with measurements, dimensions and objects that can be derived by automated analysis of elevation data, applied to natural landscape mapping and modeling.This analysis permits the consistent extraction of several parameters or objects that can be considered as direct analogues of the criteria used by the manual interpreter to identify and delineate objects applied to several studies such as Hydrology, Pedology, Ecology, Geomorphology and Geology.
It is quite simple to identify and select for work some examples of standalone context tools (eg Arc2Earth, CoutouringGE, among others) that help us to extract elevation data directly from Google Earth.However, not all of them are available for free, not all are up-to-date or not all offer the required accuracy and precision, or the required interoperability.This exercise reveals an original work flow that permits the production of contour lines related to any area of the globe (with the selected equidistance), by the implementation of specific tasks performed in a software suite that includes Google SketchUp (GS) from which it becomes possible to export data in vector formats, namely DWG and DXF, and GIS software.From the moment the elevation data already converted to SHP format (open standard) enters the GIS environment some specific procedures must be carried out in order to correct errors and reduce uncertainty.In a later stage, it becomes possible to derive 3D information based on the production of a DEM.Depending on the user's objectives, the exercise could be completed and stopped at this stage, but he can also proceed and follow other directions, for example, the construction of derived raster maps (slope, slope exposure, contours, among others).Finally, it becomes also possible to produce new derived vector maps (SHP format) with elevation data in which the selected equidistance may be different from that initially used in the GS environment.

Terms and concepts
According to Hirt (2016) [2], the term "DEM" (an acronym for Digital Elevation Model), is often used as a generic term for Digital Surface Model (DSM) and Digital Terrain Model (DTM) 1 .In fact, some definitions do not seem to distinguish the terms DEM and DSM, and it is also common to find some others that equals the terms DEM and DTM (Podobnikar, 2008) [3], or consider DEM as subset of DTM that represents other morphological elements (Li et al., 2005) [4].Other definitions can be found such as the one proposed by the USGS in the Glossary of the Landslide Hazard Program, (http://landslides.usgs.gov/learning/glossary.php) [5], which defines "DEM" as a regularly spaced GRID and "DTM" as a three-dimensional model (Triangulated Irregular Network -TIN).The DEM can be represented as a raster (a grid of squares, also known as a height map when representing elevation) or a vector-based TIN.In this case, TIN datasets are also referred to as a primary (measured) DEM, whereas the Raster DEM is referred to as a secondary (computed) DEM (Toppe, R., 1987) [6].Other literature Li et al. (2005) [4] considers that DEM data could be acquired through techniques such as photogrammetry, lidar, ifSAR, land surveying, among others.In general terms, DEM is often used in GIS and is the most common basis for digital relief maps.
Although the DSM may be useful for landscape modeling, city modeling and visualization applications, the DTM is often required for flood or drainage modeling, land-use studies (Balenovic et al., 2015) [7], geology and other applications (UK Environment Agency, 2005) [8].According to Al-husban (2017) [9], DEM is a computerized representation of Earth relief, and is used in many applications such as Geosciences and Geostudies but also, in Architecture, Civil Engineering, and 1 It should be stressed that most of the data providers like the United States Geological Survey (USGS), National Aeronautics and Space Administration (NASA), and European Space Agency (ESA), use the generic term "DEM".Instead, the Japan Aerospace Exploration Agency (JAXA) refers to ALOS World 3d, a 30-meter spatial resolution digital surface model, as a DSM.Although, the datasets captured with satellites, airplanes or other flying platforms, like Shuttle Radar Topography Mission (SRTM) and Advanced Spaceborne Thermal Emission and Reflection Radiometer -Global Digital Elevation Model (ASTER-GDEM), are originally considered as DSM data documents.The term DTM is often mentioned when it only includes surface data, it means that it does not take into account surface features like trees and buildings.It can thus be assumed that, in general terms, we should refer to DEM as a representation of the elevation of the Earth's surface above a certain datum, to DTM if the data represents the elevation of the surface with its features, and to DSM when the DEM includes the elevation of the terrain plus the natural and man-made features.all issues related to urban studies, land use and territorial planning.In this following, along with the present document, DEM will be used as a generic term for both DSM and DTM data documents.
One of the most common challenges that researchers and practitioners dealing with geospatial data are facing is data collection.As referred by Nelson et Al.(2009, apud Silveira and Silveira, 2015) [9], there are three main sources of data for the construction of a DEM: a) Field survey techniques, from the acquisition of precise points of latitude, longitude and elevation (x, y, z); b) Topographic maps, from the derivation of contour lines, drainage, lakes and points of elevation; c) Remote sensing, from the interpretation of aerial photographs or images acquired from satellites 2 , especially for photogrammetry (stereoscopic methods), radars and, more recently, laser surveys.
The production of MDT data usually derives from line vector files that gather elevation data but it is also common to construct MDT files using interpolation processes executed on the basis of a cloud of points.In the year 2000, SRTM mission collected data over most of the land surface positioned between 60º N and 54º S (about 80% of all land on Earth) and allowed to generate a complete base of terrestrial digital topographic maps of high resolution, freely available now in two resolutions: 90 m and 30 m.In this case, the derivation of MDT data in GIS environment, with or without 3d visualization, obliges that the work must be done with raster files and in a later stage to convert them for vector formats.Nasa Jet Propulsion Laboratory website (https://asterweb.jpl.nasa.gov/gdem.asp,accessed on February, 17th) informs about the origins of ASTER GDEM mission stating that "The Ministry of Economy, Trade and Industry (METI) of Japan and the United States National Aeronautics and Space Administration (NASA) jointly announced the release of the Advanced Spaceborne Thermal Emission and Reflection Radiometer (ASTER) Global Digital Elevation Model Version 2 (GDEM V2) 3 in October 17, 2011.ASTER GDEM coverage spans from 83º N to 83º S, encompassing 99% of the mass of the Earth.This represents another excellent geodata provider for spatial researches once it is generally accepted the idea that DEM data is often a very useful tool for landscape analysis.
Taking in line the considerable number of methodological options that allow the production of elevation data which will always depend on the available data, the access to it, as well as on the objectives of the user, especially in terms of application, the main purpose of this study 4 is in the presentation of an interoperable methodology which is based on a set of applications that performs specif tasks leading to the derivation of MDT in any area of the globe, from the selection of a satellite image acquired and processed in GS software and geoprocessed in GIS environments.

Materials and Methods
This exercise requires the articulation between practices and tasks carried out in a two step process (two stages): Stage A) Google Sketchup environment and Stage B) GIS environment.
following commands "File> Geo-location> add location" allows us to select the study area and the image to work and prepare it for the extraction of elevation data based on contour lines.In this essay the study area is located in the Central Region of Portugal (Figure 1), concretely, it is an area of the mountainous massif of the Serra da Estrela in which stands out the presence of a glacier valley -Glacier Valley of the River Zêzere.The command File> Geo-location> Show terrain, show us a 3D image (Figure 2a) and the use of tools "Orbit" and "Zoom" helps us to identify the volumes and the topography associated with the selected image.In order to extract ielevation data from this satellite image it is necessary to draw a rectangle whose area completely involves the image to be selected (Figure 2b).The functionalities of the "show terrain" tool returns to 3D visualization of the orthoimage that we will now have to overlap the tangential to the base of the rectangle (Figure 2c) 5 .

Box model and contour lines generation
In conceptual terms, the aim of this process is to create a "box module" with a layer-based architecture that, in its set, will intersect the orthoimage (Figure 2a).The first procedural task to generate the cutting layers consists on the use of the "Show Terrain" command, which allows us to view the orthoimage in a 3D perspective and informs about the altitude of the plans.By using the "Move" tool we have to create an over-raised copy of a rectangle (Figure 2b) whose area must completely involve the orthoimage.To raise this copy (new layer) that will have to be replicated as often as necessary in order to fill the "box module", it is crucial to identify the execution status.For this purpose, the operator must verify if the cursor has a crosshair shape, and confirm if there is a graphic return defined by a "+" sign which must be accompanied by the information "on blue axis" (Z).The rectangle should be positioned tangentially to the lowest point of the orthoimage (Figure 2c), while in the lower right corner of the GS graphical interface, in "Distance / Lenght" it must be typed the distance (in meters) to which the new copy of the rectangle will be positioned above the original; that is, in practice, we are defining the equidistance value for the layers to be generated.
5 At this stage it is important to identify the altitude of the lowest point of the orthoimage, and record its value.Google Earth was used to capture this basic information.On the other hand, the rectangle must be strictly tangent to the orthoimage in the contact with the base where its lowest point is located; it is not easy to execute this command in an absolutely strict way and, as such, already in the GIS environment, it will be necessary to resort to techniques of correction of deviations and inaccuracies of the elevation data, which are translated by the production of negative values of altitude that are going to be loaded to the vector file when exporting from the GS.
The iteration of this procedure, by typing "40x", or "50x", or more, until the orthoimage is completely covered by the replicates of the rectangle leads to the generation of a volumetric layerbased module (Figure 2d).After ensuring the uniqueness of this polyhedron through the "Make Group" command, with the "Move" tool selected, the sequence "Intersect faces> With Model" must be carried out.When removing the geometric model in order to permit the orthoimage to be seen, we verified that the contour lines corresponding to the altitude layers intersected by the model were recorded on the satellite image (Figure 3a).After deleting the geometric model by following the Window> Default Tray> Layers path and, deactivating the "Location Terrain" and "Location snapshot" layers, we obtain the 3D image of the generated contours (Figure 3b).To view this elevation data in the orthoprojection mode, we must select the commands View> Toolbars> Views> Top path (Figure 4).The sequence of procedures and tasks performed in GS environment produced a set of elevation data and features that can be stored in vector formats which can be loaded in GIS software.Considering that GS does not allow to export data in SHP format, other options such as the DXF format are suitable because it can be loaded in GIS software and later converted to a first generation SHP, so-called because it involves raw data containing topographic, hypsometric and topological errors which need to be corrected or even removed from the SHP.

GIS environment-gvSIG and QGIS
The export of the vector data produced in the previous stage, in the GS environment, carries a lot of uncertainty and data noise, consequently, error as it was previously mentioned.It is therefore necessary to use a sequence of tasks and procedures for SHP correction.This geoprocessing stage was accomplished by using gvSIG and QGIS software (Free and Open Source Software).Once the conversion of the DXF file to SHP format has been performed, the observation and analysis of the SHP attribute table confronts us with the existence of four types of data that require attention: 1. Data exported among with the contour lines, which have to be removed (Figure 5). 2. Adjacent entities within the same layer to merge together.Once the attribute containing the elevation data has been identified and selected by creating an appropriate query filter, the result is converted to SHP format.Each contour line must be represented by only one segment; however, an architecture defined by more than one feature resulted from the export process, which forces the use of the merge tool applied to the adjacent entities within the same layer to merge together.Figure 6 reveals the number of features before and after the execution of the algorithm "merge adj lines", available in the tool set for "Line Layers" (gvSIG sextant module).To perform this task, the wizard configuration does not accept more than one feature per contour line, so the "Options-Tolerance" field must be filled with the value "0", but the software replaces it immediately with the scientific notation "1.0E-4".3. Negative elevation records, which are unreal regarding the geomorphology of the study area -it is a mountain area-, that require proper correction; the procedural significance of these records is associated to the positional adjustment of the rectangle (the first elevation layer) used for replicating in GS, in relation to the base level identified in the orthoimage.The correction of these data is carried out with the creation of a new field that is populated automatically using the Field Calculator tool.This can be seen as a two-step process that begins with the SUM of the original elevation records listed on the SHP attribute table, and the modular value of the smallest negative elevation record -which reflects the vertical shift of the rectangle to the base of the orthoimage.4. Positive elevation records that represent the difference between the real and the lower elevation record of the orthoimage; to obtain the correct elevation data, in this attribute field, it is necessary to SUM the identified "lowest point value" with the ones obtained from the theoretical "zero level" which represent the reference to distinguish between positive and negative records, in other words, that are visible or invisible in the orthoimage.This second SUM can be realized in the field created in the task referred in 3), but the user can choose to create a new field using the Field Calculator, and to fulfil it with data resulting from the SUM of the records obtained in the process earlier described, with the minimum value of the real elevation identified and captured from Google Earth.However, the problem related to inaccurate altimetric records generated in GS still is not solved.It is necessary to find a solution to obtain equidistant multiple values of 10m.There are some adequate procedures that can be performed in raster data model and DEM generation techniques.The use of the "rasterize vector layer" algorithm available on the "Rasterization and Interpolation" Sextant toolset, leads to generate a DEM using the contour line data as input (Figure 7).The resulting empty cells present in the DEM require the use of the "Fill" tool available in the "basic tools for raster layers" toolset of Sextant (Figure 8).The generation of new vector contour lines (Figure 9), with the selected equidistance and records which are multiples of 10m, can be processed using the "Vectorise raster layers" algorithm available in the "Vectorization" toolset of Sextant.

Results
In previous stages of this work we have presented and described the main steps and the methodological procedures leading to the creation of a vector document in SHP format; and the techniques and the algorithms used to eliminate noise from input data in the GIS software, which had resulted from the conversion of data in DXF format to SHP, were also revealed.This methodological essay aimed at demonstrating that the combination of these techniques in a context of interoperability of data formats and software, makes it possible to derive new data that can serve as a new basis for more complex works.An example of it can be seen in Figure 10, which displays the result of the overlapping of contour lines in vector data model with the DEM rendered with hillshade effect (shaded relief).The user now has at his disposal derived elevation data, with desired detail and scale, which can serve as a basis for deriving new data, such as slope and slope exposure maps, and perform calculations to other complementary studies, such as the generation of river networks, basins and watersheds, stream order and other hydrologic data.The visual comparison between the DEM derived from the GS-GIS performed in QGIS software (Figure 11A) and another DEM document built on the basis of the line vector files derived from the Portuguese Military Maps, sheets 213 and 224, 1:25000 (Figure 11B) reveals striking similarities.Attention is drawn to the high visual cartographic similitudes shown in both cases and this perception is stressed with the statistical data when a comparison between both raster histograms is made.These results encourage the development of new studies that allow us to evaluate the degree of reliability of the data obtained, as well as to test, validate and improve the model presented in this methodological essay.

Discussion
The lack, scarcity, high cost or simply conditioned access to geospatial data constitute barriers to research (academic and scientific) which sometimes can be overcome by the researchers themselves.Using autonomous strategies, one can produce basic data suitable for a subsequent integration into thematic complex work, and dispense themselves from the obligation to have recourse to institutional sources that do not always guarantee free and open access to geospatial data.As can be seen from the close-up of the figures presented, namely from Figures 10 and 11 which show the final results obtained, the methodology tested consists of a set of interoperable procedures that allows to obtain new data on the altimetry of any globe region.
From the beginning of this methodological essay it was assumed that the main goal of this exercise was to provide alternative solutions, quick and virtually free of charge, for the generation of geospatial information using an interoperable combination of software.The use of this suite of applications involving Google Earth, Google Sketchup and GIS free and open source software (FOSS), namely, gvSIG and QGIS, conduced to the generation of vector and raster files containing elevation data with scale and equidistance selected by the operator.Once the required correcting tasks were performed in order to remove data noise resulting from the GS-GIS export process, the SHP data thus obtained can be integrated in researches under the most varied fields of knowledge and applications such as Hydrology, Geomorphology, Urban Planning, among others.Future works will discuss this methodology in the perspective of model validation based on the use of statistical methods and the comparison of the results obtained from various techniques used for the construction of DEM data.

Conclusion
A considerable number of sciences requires the use of basic altimetric data for the characterization of the physical support of human activities, from the detailed urban studies to those involving tasks and activities related to land use and territory planning and management.
The implementation of a suite of interoperable solutions that allow the use of GIS software to match with other applications that render vector or raster information as, in this case, Google Sketchup, reflexes the creation of new elevation data which after undergoing processes such as error correction, uncertainty reducing and cartographic noise removal, shall be available to derive new data, with the guarantee of preservation of its integrity and reliability, so that it can integrate new chains of procedures related to various studies applied to diverse areas of Science and its applications, social and/or natural.
The generation of contour lines and DEM data are examples of a creative low cost process, the importance of which is recognized in several domains of its application.The exercise here presented is intended only as an example of expedited solutions which, based on an articulated procedural sequence, ensures a methodological work flow for the production of basic data that allows researchers to overcome barriers placed at initial stages of most of the works, and that invariably begins with the formulation of problems and equations for which they will have to find answers."I do not have data -and now, what do I do?"This conception, which is sometimes more a matter of attitude than a real dilemma or a real problem, can cease to be an obstacle and have a deterrent effect on researchers decision-making process at crucial moments in the research process, if we think that the creation of geospatial data, with the required prudence, can be assured and performed by researchers and non professional users.This is a singular perspective of the Volunteered Geographic Information paradigm, where data users can be also data producers and providers.

Figure 1 .
Figure 1.The mountainous massif of the Serra da Estrela, Central Region of Portugal (image obtained from Google Earth, on the left); Selection of the satellite image to be rendered in GS environment (on the center).

Figure 2 .
Figure 2. Initial processing stage for the recording of contour lines in GS environment.

PreprintsFigure 5 .
Figure 5. Resulting DXF file, from the export process from GS to the gvSIG.

PreprintsFigure 6 .
Figure 6.Data resulting from the DXF -SHP conversion process, before and after the correction of the attribute values by running the merge of adjacent line features algorythm in gvSIG.

Figure 9 .
Figure 9. Contour lines (in vector format and with records multiples of 10m), processed with the "Vectorise" algorithm (Sextant module).

Figure 11 .
Figure 11.DEM derived from GS-GIS conversion process and raster histogram for a sample of the study area (A), performed in QGIS software.DEM derived from line features, sheets 213 and 224 of the Portuguese Military Map, 1/25000 (B).