├── .gitattributes
├── .gitignore
├── BuildingLocator
└── BuildingLocator.exe
├── Documentation_v3.html
├── Documentation_v3.md
├── Documentation_v3_Deu.md
├── IfcGeoRefChecker
├── IfcGeoRefChecker_v3
│ ├── IFCGeoRefCheckerCommand
│ │ ├── App.config
│ │ ├── IFCGeoRefCheckerCommand.csproj
│ │ ├── Program.cs
│ │ ├── Properties
│ │ │ ├── AssemblyInfo.cs
│ │ │ ├── Resources.Designer.cs
│ │ │ ├── Resources.resx
│ │ │ ├── Settings.Designer.cs
│ │ │ └── Settings.settings
│ │ └── packages.config
│ ├── IfcGeoRefChecker_GUI
│ │ ├── App.config
│ │ ├── App.xaml
│ │ ├── App.xaml.cs
│ │ ├── Compare.xaml
│ │ ├── Compare.xaml.cs
│ │ ├── Export2IFC.xaml
│ │ ├── Export2IFC.xaml.cs
│ │ ├── IfcGeoRefChecker_GUI.csproj
│ │ ├── Info.xaml
│ │ ├── Info.xaml.cs
│ │ ├── MainWindow.xaml
│ │ ├── MainWindow.xaml.cs
│ │ ├── Properties
│ │ │ ├── AssemblyInfo.cs
│ │ │ ├── Resources.Designer.cs
│ │ │ ├── Resources.resx
│ │ │ ├── Settings.Designer.cs
│ │ │ └── Settings.settings
│ │ ├── Resources
│ │ │ ├── Documentation_v3.html
│ │ │ └── Quick_Guide.html
│ │ ├── Results.xaml
│ │ ├── Results.xaml.cs
│ │ ├── UpdateMan.xaml
│ │ ├── UpdateMan.xaml.cs
│ │ ├── icon_ico.ico
│ │ ├── img
│ │ │ ├── DD-BIM-LOGO.png
│ │ │ └── icon_img.png
│ │ └── packages.config
│ ├── IfcGeoRefChecker_v3.sln
│ └── IfcGeoRefChecker_v3
│ │ ├── App.config
│ │ ├── App.xaml
│ │ ├── App.xaml.cs
│ │ ├── Appl
│ │ ├── BldgContourCalculator.cs
│ │ ├── Calc.cs
│ │ ├── Calculations.cs
│ │ ├── GeoRefChecker.cs
│ │ ├── GeoRefComparer.cs
│ │ ├── Level10.cs
│ │ ├── Level20.cs
│ │ ├── Level30.cs
│ │ ├── Level40.cs
│ │ ├── Level50.cs
│ │ └── PlacementXYZ.cs
│ │ ├── BimGisCad.dll
│ │ ├── Geographic.dll
│ │ ├── IO
│ │ ├── IfcImport.cs
│ │ ├── IfcReader.cs
│ │ ├── IfcWriter.cs
│ │ ├── InputGroup.cs
│ │ ├── JsonInput.cs
│ │ ├── JsonOutput.cs
│ │ └── LogOutput.cs
│ │ ├── IfcGeoRefChecker_v3.csproj
│ │ ├── IfcGeometryExtractor.dll
│ │ ├── MIConvexHull.xml
│ │ ├── NETGeographic.dll
│ │ ├── Properties
│ │ ├── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ ├── Resources.resx
│ │ ├── Settings.Designer.cs
│ │ └── Settings.settings
│ │ ├── egm2008.egm
│ │ ├── egm2008.egm.cof
│ │ ├── icon_ico.ico
│ │ ├── img
│ │ └── DD-BIM-LOGO.png
│ │ └── packages.config
└── icon_ico.ico
├── LICENSE
├── Quick_Guide.html
├── Quick_Guide.md
├── README.md
├── README_Deu.md
├── README_old.md
└── pic
├── BMWi_4C_Gef_en.jpg
├── DD-BIM-LOGO.png
├── GeoRefChecker_GUI_1.png
├── GeoRefChecker_GUI_1_v3.png
├── GeoRefChecker_GUI_2.png
├── GeoRefChecker_GUI_2_v3.png
├── GeoRefChecker_Locator.png
├── GeoRefComparer_GUI1.png
├── GeoRefUpdater_GUI1_v3.png
├── GeoRefUpdater_GUI3_v3.png
├── GeoRefUpdater_GUI4_v3.png
├── icon_georef10.png
├── icon_georef20.png
├── icon_georef30.png
├── icon_georef40.png
├── icon_georef50.png
├── icon_img.png
├── ifc_georef10.png
├── ifc_georef20.png
├── ifc_georef30.png
├── ifc_georef40.png
├── ifc_georef50.png
├── logeoref10.png
├── logeoref20.png
├── logeoref30.png
├── logeoref40.png
├── logeoref50.png
└── logo_htwdd.jpg
/.gitattributes:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Set default behavior to automatically normalize line endings.
3 | ###############################################################################
4 | * text=auto
5 |
6 | ###############################################################################
7 | # Set default behavior for command prompt diff.
8 | #
9 | # This is need for earlier builds of msysgit that does not have it on by
10 | # default for csharp files.
11 | # Note: This is only used by command line
12 | ###############################################################################
13 | #*.cs diff=csharp
14 |
15 | ###############################################################################
16 | # Set the merge driver for project and solution files
17 | #
18 | # Merging from the command prompt will add diff markers to the files if there
19 | # are conflicts (Merging from VS is not affected by the settings below, in VS
20 | # the diff markers are never inserted). Diff markers may cause the following
21 | # file extensions to fail to load in VS. An alternative would be to treat
22 | # these files as binary and thus will always conflict and require user
23 | # intervention with every merge. To do so, just uncomment the entries below
24 | ###############################################################################
25 | #*.sln merge=binary
26 | #*.csproj merge=binary
27 | #*.vbproj merge=binary
28 | #*.vcxproj merge=binary
29 | #*.vcproj merge=binary
30 | #*.dbproj merge=binary
31 | #*.fsproj merge=binary
32 | #*.lsproj merge=binary
33 | #*.wixproj merge=binary
34 | #*.modelproj merge=binary
35 | #*.sqlproj merge=binary
36 | #*.wwaproj merge=binary
37 |
38 | ###############################################################################
39 | # behavior for image files
40 | #
41 | # image files are treated as binary by default.
42 | ###############################################################################
43 | #*.jpg binary
44 | #*.png binary
45 | #*.gif binary
46 |
47 | ###############################################################################
48 | # diff behavior for common document formats
49 | #
50 | # Convert binary document formats to text before diffing them. This feature
51 | # is only available from the command line. Turn it on by uncommenting the
52 | # entries below.
53 | ###############################################################################
54 | #*.doc diff=astextplain
55 | #*.DOC diff=astextplain
56 | #*.docx diff=astextplain
57 | #*.DOCX diff=astextplain
58 | #*.dot diff=astextplain
59 | #*.DOT diff=astextplain
60 | #*.pdf diff=astextplain
61 | #*.PDF diff=astextplain
62 | #*.rtf diff=astextplain
63 | #*.RTF diff=astextplain
64 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 |
4 | # User-specific files
5 | *.suo
6 | *.user
7 | *.userosscache
8 | *.sln.docstates
9 |
10 | # User-specific files (MonoDevelop/Xamarin Studio)
11 | *.userprefs
12 |
13 | # Build results
14 | [Dd]ebug/
15 | [Dd]ebugPublic/
16 | [Rr]elease/
17 | [Rr]eleases/
18 | x64/
19 | x86/
20 | bld/
21 | [Bb]in/
22 | [Oo]bj/
23 | [Ll]og/
24 |
25 | # Visual Studio 2015 cache/options directory
26 | .vs/
27 | # Uncomment if you have tasks that create the project's static files in wwwroot
28 | #wwwroot/
29 |
30 | # MSTest test Results
31 | [Tt]est[Rr]esult*/
32 | [Bb]uild[Ll]og.*
33 |
34 | # NUNIT
35 | *.VisualState.xml
36 | TestResult.xml
37 |
38 | # Build Results of an ATL Project
39 | [Dd]ebugPS/
40 | [Rr]eleasePS/
41 | dlldata.c
42 |
43 | # DNX
44 | project.lock.json
45 | project.fragment.lock.json
46 | artifacts/
47 |
48 | *_i.c
49 | *_p.c
50 | *_i.h
51 | *.ilk
52 | *.meta
53 | *.obj
54 | *.pch
55 | *.pdb
56 | *.pgc
57 | *.pgd
58 | *.rsp
59 | *.sbr
60 | *.tlb
61 | *.tli
62 | *.tlh
63 | *.tmp
64 | *.tmp_proj
65 | *.log
66 | *.vspscc
67 | *.vssscc
68 | .builds
69 | *.pidb
70 | *.svclog
71 | *.scc
72 |
73 | # Chutzpah Test files
74 | _Chutzpah*
75 |
76 | # Visual C++ cache files
77 | ipch/
78 | *.aps
79 | *.ncb
80 | *.opendb
81 | *.opensdf
82 | *.sdf
83 | *.cachefile
84 | *.VC.db
85 | *.VC.VC.opendb
86 |
87 | # Visual Studio profiler
88 | *.psess
89 | *.vsp
90 | *.vspx
91 | *.sap
92 |
93 | # TFS 2012 Local Workspace
94 | $tf/
95 |
96 | # Guidance Automation Toolkit
97 | *.gpState
98 |
99 | # ReSharper is a .NET coding add-in
100 | _ReSharper*/
101 | *.[Rr]e[Ss]harper
102 | *.DotSettings.user
103 |
104 | # JustCode is a .NET coding add-in
105 | .JustCode
106 |
107 | # TeamCity is a build add-in
108 | _TeamCity*
109 |
110 | # DotCover is a Code Coverage Tool
111 | *.dotCover
112 |
113 | # NCrunch
114 | _NCrunch_*
115 | .*crunch*.local.xml
116 | nCrunchTemp_*
117 |
118 | # MightyMoose
119 | *.mm.*
120 | AutoTest.Net/
121 |
122 | # Web workbench (sass)
123 | .sass-cache/
124 |
125 | # Installshield output folder
126 | [Ee]xpress/
127 |
128 | # DocProject is a documentation generator add-in
129 | DocProject/buildhelp/
130 | DocProject/Help/*.HxT
131 | DocProject/Help/*.HxC
132 | DocProject/Help/*.hhc
133 | DocProject/Help/*.hhk
134 | DocProject/Help/*.hhp
135 | DocProject/Help/Html2
136 | DocProject/Help/html
137 |
138 | # Click-Once directory
139 | publish/
140 |
141 | # Publish Web Output
142 | *.[Pp]ublish.xml
143 | *.azurePubxml
144 | # TODO: Comment the next line if you want to checkin your web deploy settings
145 | # but database connection strings (with potential passwords) will be unencrypted
146 | #*.pubxml
147 | *.publishproj
148 |
149 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
150 | # checkin your Azure Web App publish settings, but sensitive information contained
151 | # in these scripts will be unencrypted
152 | PublishScripts/
153 |
154 | # NuGet Packages
155 | *.nupkg
156 | # The packages folder can be ignored because of Package Restore
157 | **/packages/*
158 | # except build/, which is used as an MSBuild target.
159 | !**/packages/build/
160 | # Uncomment if necessary however generally it will be regenerated when needed
161 | #!**/packages/repositories.config
162 | # NuGet v3's project.json files produces more ignoreable files
163 | *.nuget.props
164 | *.nuget.targets
165 |
166 | # Microsoft Azure Build Output
167 | csx/
168 | *.build.csdef
169 |
170 | # Microsoft Azure Emulator
171 | ecf/
172 | rcf/
173 |
174 | # Windows Store app package directories and files
175 | AppPackages/
176 | BundleArtifacts/
177 | Package.StoreAssociation.xml
178 | _pkginfo.txt
179 |
180 | # Visual Studio cache files
181 | # files ending in .cache can be ignored
182 | *.[Cc]ache
183 | # but keep track of directories ending in .cache
184 | !*.[Cc]ache/
185 |
186 | # Others
187 | ClientBin/
188 | ~$*
189 | *~
190 | *.dbmdl
191 | *.dbproj.schemaview
192 | *.jfm
193 | *.pfx
194 | *.publishsettings
195 | node_modules/
196 | orleans.codegen.cs
197 |
198 | # Since there are multiple workflows, uncomment next line to ignore bower_components
199 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
200 | #bower_components/
201 |
202 | # RIA/Silverlight projects
203 | Generated_Code/
204 |
205 | # Backup & report files from converting an old project file
206 | # to a newer Visual Studio version. Backup files are not needed,
207 | # because we have git ;-)
208 | _UpgradeReport_Files/
209 | Backup*/
210 | UpgradeLog*.XML
211 | UpgradeLog*.htm
212 |
213 | # SQL Server files
214 | *.mdf
215 | *.ldf
216 |
217 | # Business Intelligence projects
218 | *.rdl.data
219 | *.bim.layout
220 | *.bim_*.settings
221 |
222 | # Microsoft Fakes
223 | FakesAssemblies/
224 |
225 | # GhostDoc plugin setting file
226 | *.GhostDoc.xml
227 |
228 | # Node.js Tools for Visual Studio
229 | .ntvs_analysis.dat
230 |
231 | # Visual Studio 6 build log
232 | *.plg
233 |
234 | # Visual Studio 6 workspace options file
235 | *.opt
236 |
237 | # Visual Studio LightSwitch build output
238 | **/*.HTMLClient/GeneratedArtifacts
239 | **/*.DesktopClient/GeneratedArtifacts
240 | **/*.DesktopClient/ModelManifest.xml
241 | **/*.Server/GeneratedArtifacts
242 | **/*.Server/ModelManifest.xml
243 | _Pvt_Extensions
244 |
245 | # Paket dependency manager
246 | .paket/paket.exe
247 | paket-files/
248 |
249 | # FAKE - F# Make
250 | .fake/
251 |
252 | # JetBrains Rider
253 | .idea/
254 | *.sln.iml
255 |
256 | # CodeRush
257 | .cr/
258 |
259 | # Python Tools for Visual Studio (PTVS)
260 | __pycache__/
261 | *.pyc
--------------------------------------------------------------------------------
/BuildingLocator/BuildingLocator.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dd-bim/IfcGeoRef/a501534ada7b64c33774bb560d9e09ee08e12886/BuildingLocator/BuildingLocator.exe
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IFCGeoRefCheckerCommand/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IFCGeoRefCheckerCommand/IFCGeoRefCheckerCommand.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {06285ACD-D639-4BFE-A8E1-CBCF1AF6D9CB}
8 | Exe
9 | IFCGeoRefCheckerCommand
10 | IFCGeoRefCheckerCommand
11 | v4.7.1
12 | 512
13 | true
14 | true
15 |
16 |
17 | AnyCPU
18 | true
19 | full
20 | false
21 | bin\Debug\
22 | DEBUG;TRACE
23 | prompt
24 | 4
25 |
26 |
27 | AnyCPU
28 | pdbonly
29 | true
30 | bin\Release\
31 | TRACE
32 | prompt
33 | 4
34 |
35 |
36 |
37 |
38 |
39 | true
40 | bin\x64\Debug\
41 | DEBUG;TRACE
42 | full
43 | x64
44 | prompt
45 | MinimumRecommendedRules.ruleset
46 | true
47 |
48 |
49 | bin\x64\Release\
50 | TRACE
51 | true
52 | pdbonly
53 | x64
54 | prompt
55 | MinimumRecommendedRules.ruleset
56 | true
57 |
58 |
59 |
60 | ..\packages\Microsoft.Extensions.Configuration.2.1.1\lib\netstandard2.0\Microsoft.Extensions.Configuration.dll
61 |
62 |
63 | ..\packages\Microsoft.Extensions.Configuration.Abstractions.2.1.1\lib\netstandard2.0\Microsoft.Extensions.Configuration.Abstractions.dll
64 |
65 |
66 | ..\packages\Microsoft.Extensions.Configuration.Binder.2.1.1\lib\netstandard2.0\Microsoft.Extensions.Configuration.Binder.dll
67 |
68 |
69 | ..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.2.1.1\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll
70 |
71 |
72 | ..\packages\Microsoft.Extensions.Logging.2.1.1\lib\netstandard2.0\Microsoft.Extensions.Logging.dll
73 |
74 |
75 | ..\packages\Microsoft.Extensions.Logging.Abstractions.2.1.1\lib\netstandard2.0\Microsoft.Extensions.Logging.Abstractions.dll
76 |
77 |
78 | ..\packages\Microsoft.Extensions.Options.2.1.1\lib\netstandard2.0\Microsoft.Extensions.Options.dll
79 |
80 |
81 | ..\packages\Microsoft.Extensions.Primitives.2.1.1\lib\netstandard2.0\Microsoft.Extensions.Primitives.dll
82 |
83 |
84 | ..\packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll
85 |
86 |
87 |
88 | ..\packages\System.Buffers.4.4.0\lib\netstandard2.0\System.Buffers.dll
89 |
90 |
91 |
92 | ..\packages\System.Memory.4.5.1\lib\netstandard2.0\System.Memory.dll
93 |
94 |
95 |
96 | ..\packages\System.Numerics.Vectors.4.4.0\lib\net46\System.Numerics.Vectors.dll
97 |
98 |
99 | ..\packages\System.Runtime.CompilerServices.Unsafe.4.5.1\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 | ..\packages\Xbim.Common.5.1.267\lib\net47\Xbim.Common.dll
112 |
113 |
114 | ..\packages\Xbim.Ifc.5.1.267\lib\net47\Xbim.Ifc.dll
115 |
116 |
117 | ..\packages\Xbim.Ifc2x3.5.1.267\lib\net47\Xbim.Ifc2x3.dll
118 |
119 |
120 | ..\packages\Xbim.Ifc4.5.1.267\lib\net47\Xbim.Ifc4.dll
121 |
122 |
123 | ..\packages\Xbim.IO.MemoryModel.5.1.267\lib\net47\Xbim.IO.MemoryModel.dll
124 |
125 |
126 |
127 |
128 |
129 |
130 | ResXFileCodeGenerator
131 | Resources.Designer.cs
132 | Designer
133 |
134 |
135 | True
136 | Resources.resx
137 |
138 |
139 |
140 | SettingsSingleFileGenerator
141 | Settings.Designer.cs
142 |
143 |
144 | True
145 | Settings.settings
146 | True
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 | {64be62a1-29c5-4d21-9cf7-1f0f80219ec6}
155 | IfcGeoRefChecker_v3
156 |
157 |
158 |
159 |
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IFCGeoRefCheckerCommand/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using System.Windows.Forms;
6 | using IfcGeoRefChecker.Appl;
7 | using Xbim.Ifc4.Interfaces;
8 | using Newtonsoft.Json;
9 | using IfcGeoRefChecker.IO;
10 | using System.IO;
11 |
12 | namespace IFCGeoRefCheckerCommand
13 | {
14 | static class Program
15 | {
16 |
17 | ///
18 | /// Der Haupteinstiegspunkt für die Anwendung.
19 | ///
20 | [STAThread]
21 | static void Main(string[] args)
22 | {
23 | Dictionary CheckObjList = new Dictionary();
24 | Dictionary> GroundWallObjects;
25 | Dictionary NamePathDict;
26 |
27 | //string testpath = @"C:\Users\possner\Desktop\BeispieldatenGeoRefChecker\Input\InputTest.json";
28 | //string jPath = testpath;
29 | try
30 | {
31 | string jPath = args[0];
32 | string jText = System.IO.File.ReadAllText(jPath);
33 |
34 | InputGroup inputGroup = JsonConvert.DeserializeObject(jText);
35 |
36 | var importObj = new IfcImport(inputGroup);
37 |
38 | NamePathDict = importObj.NamePathDict;
39 | CheckObjList = importObj.CheckObjs;
40 | GroundWallObjects = importObj.GroundWallObjects;
41 |
42 | foreach (var checkObj in CheckObjList)
43 | {
44 | string[] lDirectory = { inputGroup.outputDirectory, "IfcGeoRefChecker\\CheckExport" };
45 | Directory.CreateDirectory(System.IO.Path.Combine(lDirectory));
46 |
47 | string[] paths = { inputGroup.outputDirectory, "IfcGeoRefChecker\\CheckExport", checkObj.Key };
48 | var path = System.IO.Path.Combine(paths);
49 |
50 | if (inputGroup.outLog)
51 | {
52 | try
53 | {
54 | //Log.Information("Export checking-log...");
55 |
56 | var log = new LogOutput(checkObj.Value, path, checkObj.Key);
57 |
58 | //Log.Information("Export successful to: " + path);
59 | }
60 | catch (Exception exIO)
61 | {
62 | //Log.Error("Not able to export log. Error: " + exIO);
63 | }
64 | }
65 |
66 | if (inputGroup.outJson)
67 | {
68 | try
69 | {
70 | //Log.Information("Export JSON-file...");
71 |
72 | var js = new JsonOutput();
73 | js.JsonOutputFile(checkObj.Value, path);
74 |
75 | //Log.Information("Export successful to: " + path);
76 | }
77 | catch (Exception exIO)
78 | {
79 | //Log.Error("Not able to export json. Error: " + exIO);
80 | }
81 | }
82 | }
83 | }
84 | catch(Exception ex)
85 | {
86 | Console.WriteLine("Unable to check Georeferencing. Please enter a path to an existing *.json configuration file as the first commandline argument. See the documentation for more Information. Error: " + ex);
87 | }
88 |
89 |
90 | }
91 | }
92 | }
93 |
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IFCGeoRefCheckerCommand/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // Allgemeine Informationen über eine Assembly werden über die folgenden
6 | // Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
7 | // die einer Assembly zugeordnet sind.
8 | [assembly: AssemblyTitle("IFCGeoRefCheckerCommand")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("IFCGeoRefCheckerCommand")]
13 | [assembly: AssemblyCopyright("Copyright © 2019")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly
18 | // für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von
19 | // COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen.
20 | [assembly: ComVisible(false)]
21 |
22 | // Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
23 | [assembly: Guid("06285acd-d639-4bfe-a8e1-cbcf1af6d9cb")]
24 |
25 | // Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
26 | //
27 | // Hauptversion
28 | // Nebenversion
29 | // Buildnummer
30 | // Revision
31 | //
32 | // Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
33 | // übernehmen, indem Sie "*" eingeben:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IFCGeoRefCheckerCommand/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // Dieser Code wurde von einem Tool generiert.
4 | // Laufzeitversion: 4.0.30319.42000
5 | //
6 | // Änderungen an dieser Datei können fehlerhaftes Verhalten verursachen und gehen verloren, wenn
7 | // der Code neu generiert wird.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace IFCGeoRefCheckerCommand.Properties
12 | {
13 |
14 |
15 | ///
16 | /// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
17 | ///
18 | // Diese Klasse wurde von der StronglyTypedResourceBuilder-Klasse
19 | // über ein Tool wie ResGen oder Visual Studio automatisch generiert.
20 | // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
21 | // mit der Option /str erneut aus, oder erstellen Sie Ihr VS-Projekt neu.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources
26 | {
27 |
28 | private static global::System.Resources.ResourceManager resourceMan;
29 |
30 | private static global::System.Globalization.CultureInfo resourceCulture;
31 |
32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
33 | internal Resources()
34 | {
35 | }
36 |
37 | ///
38 | /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
39 | ///
40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
41 | internal static global::System.Resources.ResourceManager ResourceManager
42 | {
43 | get
44 | {
45 | if ((resourceMan == null))
46 | {
47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("IFCGeoRefCheckerCommand.Properties.Resources", typeof(Resources).Assembly);
48 | resourceMan = temp;
49 | }
50 | return resourceMan;
51 | }
52 | }
53 |
54 | ///
55 | /// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
56 | /// Ressourcenlookups, die diese stark typisierte Ressourcenklasse verwenden.
57 | ///
58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
59 | internal static global::System.Globalization.CultureInfo Culture
60 | {
61 | get
62 | {
63 | return resourceCulture;
64 | }
65 | set
66 | {
67 | resourceCulture = value;
68 | }
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IFCGeoRefCheckerCommand/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | text/microsoft-resx
107 |
108 |
109 | 2.0
110 |
111 |
112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
113 |
114 |
115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IFCGeoRefCheckerCommand/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace IFCGeoRefCheckerCommand.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IFCGeoRefCheckerCommand/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IFCGeoRefCheckerCommand/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_GUI/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_GUI/App.xaml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_GUI/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Configuration;
4 | using System.Data;
5 | using System.Linq;
6 | using System.Threading.Tasks;
7 | using System.Windows;
8 |
9 | namespace IfcGeoRefChecker_GUI
10 | {
11 | ///
12 | /// Interaktionslogik für "App.xaml"
13 | ///
14 | public partial class App : Application
15 | {
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_GUI/Compare.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_GUI/Compare.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Windows;
7 | using System.Windows.Controls;
8 | using System.Windows.Data;
9 | using System.Windows.Documents;
10 | using System.Windows.Input;
11 | using System.Windows.Media;
12 | using System.Windows.Media.Imaging;
13 | using System.Windows.Shapes;
14 | using IfcGeoRefChecker.Appl;
15 | using Newtonsoft.Json;
16 |
17 | namespace IfcGeoRefChecker_GUI
18 | {
19 | ///
20 | /// Interaktionslogik für Compare.xaml
21 | ///
22 | public partial class Compare : Window
23 | {
24 | private GeoRefComparer comparison;
25 |
26 | private string direc;
27 |
28 | private Dictionary jsonDict = new Dictionary();
29 |
30 | public Compare(string direc, Dictionary checkDict)
31 | {
32 | this.direc = direc;
33 |
34 | InitializeComponent();
35 |
36 | foreach (var obj in checkDict)
37 | {
38 | cb_compRef.Items.Add(obj.Key);
39 |
40 | var jsonObj = JsonConvert.SerializeObject(obj.Value, Formatting.Indented);
41 |
42 | this.jsonDict.Add(obj.Key, jsonObj);
43 | }
44 | }
45 |
46 | private void cb_compRef_SelectionChanged(object sender, SelectionChangedEventArgs e)
47 | {
48 | list_compModels.Items.Clear();
49 |
50 | foreach (string file in this.jsonDict.Keys)
51 | {
52 | list_compModels.Items.Add(file);
53 | }
54 | list_compModels.Items.Remove(cb_compRef.SelectedItem.ToString());
55 | }
56 |
57 | private void bt_compare_Click(object sender, RoutedEventArgs e)
58 | {
59 | if(cb_compRef.SelectedItem == null)
60 | {
61 | //Log.Information("Comparing IFC Files not possible. No Reference selected.");
62 | System.Windows.MessageBox.Show("Please select an IFC file for reference.");
63 | }
64 | else if(list_compModels.SelectedItems.Count == 0)
65 | {
66 | System.Windows.MessageBox.Show("Please select at least 1 IFC file to compare to your reference.");
67 | }
68 | else
69 | {
70 | var refName = cb_compRef.SelectedItem.ToString();
71 |
72 | this.jsonDict.TryGetValue(refName, out var refModel);
73 |
74 | var refJson = new KeyValuePair(refName, refModel);
75 |
76 | var compList = new Dictionary();
77 |
78 | foreach (var item in list_compModels.SelectedItems)
79 | {
80 | this.jsonDict.TryGetValue(item.ToString(), out var compModel);
81 |
82 | compList.Add(item.ToString(), compModel);
83 | }
84 |
85 | this.comparison = new GeoRefComparer(this.direc, refJson, compList);
86 | comparison.CompareIFC();
87 |
88 | bt_compLog.IsEnabled = true;
89 | }
90 | }
91 |
92 | private void bt_compLog_Click(object sender, RoutedEventArgs e)
93 | {
94 | try
95 | {
96 | this.comparison.ShowCompareLog();
97 | }
98 | catch
99 | {
100 | MessageBox.Show("Error occured. Please check directory of your IFC-file for the corresponding Comparison log file.");
101 | }
102 | }
103 |
104 | private void bt_close_Click(object sender, RoutedEventArgs e)
105 | {
106 | this.Close();
107 | }
108 |
109 | private void checkAll_Checked(object sender, RoutedEventArgs e)
110 | {
111 | list_compModels.SelectAll();
112 | uncheckAll.IsChecked = false;
113 | }
114 |
115 | private void uncheckAll_Checked(object sender, RoutedEventArgs e)
116 | {
117 | list_compModels.UnselectAll();
118 | checkAll.IsChecked = false;
119 | }
120 | }
121 | }
122 |
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_GUI/Export2IFC.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_GUI/Export2IFC.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 | using System.Windows;
8 | using System.Windows.Controls;
9 | using System.Windows.Data;
10 | using System.Windows.Documents;
11 | using System.Windows.Input;
12 | using System.Windows.Media;
13 | using System.Windows.Media.Imaging;
14 | using System.Windows.Shapes;
15 | using IfcGeoRefChecker.Appl;
16 | using IfcGeoRefChecker.IO;
17 | using Newtonsoft.Json;
18 |
19 | namespace IfcGeoRefChecker_GUI
20 | {
21 | ///
22 | /// Interaktionslogik für Export2IFC.xaml
23 | ///
24 | public partial class Export2IFC : Window
25 | {
26 | private string filePath;
27 | private string fileName;
28 |
29 | private GeoRefChecker jsonMap;
30 |
31 | public Export2IFC(string filePath, string fileName)
32 | {
33 | //this.direc = direc;
34 | this.filePath = filePath;
35 | this.fileName = fileName;
36 |
37 | var fd = new Microsoft.Win32.OpenFileDialog();
38 |
39 | fd.Filter = "json files (*.json)|*.json";
40 | fd.Multiselect = true;
41 |
42 | fd.ShowDialog();
43 |
44 | var jsonPath = fd.FileName;
45 | var jsonName = fd.SafeFileName;
46 |
47 | var jsonObj = File.ReadAllText(jsonPath);
48 |
49 | //var jsonObj = File.ReadAllText(direc + "\\IfcGeoRefChecker\\buildingLocator\\json\\update.json");
50 |
51 | this.jsonMap = new GeoRefChecker(jsonObj);
52 |
53 | InitializeComponent();
54 |
55 | lb_jsonmap.Text = fileName;
56 | lb_jsonmap_json.Text = jsonName;
57 | }
58 |
59 | private void final_export_Click(object sender, RoutedEventArgs e)
60 | {
61 | getJsonContent();
62 |
63 | var jsonUpd = JsonConvert.SerializeObject(jsonMap, Formatting.Indented);
64 |
65 | var write = new IfcWriter(filePath, fileName, jsonUpd);
66 | }
67 |
68 | private void getJsonContent() //Auslesen der update-JSON in Anbhängigkeit der gewählten Export-Funktion
69 | {
70 | var lev50map = (from l50 in jsonMap.LoGeoRef50 //Lesen des ersten GeoRef50-Eintrages (dieser enthält die neue Georef aus dem BuildingLocator)
71 | select l50).First();
72 |
73 | //var lev50oth = from l50 in jsonMap.LoGeoRef50 //opt.: falls weitere Georef50-Objekte vorhanden sind, werden diese hier gelesen --> DEPRECATED
74 | // where l50 != lev50map
75 | // select l50;
76 |
77 | //foreach(var l50 in lev50oth)
78 | //{
79 | // if(radio_50.IsChecked == true)
80 | // {
81 | // l50.CRS_Name = lev50map.CRS_Name;
82 | // }
83 | //} //DEPRECATED, da projekt nur noch eine Georef50-Instanz enthalten darf
84 |
85 | //if(radio_50.IsChecked == true)
86 | //{
87 | // foreach(var l50 in lev50oth)
88 | // {
89 | // l50.Translation_Eastings = lev50map.Translation_Eastings;
90 | // l50.Translation_Northings = lev50map.Translation_Northings;
91 |
92 | // l50.RotationXY = lev50map.RotationXY;
93 | // }
94 | //}
95 | //else //DEPRECATED, da projekt nur noch eine Georef50-Instanz enthalten darf --> radio_50 ist standard-export
96 |
97 | if (radio_40.IsChecked == true) //Option GeoRef projektbezogen speichern
98 | {
99 | foreach (var l40 in jsonMap.LoGeoRef40)
100 | {
101 | l40.ProjectLocation[0] = ConvertUnit((double)lev50map.Translation_Eastings, jsonMap.LengthUnit); //Umwandlung zu Projektlängeneinheit, wenn nötig
102 | l40.ProjectLocation[1] = ConvertUnit((double)lev50map.Translation_Northings, jsonMap.LengthUnit);
103 |
104 | //l40.TrueNorthXY[0] = lev50map.RotationXY[1]; //Rotation on projected CRS is not equal to True North
105 | //l40.TrueNorthXY[1] = lev50map.RotationXY[0];
106 | }
107 |
108 | lev50map.GeoRef50 = false;
109 | lev50map.Translation_Eastings = 0;
110 | lev50map.Translation_Northings = 0;
111 | lev50map.RotationXY[0] = 0;
112 | lev50map.RotationXY[1] = 0;
113 | }
114 |
115 | //else if (radio_30.IsChecked == true) //Option GeoRef baustellenbezogen speichern // Exportoption für LoGeoRef30 entfernt
116 | //{
117 | // foreach (var l30 in jsonMap.LoGeoRef30)
118 | // {
119 | // l30.ObjectLocationXYZ[0] += ConvertUnit((double)lev50map.Translation_Eastings, jsonMap.LengthUnit); //Addition zur eventuellen vorhandenen Projektkoordinate,
120 | // l30.ObjectLocationXYZ[1] += ConvertUnit((double)lev50map.Translation_Northings, jsonMap.LengthUnit); //damit keine projektinterne Verschiebung stattfindet
121 |
122 | // l30.ObjectRotationX[0] = lev50map.RotationXY[0];
123 | // l30.ObjectRotationX[1] = lev50map.RotationXY[1];
124 | // }
125 |
126 | // lev50map.GeoRef50 = false;
127 | // lev50map.Translation_Eastings = 0;
128 | // lev50map.Translation_Northings = 0;
129 | // lev50map.RotationXY[0] = 0;
130 | // lev50map.RotationXY[1] = 0;
131 | //}
132 | //else if (radio_mix.IsChecked == true) //Option GeoRef-Location baustellenbezogen und Rotation projektbezogen speichern (Revit-konform)
133 | //{
134 | // foreach (var l30 in jsonMap.LoGeoRef30)
135 | // {
136 | // l30.ObjectLocationXYZ[0] += ConvertUnit((double)lev50map.Translation_Eastings, jsonMap.LengthUnit);
137 | // l30.ObjectLocationXYZ[1] += ConvertUnit((double)lev50map.Translation_Northings, jsonMap.LengthUnit);
138 | // }
139 |
140 | // foreach (var l40 in jsonMap.LoGeoRef40)
141 | // {
142 | // l40.TrueNorthXY[0] = lev50map.RotationXY[1];
143 | // l40.TrueNorthXY[1] = lev50map.RotationXY[0];
144 | // }
145 |
146 | // lev50map.GeoRef50 = false;
147 | // lev50map.Translation_Eastings = 0;
148 | // lev50map.Translation_Northings = 0;
149 | // lev50map.RotationXY[0] = 0;
150 | // lev50map.RotationXY[1] = 0;
151 | //}
152 |
153 | if (check_height.IsChecked == true)
154 | {
155 | var lev20Site = (from l20Site in jsonMap.LoGeoRef20
156 | where l20Site.Reference_Object[1].Equals("IfcSite")
157 | select l20Site).Single();
158 |
159 | var elev = tb_height.Text.Replace(",", ".");
160 | elev = elev.Replace(" ", "");
161 |
162 | if (double.TryParse(elev, out var res))
163 | {
164 | lev20Site.Elevation = ConvertUnit(res, jsonMap.LengthUnit);
165 |
166 | if (radio_50.IsChecked == true)
167 | {
168 | foreach (var l50 in jsonMap.LoGeoRef50)
169 | {
170 | l50.Translation_Orth_Height = res;
171 | l50.CRS_Vertical_Datum = tb_height_datum.Text;
172 | }
173 | }
174 | }
175 | else
176 | {
177 | MessageBox.Show("Error occured. Please provide a number for the absolute height!");
178 | }
179 | }
180 | }
181 |
182 | private double ConvertUnit(double coordinate, string unit)
183 | {
184 | switch (unit)
185 | {
186 | case "m":
187 | break;
188 |
189 | case "mm":
190 | coordinate *= 1000;
191 | break;
192 |
193 | case "ft":
194 | coordinate /= 0.3048;
195 | break;
196 |
197 | case "in":
198 | coordinate *= 39.3701;
199 | break;
200 |
201 | default:
202 | break;
203 | }
204 |
205 | return coordinate;
206 | }
207 |
208 | private void check_10_Checked(object sender, RoutedEventArgs e)
209 | {
210 | var lev10Site = (from l10Site in jsonMap.LoGeoRef10
211 | where l10Site.Reference_Object[1].Equals("IfcSite")
212 | select l10Site).Single();
213 | var lev10Bldg = (from l10Bldg in jsonMap.LoGeoRef10
214 | where l10Bldg.Reference_Object[1].Equals("IfcBuilding")
215 | select l10Bldg).Single();
216 |
217 | lev10Site.AddressLines.Clear();
218 |
219 | foreach (var addLine in lev10Bldg.AddressLines)
220 | {
221 | lev10Site.AddressLines.Add(addLine);
222 | }
223 |
224 | lev10Site.Postalcode = lev10Bldg.Postalcode;
225 | lev10Site.Town = lev10Bldg.Town;
226 | lev10Site.Region = lev10Bldg.Region;
227 | lev10Site.Country = lev10Bldg.Country;
228 | }
229 |
230 | private void check_10_Unchecked(object sender, RoutedEventArgs e)
231 | {
232 | var lev10Site = (from l10Site in jsonMap.LoGeoRef10
233 | where l10Site.Reference_Object[1].Equals("IfcSite")
234 | select l10Site).Single();
235 |
236 | lev10Site.AddressLines.Clear();
237 | //lev10Site.AddressLines[0] = null;
238 | //lev10Site.AddressLines[1] = null;
239 | //lev10Site.AddressLines[2] = null;
240 | lev10Site.Postalcode = null;
241 | lev10Site.Town = null;
242 | lev10Site.Region = null;
243 | lev10Site.Country = null;
244 | }
245 |
246 | private void edit_manually_Click(object sender, RoutedEventArgs e)
247 | {
248 | getJsonContent();
249 |
250 | var jsonUpd = JsonConvert.SerializeObject(jsonMap, Formatting.Indented);
251 |
252 | var ifcResults = new Results(this.filePath, this.fileName, jsonUpd);
253 | ifcResults.Show();
254 | }
255 |
256 | private void check_height_Checked(object sender, RoutedEventArgs e)
257 | {
258 | tb_height.IsEnabled = true;
259 | tb_height_datum.IsEnabled = true;
260 | }
261 | }
262 | }
263 |
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_GUI/Info.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_GUI/Info.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Windows;
7 | using System.Windows.Controls;
8 | using System.Windows.Data;
9 | using System.Windows.Documents;
10 | using System.Windows.Input;
11 | using System.Windows.Media;
12 | using System.Windows.Media.Imaging;
13 | using System.Windows.Shapes;
14 |
15 | namespace IfcGeoRefChecker_GUI
16 | {
17 | ///
18 | /// Interaktionslogik für Info.xaml
19 | ///
20 | public partial class Info : Window
21 | {
22 | public Info()
23 | {
24 | InitializeComponent();
25 | block_info.Text =
26 | "IfcGeoRefChecker Version 0.3.2.0 (18.07.2019)" +
27 | "\r\n" +
28 | "\r\nThe IFCGeoRefChecker is a tool for checking, comparing and updating IFC files regarding their georeferencing attributes." +
29 | "\r\n" +
30 | "\r\nThe tool was developed at HTW Dresden, University of Applied Sciences, Faculty of Spatial Information." +
31 | "\r\n(contact: christian.clemen@htw - dresden.de)" +
32 | "\r\n" +
33 | "\r\nThe application was developed based on the xBIM Toolkit. It also uses Newtonsoft.Json for Json-Output, Serilog for Logging, " +
34 | "\r\nand also from HTW Dresden: BimGisCadLib, BuildngLocator and IfcBuildingContourCalculator. ";
35 |
36 | block_terms.Text =
37 | "IFCGeoRefChecker is licensed under the MIT License. \r\n \r\nFor details check the attached documentation." +
38 | " It should be used for research purposes only." +
39 | " The functionality, which is used, is based on the xBIM Toolkit, available under GitHub or docs.xbim.net." +
40 | " For license issues regarding xBIM please consider Common Development and Distribution (CDDL)" +
41 | " under which the xBIM Toolkit is licensed together with Third Party Licences mentioned on their website." +
42 | " For the functionality and the results of this tool please respect the following terms of use: " +
43 | "\r\n \r\n1.EXCLUSION OF GUARANTEE" +
44 | "\r\nDresden, University of Applied Sciences does not guarantee the software, the data, the results or the documentation." +
45 | " It does not guarantee the correctness and usability of the contents or that they are not covered by any third party's rights," +
46 | " nor that access will be possible in a reliable way, free of viruses or errors." +
47 | "\r\n \r\n2.EXCLUSION OF LIABILITY" +
48 | "\r\nHTW Dresden, University of Applied Sciences is not liable for any damages," +
49 | " except those caused by a willful or grossly negligent violation of duties by either HTW Dresden, University of Applied Sciences," +
50 | " its legal representatives, or its assistants in fulfillment. This holds also for damages caused by any violation of duties in" +
51 | " contract negotiation or by carrying out unauthorised actions." +
52 | " In the case of damages caused by a reckless violation of contractual or pre - contractual duties by HTW Dresden," +
53 | " University of Applied Sciences, its legal representatives, or its assistants in fulfillment," +
54 | " liability for indirect damages and follow - up damages is excluded." +
55 | " The cogent liability according to the Product Liability Act is not touched by the regulations stated above.";
56 | }
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_GUI/MainWindow.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_GUI/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Resources;
3 | using System.Runtime.CompilerServices;
4 | using System.Runtime.InteropServices;
5 | using System.Windows;
6 |
7 | // Allgemeine Informationen über eine Assembly werden über die folgenden
8 | // Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
9 | // die einer Assembly zugeordnet sind.
10 | [assembly: AssemblyTitle("IfcGeoRefChecker_GUI")]
11 | [assembly: AssemblyDescription("")]
12 | [assembly: AssemblyConfiguration("")]
13 | [assembly: AssemblyCompany("")]
14 | [assembly: AssemblyProduct("IfcGeoRefChecker_GUI")]
15 | [assembly: AssemblyCopyright("Copyright © 2019")]
16 | [assembly: AssemblyTrademark("")]
17 | [assembly: AssemblyCulture("")]
18 |
19 | // Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly
20 | // für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von
21 | // COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen.
22 | [assembly: ComVisible(false)]
23 |
24 | //Um mit dem Erstellen lokalisierbarer Anwendungen zu beginnen, legen Sie
25 | //ImCodeVerwendeteKultur in der .csproj-Datei
26 | //in einer fest. Wenn Sie in den Quelldateien beispielsweise Deutsch
27 | //(Deutschland) verwenden, legen Sie auf \"de-DE\" fest. Heben Sie dann die Auskommentierung
28 | //des nachstehenden NeutralResourceLanguage-Attributs auf. Aktualisieren Sie "en-US" in der nachstehenden Zeile,
29 | //sodass es mit der UICulture-Einstellung in der Projektdatei übereinstimmt.
30 |
31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
32 |
33 |
34 | [assembly: ThemeInfo(
35 | ResourceDictionaryLocation.None, //Speicherort der designspezifischen Ressourcenwörterbücher
36 | //(wird verwendet, wenn eine Ressource auf der Seite nicht gefunden wird,
37 | // oder in den Anwendungsressourcen-Wörterbüchern nicht gefunden werden kann.)
38 | ResourceDictionaryLocation.SourceAssembly //Speicherort des generischen Ressourcenwörterbuchs
39 | //(wird verwendet, wenn eine Ressource auf der Seite nicht gefunden wird,
40 | // designspezifischen Ressourcenwörterbuch nicht gefunden werden kann.)
41 | )]
42 |
43 |
44 | // Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
45 | //
46 | // Hauptversion
47 | // Nebenversion
48 | // Buildnummer
49 | // Revision
50 | //
51 | // Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
52 | // übernehmen, indem Sie "*" eingeben:
53 | // [assembly: AssemblyVersion("1.0.*")]
54 | [assembly: AssemblyVersion("1.0.0.0")]
55 | [assembly: AssemblyFileVersion("1.0.0.0")]
56 |
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_GUI/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // Dieser Code wurde von einem Tool generiert.
4 | // Laufzeitversion:4.0.30319.42000
5 | //
6 | // Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
7 | // der Code erneut generiert wird.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace IfcGeoRefChecker_GUI.Properties {
12 | using System;
13 |
14 |
15 | ///
16 | /// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
17 | ///
18 | // Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
19 | // -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
20 | // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
21 | // mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal Resources() {
33 | }
34 |
35 | ///
36 | /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
37 | ///
38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39 | internal static global::System.Resources.ResourceManager ResourceManager {
40 | get {
41 | if (object.ReferenceEquals(resourceMan, null)) {
42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("IfcGeoRefChecker_GUI.Properties.Resources", typeof(Resources).Assembly);
43 | resourceMan = temp;
44 | }
45 | return resourceMan;
46 | }
47 | }
48 |
49 | ///
50 | /// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
51 | /// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
52 | ///
53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54 | internal static global::System.Globalization.CultureInfo Culture {
55 | get {
56 | return resourceCulture;
57 | }
58 | set {
59 | resourceCulture = value;
60 | }
61 | }
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_GUI/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_GUI/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // Dieser Code wurde von einem Tool generiert.
4 | // Laufzeitversion:4.0.30319.42000
5 | //
6 | // Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
7 | // der Code erneut generiert wird.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace IfcGeoRefChecker_GUI.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_GUI/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_GUI/icon_ico.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dd-bim/IfcGeoRef/a501534ada7b64c33774bb560d9e09ee08e12886/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_GUI/icon_ico.ico
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_GUI/img/DD-BIM-LOGO.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dd-bim/IfcGeoRef/a501534ada7b64c33774bb560d9e09ee08e12886/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_GUI/img/DD-BIM-LOGO.png
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_GUI/img/icon_img.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dd-bim/IfcGeoRef/a501534ada7b64c33774bb560d9e09ee08e12886/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_GUI/img/icon_img.png
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_GUI/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_v3.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.28010.2046
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IfcGeoRefChecker_v3", "IfcGeoRefChecker_v3\IfcGeoRefChecker_v3.csproj", "{64BE62A1-29C5-4D21-9CF7-1F0F80219EC6}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IfcGeoRefChecker_GUI", "IfcGeoRefChecker_GUI\IfcGeoRefChecker_GUI.csproj", "{460E9B43-BCA7-431C-8350-1BCCF46288DC}"
9 | EndProject
10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IFCGeoRefCheckerCommand", "IFCGeoRefCheckerCommand\IFCGeoRefCheckerCommand.csproj", "{06285ACD-D639-4BFE-A8E1-CBCF1AF6D9CB}"
11 | EndProject
12 | Global
13 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
14 | Debug|Any CPU = Debug|Any CPU
15 | Debug|x64 = Debug|x64
16 | Release|Any CPU = Release|Any CPU
17 | Release|x64 = Release|x64
18 | EndGlobalSection
19 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
20 | {64BE62A1-29C5-4D21-9CF7-1F0F80219EC6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21 | {64BE62A1-29C5-4D21-9CF7-1F0F80219EC6}.Debug|Any CPU.Build.0 = Debug|Any CPU
22 | {64BE62A1-29C5-4D21-9CF7-1F0F80219EC6}.Debug|x64.ActiveCfg = Debug|x64
23 | {64BE62A1-29C5-4D21-9CF7-1F0F80219EC6}.Debug|x64.Build.0 = Debug|x64
24 | {64BE62A1-29C5-4D21-9CF7-1F0F80219EC6}.Release|Any CPU.ActiveCfg = Release|Any CPU
25 | {64BE62A1-29C5-4D21-9CF7-1F0F80219EC6}.Release|Any CPU.Build.0 = Release|Any CPU
26 | {64BE62A1-29C5-4D21-9CF7-1F0F80219EC6}.Release|x64.ActiveCfg = Release|x64
27 | {64BE62A1-29C5-4D21-9CF7-1F0F80219EC6}.Release|x64.Build.0 = Release|x64
28 | {460E9B43-BCA7-431C-8350-1BCCF46288DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
29 | {460E9B43-BCA7-431C-8350-1BCCF46288DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
30 | {460E9B43-BCA7-431C-8350-1BCCF46288DC}.Debug|x64.ActiveCfg = Debug|x64
31 | {460E9B43-BCA7-431C-8350-1BCCF46288DC}.Debug|x64.Build.0 = Debug|x64
32 | {460E9B43-BCA7-431C-8350-1BCCF46288DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
33 | {460E9B43-BCA7-431C-8350-1BCCF46288DC}.Release|Any CPU.Build.0 = Release|Any CPU
34 | {460E9B43-BCA7-431C-8350-1BCCF46288DC}.Release|x64.ActiveCfg = Release|x64
35 | {460E9B43-BCA7-431C-8350-1BCCF46288DC}.Release|x64.Build.0 = Release|x64
36 | {06285ACD-D639-4BFE-A8E1-CBCF1AF6D9CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
37 | {06285ACD-D639-4BFE-A8E1-CBCF1AF6D9CB}.Debug|Any CPU.Build.0 = Debug|Any CPU
38 | {06285ACD-D639-4BFE-A8E1-CBCF1AF6D9CB}.Debug|x64.ActiveCfg = Debug|x64
39 | {06285ACD-D639-4BFE-A8E1-CBCF1AF6D9CB}.Debug|x64.Build.0 = Debug|x64
40 | {06285ACD-D639-4BFE-A8E1-CBCF1AF6D9CB}.Release|Any CPU.ActiveCfg = Release|Any CPU
41 | {06285ACD-D639-4BFE-A8E1-CBCF1AF6D9CB}.Release|Any CPU.Build.0 = Release|Any CPU
42 | {06285ACD-D639-4BFE-A8E1-CBCF1AF6D9CB}.Release|x64.ActiveCfg = Release|x64
43 | {06285ACD-D639-4BFE-A8E1-CBCF1AF6D9CB}.Release|x64.Build.0 = Release|x64
44 | EndGlobalSection
45 | GlobalSection(SolutionProperties) = preSolution
46 | HideSolutionNode = FALSE
47 | EndGlobalSection
48 | GlobalSection(ExtensibilityGlobals) = postSolution
49 | SolutionGuid = {782891DF-BF3D-406C-9217-75CC3ACC209C}
50 | EndGlobalSection
51 | EndGlobal
52 |
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_v3/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_v3/App.xaml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_v3/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Configuration;
4 | using System.Data;
5 | using System.Linq;
6 | using System.Threading.Tasks;
7 | using System.Windows;
8 |
9 | namespace IfcGeoRefChecker
10 | {
11 | ///
12 | /// Interaction logic for App.xaml
13 | ///
14 | public partial class App : Application
15 | {
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_v3/Appl/BldgContourCalculator.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using BimGisCad.Representation.Geometry.Composed;
5 | using IfcGeometryExtractor;
6 | using Xbim.Ifc4.Interfaces;
7 |
8 | namespace IfcGeoRefChecker.Appl
9 | {
10 | public class BldgContourCalculator
11 | {
12 | public string GetBldgContour(IList elems, string unit)
13 | {
14 | string WKTstring = "";
15 |
16 | try
17 | {
18 | var calc = new Calculation();
19 | var wallLined = new List();
20 |
21 | //-------------------Auslesen der Geometrie pro Slab oder Wall, Geometrie je nach Typ--------------------------------------
22 | foreach(var singleElem in elems)
23 | {
24 | //Ermitteln der Werte für Local Placement
25 | var plcmt = singleElem.ObjectPlacement;
26 |
27 | //derzeit nur Fall IfcLocalPlacement (Erweiterung für Grid,... nötig)
28 | var bldgSystem = calc.GetAbsolutePlacement(plcmt); //globales Bauwerkssystem wird ermittelt (ohne SiteSystem)
29 |
30 | //Auslesen der Repräsentationstypen
31 | //-----------------------------------
32 |
33 | var repTypes = singleElem.Representation.Representations;
34 |
35 | var repBody = from rep in repTypes
36 | where rep.RepresentationIdentifier == "Body"
37 | select rep;
38 |
39 | var wallDetec = calc.GetBodyGeometry(repBody.FirstOrDefault()); //wenn vorhanden. ist Body-Geometrie immer maßgebend
40 |
41 | if(wallDetec.Count > 0)
42 | {
43 | wallLined.AddRange(wallDetec);
44 |
45 | foreach(var wl in wallDetec)
46 | {
47 | double dX = wl.Start.X - wl.End.X;
48 | double dY = wl.Start.Y - wl.End.Y;
49 | }
50 | }
51 | else
52 | { //keine Body-Geometrie gefunden bzw. Auslesen der Repräsentation derzeit nicht implementiert
53 | var repFootprint = from rep in repTypes
54 | where rep.RepresentationIdentifier == "Footprint"
55 | select rep;
56 |
57 | var repBox = from rep in repTypes
58 | where rep.RepresentationIdentifier == "Box"
59 | select rep;
60 |
61 | if(repFootprint.Any()) //erste Wahl: Footprint
62 | {
63 | wallLined.AddRange(calc.GetFootprintGeometry(repFootprint.FirstOrDefault()));
64 | }
65 | else if(repBox.Any()) //zweite Wahl: BoundingBox
66 | {
67 | wallLined.AddRange(calc.GetBboxGeometry(repBox.FirstOrDefault()));
68 | }
69 | else
70 | { //dritte Wahl: Axis (vermutlich nur bei Walls, ultima ratio)
71 | var repAxis = from rep in repTypes
72 | where rep.RepresentationIdentifier == "Axis"
73 | select rep;
74 |
75 | var axisWall = calc.GetAxisGeometry(repAxis.FirstOrDefault());
76 |
77 | wallLined.AddRange(axisWall);
78 | }
79 | }
80 | }
81 |
82 | //------------------------------------------------------------------------------------------------------------------------
83 |
84 | wallLined = calc.ConvertToMeter(wallLined, unit);
85 |
86 | //-----------------Zusammenführen gleichartiger Segmente-------------------------------------------------------------------
87 | calc.CleanUpWallLines(wallLined, 0);
88 | var uniqueWalls = new List();
89 |
90 | foreach(var w in calc.WallLinedClean)
91 | uniqueWalls.Add(w);
92 | //-------------------------------------------------------------------------------------------------------------------------
93 |
94 | //-----------------Berechnung der Polygonpunkte (Hauptbestandteil) + Ausgabe als WKT-string--------------------------------
95 | var polyPts = calc.GetPolygonPts(uniqueWalls);
96 |
97 | var output = new Output();
98 |
99 | WKTstring = output.CreateWKTstring(polyPts);
100 | }
101 | catch(Exception ex)
102 | {
103 | WKTstring = ex.Message;
104 | }
105 |
106 | return WKTstring;
107 | }
108 | }
109 | }
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_v3/Appl/Calc.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Windows;
4 | using System.Windows.Media.Media3D;
5 |
6 | namespace IfcGeoRefChecker.Appl
7 | {
8 | //class with methods for calculating between selectable units or for correct updating of IfcModels
9 |
10 | public class Calc
11 | {
12 | private const double DegToRad = Math.PI / 180;
13 |
14 | private Vector3D xyz_xAxis_def = new Vector3D(1, 0, 0);
15 |
16 | private Vector3D xyz_zAxis_def = new Vector3D(0, 0, 1);
17 |
18 | //convert length unit (Level 20, 30 and 40)
19 | public Dictionary ConvertLengthUnits(string ifcUnit, double ifcLength)
20 | {
21 | var unitDict = new Dictionary();
22 |
23 | if(ifcUnit.Equals("m"))
24 | {
25 | unitDict.Add("m", ifcLength);
26 | unitDict.Add("dm", ifcLength * 10);
27 | unitDict.Add("cm", ifcLength * 100);
28 | unitDict.Add("mm", ifcLength * 1000);
29 | unitDict.Add("ft", ifcLength * 3.280839895);
30 | unitDict.Add("in", ifcLength * 39.37007874);
31 | }
32 |
33 | if(ifcUnit.Equals("dm"))
34 | {
35 | unitDict.Add("m", ifcLength / 10);
36 | unitDict.Add("dm", ifcLength);
37 | unitDict.Add("cm", ifcLength * 10);
38 | unitDict.Add("mm", ifcLength * 100);
39 | unitDict.Add("ft", ifcLength * 0.3280839895);
40 | unitDict.Add("in", ifcLength * 3.937007874);
41 | }
42 |
43 | if(ifcUnit.Equals("cm"))
44 | {
45 | unitDict.Add("m", ifcLength / 100);
46 | unitDict.Add("dm", ifcLength / 10);
47 | unitDict.Add("cm", ifcLength);
48 | unitDict.Add("mm", ifcLength * 10);
49 | unitDict.Add("ft", ifcLength * 0.03280839895);
50 | unitDict.Add("in", ifcLength * 0.3937007874);
51 | }
52 |
53 | if(ifcUnit.Equals("mm"))
54 | {
55 | unitDict.Add("m", ifcLength / 1000);
56 | unitDict.Add("dm", ifcLength / 100);
57 | unitDict.Add("cm", ifcLength / 10);
58 | unitDict.Add("mm", ifcLength);
59 | unitDict.Add("ft", ifcLength * 0.003280839895);
60 | unitDict.Add("in", ifcLength * 0.03937007874);
61 | }
62 |
63 | if(ifcUnit.Equals("ft"))
64 | {
65 | unitDict.Add("m", ifcLength * 0.3048);
66 | unitDict.Add("dm", ifcLength * 3.048);
67 | unitDict.Add("cm", ifcLength * 30.48);
68 | unitDict.Add("mm", ifcLength * 304.8);
69 | unitDict.Add("ft", ifcLength);
70 | unitDict.Add("in", ifcLength * 12);
71 | }
72 |
73 | if(ifcUnit.Equals("in"))
74 | {
75 | unitDict.Add("m", ifcLength * 0.0254);
76 | unitDict.Add("dm", ifcLength * 0.254);
77 | unitDict.Add("cm", ifcLength * 2.54);
78 | unitDict.Add("mm", ifcLength * 25.4);
79 | unitDict.Add("ft", ifcLength / 12);
80 | unitDict.Add("in", ifcLength);
81 | }
82 |
83 | return unitDict;
84 | }
85 |
86 | //deg (dd) to deg (dms) for Level 20
87 |
88 | public double[] DDtoCompound(double angleDD)
89 | {
90 | // set decimal_degrees value here
91 | var angle = angleDD;
92 |
93 | if(angleDD < 0)
94 | {
95 | angle = angleDD * (-1);
96 | };
97 |
98 | double[] dms = new double[4];
99 |
100 | dms[0] = Math.Floor(angle);
101 | double minutes = (angle - dms[0]) * 60.0;
102 | dms[1] = Math.Floor(minutes);
103 | double seconds = (minutes - dms[1]) * 60.0;
104 | dms[2] = Math.Floor(seconds);
105 | dms[3] = Math.Round((seconds - dms[2]) * 1000000);
106 |
107 | if(angleDD < 0)
108 | {
109 | dms[0] = -dms[0];
110 | dms[1] = -dms[1];
111 | dms[2] = -dms[2];
112 | dms[3] = -dms[3];
113 | };
114 |
115 | return dms;
116 | }
117 |
118 | //deg (dms) to deg (dd) for Level 20
119 |
120 | public double DMStoDD(string angleDMS)
121 | {
122 | string[] separators = { "°", "'", "''", " ", ",", ";", "/", "|" };
123 | string[] values = angleDMS.Split(separators, StringSplitOptions.RemoveEmptyEntries);
124 |
125 | double[] ddval = new double[3];
126 |
127 | for(var i = 0; i < values.Length; i++)
128 | {
129 | ddval[i] = double.Parse(values[i]);
130 | }
131 |
132 | if(ddval[0] < 0)
133 | {
134 | ddval[1] = -ddval[1];
135 | ddval[2] = -ddval[2];
136 | }
137 |
138 | double angleDD = ddval[0] + ddval[1] / 60 + ddval[2] / 3600;
139 |
140 | return angleDD;
141 | }
142 |
143 | //rotation matrices for Level 30 and 40
144 |
145 | //rotation matrix x-axis
146 |
147 | private static Matrix3D NewRotateAroundX(double radians)
148 | {
149 | var matrix = new Matrix3D();
150 | matrix.M11 = Math.Cos(radians);
151 | matrix.M12 = Math.Sin(radians);
152 | matrix.M21 = -(Math.Sin(radians));
153 | matrix.M22 = Math.Cos(radians);
154 | matrix.M33 = 1;
155 | return matrix;
156 | }
157 |
158 | //rotation matrix z-axis
159 |
160 | private static Matrix3D NewRotateAroundZ(double radians)
161 | {
162 | var matrix = new Matrix3D();
163 | matrix.M22 = Math.Cos(radians);
164 | matrix.M23 = Math.Sin(radians);
165 | matrix.M32 = -(Math.Sin(radians));
166 | matrix.M33 = Math.Cos(radians);
167 | matrix.M11 = 1;
168 | return matrix;
169 | }
170 |
171 | //rotation calculation for Level 30, 40 and 50
172 |
173 | public Vector3D GetVector3DForXAxis(double angleX)
174 | {
175 | double rad = angleX * DegToRad;
176 |
177 | Vector3D xyz_xAxis = NewRotateAroundX(rad).Transform(xyz_xAxis_def);
178 |
179 | if(angleX >= 0 && angleX <= 90)
180 | {
181 | xyz_xAxis.X = Math.Abs(xyz_xAxis.X);
182 | xyz_xAxis.Y = -Math.Abs(xyz_xAxis.Y);
183 | }
184 |
185 | if(angleX > 90 && angleX < 180)
186 | {
187 | xyz_xAxis.X = -Math.Abs(xyz_xAxis.X);
188 | xyz_xAxis.Y = -Math.Abs(xyz_xAxis.Y);
189 | }
190 |
191 | if(angleX >= 180 && angleX < 270)
192 | {
193 | xyz_xAxis.X = -Math.Abs(xyz_xAxis.X);
194 | xyz_xAxis.Y = Math.Abs(xyz_xAxis.Y);
195 | }
196 |
197 | if(angleX >= 270 && angleX < 360)
198 | {
199 | xyz_xAxis.X = Math.Abs(xyz_xAxis.X);
200 | xyz_xAxis.Y = Math.Abs(xyz_xAxis.Y);
201 | }
202 |
203 | return xyz_xAxis;
204 | }
205 |
206 | //rotation calculation for Level 30 and 40
207 |
208 | public Vector3D GetVector3DForZAxis(double angleZ)
209 | {
210 | double rad = angleZ * DegToRad;
211 |
212 | Vector3D xyz_zAxis = NewRotateAroundZ(rad).Transform(xyz_zAxis_def);
213 |
214 | if(angleZ >= 0 && angleZ <= 90)
215 | {
216 | xyz_zAxis.X = Math.Abs(xyz_zAxis.X);
217 | xyz_zAxis.Y = -Math.Abs(xyz_zAxis.Y);
218 | }
219 | if(angleZ >= 90 && angleZ <= 180)
220 | {
221 | xyz_zAxis.X = -Math.Abs(xyz_zAxis.X);
222 | xyz_zAxis.Y = -Math.Abs(xyz_zAxis.Y);
223 | }
224 | if(angleZ >= 180 && angleZ <= 270)
225 | {
226 | xyz_zAxis.X = -Math.Abs(xyz_zAxis.X);
227 | xyz_zAxis.Y = Math.Abs(xyz_zAxis.Y);
228 | }
229 | if(angleZ >= 270 && angleZ <= 360)
230 | {
231 | xyz_zAxis.X = Math.Abs(xyz_zAxis.X);
232 | xyz_zAxis.Y = Math.Abs(xyz_zAxis.Y);
233 | }
234 | return xyz_zAxis;
235 | }
236 |
237 | //X-Axis (30,40,50)
238 |
239 | public double GetAngleBetweenForXAxis(Vector3D xyz_xAxis)
240 | {
241 | double angle = Vector3D.AngleBetween(xyz_xAxis_def, xyz_xAxis);
242 |
243 | if(xyz_xAxis.X < 0 && xyz_xAxis.Y > 0)
244 | angle = (360 - angle);
245 |
246 | if(xyz_xAxis.X >= 0 && xyz_xAxis.Y > 0)
247 | angle = (360 - angle);
248 |
249 | return angle;
250 | }
251 |
252 | //Z-Axis (30,40)
253 |
254 | public double GetAngleBetweenForZAxis(Vector3D xyz_zAxis)
255 | {
256 | double angle = Vector3D.AngleBetween(xyz_zAxis_def, xyz_zAxis);
257 |
258 | if(xyz_zAxis.Y < 0 && xyz_zAxis.Z > 0)
259 | angle = (360 - angle);
260 |
261 | if(xyz_zAxis.Y > 0 && xyz_zAxis.Z > 0)
262 | angle = (360 - angle);
263 |
264 | return angle;
265 | }
266 |
267 | public double ParseDouble(string text)
268 | {
269 | if(text.Contains(" ") == true)
270 | text = text.Replace(" ", "");
271 |
272 | if(text.Contains(",") == true)
273 | text = text.Replace(",", ".");
274 |
275 | if(double.TryParse(text, out var figure))
276 | {
277 | return figure;
278 | }
279 | else if(text == "")
280 | {
281 | return 0;
282 | }
283 | else
284 | {
285 | MessageBox.Show("Not able to parse " + text + " as double. Please change input to double.");
286 | return 0;
287 | }
288 | }
289 |
290 | public double[] ParseDoubleVector(string entry)
291 | {
292 | if(entry.Contains(" ") == true)
293 | entry = entry.Replace(" ", "");
294 |
295 | if(entry.Contains(";") == true)
296 | entry = entry.Replace(";", ",");
297 |
298 | if(entry.Contains("/") == true)
299 | entry = entry.Replace("/", ",");
300 |
301 | if(entry.Contains("|") == true)
302 | entry = entry.Replace("|", ",");
303 |
304 | char delimiter = ',';
305 |
306 | string[] vectorText = entry.Split(delimiter);
307 |
308 | double[] vector = new double[vectorText.Length];
309 |
310 | for(var i = 0; i < vector.Length - 1; i++)
311 | {
312 | vector[i] = ParseDouble(vectorText[i]);
313 | }
314 |
315 | return vector;
316 | }
317 | }
318 | }
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_v3/Appl/Calculations.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Globalization;
7 | using System.IO;
8 | using System.Reflection;
9 | using NETGeographicLib;
10 |
11 |
12 | namespace IfcGeoRefChecker.Appl
13 | {
14 | public static class Calculations
15 | {
16 | public static readonly double UtmScale = 0.9996;
17 | public static readonly double UtmFalseEasting = 500000.0;
18 | public static readonly double UtmFalseNorthing = 10000000.0;
19 |
20 | public static readonly Ellipsoid Grs80 = new Ellipsoid(Constants.GRS80.MajorRadius, Constants.GRS80.Flattening);
21 |
22 | private static readonly TransverseMercator utmGrs80 = new TransverseMercator(Grs80.MajorRadius, Grs80.Flattening, UtmScale);
23 |
24 | private static readonly string egm2008Path =
25 | Path.GetDirectoryName(Assembly.GetEntryAssembly().Location).Replace("\\", "/");
26 |
27 | private static readonly GravityModel egm2008 = new GravityModel("egm2008", egm2008Path);
28 |
29 | public static readonly double Rho = 180.0 / Math.PI;
30 |
31 | public static readonly double RevRho = Math.PI / 180.0;
32 |
33 | public static double AzimuthToRange(double azi) => ((azi % 360.0) + 360) % 360;
34 |
35 | public static int ZoneToLon0(int zone) => (6 * zone) - 183;
36 |
37 | public static int LonToZone(double lon) => ((int)Math.Floor(lon) + 186) / 6;
38 |
39 | public static double DegToRad(double deg) => deg * RevRho;
40 |
41 | public static double RadToDeg(double rad) => rad * Rho;
42 |
43 | public static string DegToString(double degreeAngle, bool dms)
44 | {
45 | if (dms)
46 | {
47 | var deg = (int)degreeAngle; //integer part
48 | var min = (int)((degreeAngle - deg) * 60);
49 | var sec = (int)((((degreeAngle - deg) * 60) - min) * 60);
50 | var frac = (int)((((((degreeAngle - deg) * 60) - min) * 60) - sec) * 1e6);
51 | return $"{deg,4:+###;-###;0}° {Math.Abs(min):00}\' {Math.Abs(sec):00}\" {Math.Abs(frac):000000}";
52 | }
53 | return degreeAngle.ToString("+0.00000000;-0.00000000;0", CultureInfo.InvariantCulture);
54 | }
55 |
56 | public static double StringToDeg(string value, bool dms)
57 | {
58 | var deg = double.NaN;
59 | if (dms)
60 | {
61 | value = value.Replace('°', ' ');
62 | value = value.Replace('\'', ' ');
63 | value = value.Replace('\"', ' ');
64 | value = value.Replace(',', ' ');
65 | value = value.Replace('.', ' ');
66 | var split = value.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
67 | if (split.Length > 0 && int.TryParse(split[0], out var x))
68 | {
69 | deg = x;
70 | var sig = (double)Math.Sign(x);
71 | if (split.Length > 1 && int.TryParse(split[1], out x))
72 | {
73 | deg += sig * x / 60.0;
74 | if (split.Length > 2 && int.TryParse(split[2], out x))
75 | {
76 | deg += sig * x / 3600.0;
77 | if (split.Length > 3 && int.TryParse(split[3], out x))
78 | {
79 | var dig = split[3].Length;
80 | var dx = sig * x / 3600.0 / Math.Pow(10, dig);
81 | deg += dx;
82 | }
83 | }
84 | }
85 |
86 | }
87 | }
88 | else
89 | {
90 | value = value.Replace(',', '.');
91 | if (double.TryParse(value, NumberStyles.Float, CultureInfo.InvariantCulture, out var x))
92 | {
93 | deg = x;
94 | }
95 | }
96 | return deg;
97 | }
98 |
99 | public static double ParseDouble(string value)
100 | {
101 | value = value.Replace(',', '.');
102 | if (double.TryParse(value, NumberStyles.Float, CultureInfo.InvariantCulture, out var x))
103 | {
104 | return x;
105 | }
106 | return double.NaN;
107 | }
108 |
109 | public static double[] AzimuthToVector(double azi)
110 | {
111 | var razi = DegToRad(azi);
112 | return new[] { Math.Cos(razi), Math.Sin(razi) };
113 | }
114 |
115 | public static double[] AzimuthToLocalVector(double azi)
116 | {
117 | var razi = DegToRad(90 - azi);
118 | return new[] { Math.Cos(razi), Math.Sin(razi) };
119 | }
120 |
121 | public static double VectorToAzimuth(double x, double y)
122 | {
123 | return AzimuthToRange(RadToDeg(Math.Atan2(y, x)));
124 | }
125 |
126 | public static double LocalVectorToAzimuth(double x, double y)
127 | {
128 | return AzimuthToRange(90 - RadToDeg(Math.Atan2(y, x)));
129 | }
130 |
131 | public static int ParseInt(string value)
132 | {
133 | if (int.TryParse(value, out var x))
134 | {
135 | return x;
136 | }
137 | return int.MaxValue;
138 | }
139 |
140 | public static string DoubleToString(double value, int dec)
141 | {
142 | var fmt = "f" + dec;
143 | return value.ToString(fmt, CultureInfo.InvariantCulture);
144 | }
145 |
146 |
147 | public static void UtmGrs80Forward(int zone, double lat, double lon, out double easting, out double northing, out double gamma, out double scale, out bool isSouth)
148 | {
149 | var lon0 = ZoneToLon0(zone);
150 | utmGrs80.Forward(lon0, lat, lon, out easting, out northing, out gamma, out scale);
151 | easting += UtmFalseEasting;
152 | isSouth = false;
153 | if (northing < 0.0)
154 | {
155 | northing += UtmFalseNorthing;
156 | isSouth = true;
157 | }
158 | }
159 |
160 | public static void UtmGrs80Reverse(int zone, bool isSouth, double easting, double northing, out double lat, out double lon, out double gamma, out double scale)
161 | {
162 | var lon0 = ZoneToLon0(zone);
163 | utmGrs80.Reverse(lon0, easting - UtmFalseEasting, isSouth ? northing - UtmFalseNorthing : northing, out lat,
164 | out lon, out gamma, out scale);
165 | }
166 |
167 | public static double GeoidHeight(double lat, double lon) => egm2008.GeoidHeight(lat, lon);
168 |
169 | public static double GaussianRadiusOfCurvature(double lat)
170 | {
171 | var sin = Math.Sin(DegToRad(lat));
172 | return Grs80.MinorRadius / (1.0 - (Grs80.EccentricitySq * sin * sin));
173 | }
174 |
175 | public static void GetGeoRef(bool isPosGeo, ref double lat, ref double lon, ref int? zone, ref double east, ref double north, ref bool isSouth,
176 | bool isEleOrtho, ref double orthoHeight, ref double ellHeight, ref double? geoidHeight,
177 | bool isRotGeo, ref double geoAzi, ref double gridAzi, out double convergence, out double convergenceApprox,
178 | out double heightScale, out double projScale, out double projScaleApprox, out double radius)
179 | {
180 | if (isPosGeo)
181 | {
182 | zone = zone ?? LonToZone(lon);
183 | UtmGrs80Forward(zone.Value, lat, lon, out east, out north, out convergence, out projScale, out isSouth);
184 | }
185 | else
186 | {
187 | zone = zone ?? int.MaxValue;
188 | UtmGrs80Reverse(zone.Value, isSouth, east, north, out lat, out lon, out convergence, out projScale);
189 | }
190 |
191 | radius = GaussianRadiusOfCurvature(lat);
192 | var lon0 = ZoneToLon0(zone.Value);
193 | var dl = lon - lon0;
194 | var eastred = east - UtmFalseEasting;
195 |
196 | projScaleApprox = UtmScale * (1.0 + ((eastred * eastred) / (2.0 * radius * radius)));
197 | convergenceApprox = RadToDeg(DegToRad(dl) * Math.Sin(DegToRad(lat))); // RadToDeg(eastred /r*Math.Tan(DegToRad(lat)));//
198 |
199 | geoidHeight = geoidHeight ?? GeoidHeight(lat, lon);
200 | if (isEleOrtho)
201 | {
202 | ellHeight = orthoHeight + geoidHeight.Value;
203 | }
204 | else
205 | {
206 | orthoHeight = ellHeight - geoidHeight.Value;
207 | }
208 | heightScale = radius / (radius + ellHeight);
209 |
210 | if (isRotGeo)
211 | {
212 | geoAzi = AzimuthToRange(geoAzi);
213 | gridAzi = AzimuthToRange(geoAzi - convergence);
214 | }
215 | else
216 | {
217 | gridAzi = AzimuthToRange(gridAzi);
218 | geoAzi = AzimuthToRange(gridAzi + convergence);
219 | }
220 | }
221 |
222 | // reduced Method to fulfill IFC requirements in GeoRefChecker
223 | public static void GetGeoRef(bool isPosGeo, ref double lat, ref double lon, ref int? zone, ref double east, ref double north, ref bool isSouth,
224 | double orthoHeight, bool isRotGeo, ref double geoAzi, ref double gridAzi, out double combinedScale)
225 | {
226 | double convergence, projScale;
227 | if (isPosGeo)
228 | {
229 | zone = zone ?? LonToZone(lon);
230 | UtmGrs80Forward(zone.Value, lat, lon, out east, out north, out convergence, out projScale, out isSouth);
231 | }
232 | else
233 | {
234 | zone = zone ?? int.MaxValue;
235 | UtmGrs80Reverse(zone.Value, isSouth, east, north, out lat, out lon, out convergence, out projScale);
236 | }
237 |
238 | var radius = GaussianRadiusOfCurvature(lat);
239 | var geoidHeight = GeoidHeight(lat, lon);
240 | var heightScale = radius / (radius + orthoHeight + geoidHeight);
241 |
242 | combinedScale = projScale * heightScale;
243 |
244 | if (isRotGeo)
245 | {
246 | geoAzi = AzimuthToRange(geoAzi);
247 | gridAzi = AzimuthToRange(geoAzi - convergence);
248 | }
249 | else
250 | {
251 | gridAzi = AzimuthToRange(gridAzi);
252 | geoAzi = AzimuthToRange(gridAzi + convergence);
253 | }
254 | }
255 |
256 |
257 | }
258 | }
259 |
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_v3/Appl/Level10.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace IfcGeoRefChecker.Appl
5 | {
6 | public class Level10 : IEquatable
7 | {
8 | public bool GeoRef10 { get; set; }
9 |
10 | public IList Reference_Object { get; set; } = new List();
11 |
12 | public IList Instance_Object { get; set; } = new List();
13 |
14 | public List AddressLines { get; set; } = new List();
15 |
16 | public string Postalcode { get; set; }
17 |
18 | public string Town { get; set; }
19 |
20 | public string Region { get; set; }
21 |
22 | public string Country { get; set; }
23 |
24 | public bool Equals(Level10 other)
25 | {
26 | if(other == null)
27 | return false;
28 |
29 | var a = AddressLines.Count;
30 | var b = other.AddressLines.Count;
31 | if(a == b)
32 | {
33 | for(int i = 0; i < a; i++)
34 | {
35 | if(!string.Equals(AddressLines[i], other.AddressLines[i]))
36 | {
37 | return false;
38 | }
39 | }
40 | }
41 | else
42 | {
43 | return false;
44 | }
45 | if(string.Equals(Postalcode, other.Postalcode) &&
46 | string.Equals(Town, other.Town) &&
47 | string.Equals(Region, other.Region) &&
48 | string.Equals(Country, other.Country))
49 | {
50 | return true;
51 | }
52 | else
53 | {
54 | return false;
55 | }
56 | }
57 | }
58 | }
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_v3/Appl/Level20.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace IfcGeoRefChecker.Appl
5 | {
6 | public class Level20 : IEquatable
7 | {
8 | public bool GeoRef20 { get; set; }
9 |
10 | public IList Reference_Object { get; set; } = new List();
11 |
12 | public double? Latitude { get; set; }
13 |
14 | public double? Longitude { get; set; }
15 |
16 | public double? Elevation { get; set; }
17 |
18 | public bool Equals(Level20 other)
19 | {
20 | if(other == null)
21 | return false;
22 | if(Latitude == other.Latitude &&
23 | Longitude == other.Longitude &&
24 | Elevation == other.Elevation)
25 | {
26 | return true;
27 | }
28 | else
29 | {
30 | return false;
31 | }
32 | }
33 | }
34 | }
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_v3/Appl/Level30.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace IfcGeoRefChecker.Appl
5 | {
6 | public class Level30 : IEquatable
7 | {
8 | public bool GeoRef30 { get; set; }
9 |
10 | public IList Reference_Object { get; set; } = new List();
11 |
12 | public IList Instance_Object { get; set; } = new List();
13 |
14 | public IList ObjectLocationXYZ { get; set; } = new List();
15 |
16 | public IList ObjectRotationX { get; set; } = new List();
17 |
18 | public IList ObjectRotationZ { get; set; } = new List();
19 |
20 | public bool Equals(Level30 other)
21 | {
22 | if(other == null)
23 | return false;
24 | if(ObjectLocationXYZ[0] == other.ObjectLocationXYZ[0] &&
25 | ObjectLocationXYZ[1] == other.ObjectLocationXYZ[1] &&
26 | ObjectLocationXYZ[2] == other.ObjectLocationXYZ[2] &&
27 | ObjectRotationX[0] == other.ObjectRotationX[0] &&
28 | ObjectRotationX[1] == other.ObjectRotationX[1] &&
29 | ObjectRotationX[2] == other.ObjectRotationX[2] &&
30 | ObjectRotationZ[0] == other.ObjectRotationZ[0] &&
31 | ObjectRotationZ[1] == other.ObjectRotationZ[1] &&
32 | ObjectRotationZ[2] == other.ObjectRotationZ[2])
33 |
34 | {
35 | return true;
36 | }
37 | else
38 | {
39 | return false;
40 | }
41 | }
42 | }
43 | }
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_v3/Appl/Level40.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace IfcGeoRefChecker.Appl
5 | {
6 | public class Level40 : IEquatable
7 | {
8 | public bool GeoRef40 { get; set; }
9 |
10 | public IList Reference_Object { get; set; } = new List();
11 |
12 | public IList Instance_Object { get; set; } = new List();
13 |
14 | public IList ProjectLocation { get; set; } = new List();
15 |
16 | public IList ProjectRotationX { get; set; } = new List();
17 |
18 | public IList ProjectRotationZ { get; set; } = new List();
19 |
20 | public IList TrueNorthXY { get; set; } = new List();
21 |
22 | public bool Equals(Level40 other)
23 | {
24 | if(other == null)
25 | return false;
26 | if(ProjectLocation[0] == other.ProjectLocation[0] &&
27 | ProjectLocation[1] == other.ProjectLocation[1] &&
28 | ProjectLocation[2] == other.ProjectLocation[2] &&
29 | ProjectRotationX[0] == other.ProjectRotationX[0] &&
30 | ProjectRotationX[1] == other.ProjectRotationX[1] &&
31 | ProjectRotationX[2] == other.ProjectRotationX[2] &&
32 | ProjectRotationZ[0] == other.ProjectRotationZ[0] &&
33 | ProjectRotationZ[1] == other.ProjectRotationZ[1] &&
34 | ProjectRotationZ[2] == other.ProjectRotationZ[2] &&
35 | TrueNorthXY[0] == other.TrueNorthXY[0] &&
36 | TrueNorthXY[1] == other.TrueNorthXY[1])
37 |
38 | {
39 | return true;
40 | }
41 | else
42 | {
43 | return false;
44 | }
45 | }
46 | }
47 | }
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_v3/Appl/Level50.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace IfcGeoRefChecker.Appl
5 | {
6 | public class Level50 : IEquatable
7 | {
8 | public bool GeoRef50 { get; set; }
9 |
10 | public IList Reference_Object { get; set; } = new List();
11 |
12 | public IList Instance_Object { get; set; } = new List();
13 |
14 | public double Translation_Eastings { get; set; }
15 |
16 | public double Translation_Northings { get; set; }
17 |
18 | public double Translation_Orth_Height { get; set; }
19 |
20 | public IList RotationXY { get; set; } /*= new List() { 0, 1 };*/
21 |
22 | public double Scale { get; set; }
23 |
24 | public string CRS_Name { get; set; } = "n/a";
25 |
26 | public string CRS_Description { get; set; } = "n/a";
27 |
28 | public string CRS_Geodetic_Datum { get; set; } = "n/a";
29 |
30 | public string CRS_Vertical_Datum { get; set; } = "n/a";
31 |
32 | public string CRS_Projection_Name { get; set; } = "n/a";
33 |
34 | public string CRS_Projection_Zone { get; set; } = "n/a";
35 |
36 | public bool Equals(Level50 other)
37 | {
38 | if(other == null)
39 | return false;
40 | if(Translation_Eastings == other.Translation_Eastings &&
41 | Translation_Northings == other.Translation_Northings &&
42 | Translation_Orth_Height == other.Translation_Orth_Height &&
43 | Scale == other.Scale &&
44 | string.Equals(CRS_Name, other.CRS_Name) &&
45 | string.Equals(CRS_Description, other.CRS_Description) &&
46 | string.Equals(CRS_Geodetic_Datum, other.CRS_Geodetic_Datum) &&
47 | string.Equals(CRS_Vertical_Datum, other.CRS_Vertical_Datum) &&
48 | string.Equals(CRS_Projection_Name, other.CRS_Projection_Name) &&
49 | string.Equals(CRS_Projection_Zone, other.CRS_Projection_Zone))
50 | {
51 | if(RotationXY == null && other.RotationXY == null) //in beiden Rotation nicht gesetzt --> Rotation ist gleich (null) --> true
52 | {
53 | return true;
54 | }
55 | else if(RotationXY == null || other.RotationXY == null) //in einem der beiden Rotation nicht gesetzt --> Rotation ist ungleich (null) --> false
56 | {
57 | return false;
58 | }
59 | else if(RotationXY[0] == other.RotationXY[0] && RotationXY[1] == other.RotationXY[1])
60 | { //NULL-prüfung bestanden --> Untersuchung der Werte --> beide gleich --> true
61 | return true;
62 | }
63 | else
64 | return false; //wenn Werte nicht gleich --> false
65 | }
66 | else
67 | {
68 | return false;
69 | }
70 | }
71 | }
72 | }
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_v3/Appl/PlacementXYZ.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using Xbim.Ifc4.Interfaces;
3 |
4 | namespace IfcGeoRefChecker.Appl
5 | {
6 | internal class PlacementXYZ
7 | {
8 | public IList LocationXYZ { get; set; }
9 |
10 | public IList RotationX { get; set; }
11 |
12 | public IList RotationZ { get; set; }
13 |
14 | public bool GeoRefPlcm { get; set; }
15 |
16 | //private IIfcAxis2Placement3D plcm3D;
17 | //private IIfcAxis2Placement2D plcm2D;
18 |
19 | public PlacementXYZ(IIfcAxis2Placement plcm)
20 | {
21 | if(plcm is IIfcAxis2Placement3D)
22 | {
23 | var plcm3D = (IIfcAxis2Placement3D)plcm;
24 |
25 | this.LocationXYZ = new List //must be given, if IfcAxis2Placment3D exists
26 | {
27 | plcm3D.Location.X,
28 | plcm3D.Location.Y,
29 | plcm3D.Location.Z,
30 | };
31 |
32 | this.RotationX = new List();
33 |
34 | if(plcm3D.RefDirection != null)
35 |
36 | {
37 | this.RotationX.Add(plcm3D.RefDirection.DirectionRatios[0]);
38 | this.RotationX.Add(plcm3D.RefDirection.DirectionRatios[1]);
39 | this.RotationX.Add(plcm3D.RefDirection.DirectionRatios[2]);
40 | }
41 | else //if omitted, default values (see IFC schema for IfcAxis2Placment3D)
42 | {
43 | this.RotationX.Add(1);
44 | this.RotationX.Add(0);
45 | this.RotationX.Add(0);
46 | }
47 |
48 | this.RotationZ = new List();
49 |
50 | if(plcm3D.Axis != null)
51 |
52 | {
53 | this.RotationZ.Add(plcm3D.Axis.DirectionRatios[0]);
54 | this.RotationZ.Add(plcm3D.Axis.DirectionRatios[1]);
55 | this.RotationZ.Add(plcm3D.Axis.DirectionRatios[2]);
56 | }
57 | else //if omitted, default values (see IFC schema for IfcAxis2Placment3D)
58 | {
59 | this.RotationZ.Add(0);
60 | this.RotationZ.Add(0);
61 | this.RotationZ.Add(1);
62 | }
63 |
64 | if((plcm3D.Location.X > 0) || (plcm3D.Location.Y > 0) || (plcm3D.Location.Z > 0))
65 | {
66 | //by definition: ONLY in this case there could be an georeferencing
67 | this.GeoRefPlcm = true;
68 | }
69 | else
70 | {
71 | this.GeoRefPlcm = false;
72 | }
73 | }
74 |
75 | if(plcm is IIfcAxis2Placement2D)
76 | {
77 | var plcm2D = (IIfcAxis2Placement2D)plcm;
78 |
79 | this.LocationXYZ = new List //must be given, if IfcAxis2Placment2D exists
80 | {
81 | plcm2D.Location.X,
82 | plcm2D.Location.Y,
83 | };
84 |
85 | this.RotationX = new List();
86 |
87 | if(plcm2D.RefDirection != null)
88 |
89 | {
90 | this.RotationX.Add(plcm2D.RefDirection.DirectionRatios[0]);
91 | this.RotationX.Add(plcm2D.RefDirection.DirectionRatios[1]);
92 | }
93 | else //if omitted, default values (see IFC schema for IfcAxis2Placment2D)
94 | {
95 | this.RotationX.Add(1);
96 | this.RotationX.Add(0);
97 | }
98 |
99 | if((plcm2D.Location.X > 0) || (plcm2D.Location.Y > 0))
100 | {
101 | //by definition: ONLY in this case there could be an georeferencing
102 | this.GeoRefPlcm = true;
103 | }
104 | else
105 | {
106 | this.GeoRefPlcm = false;
107 | }
108 | }
109 | }
110 | }
111 | }
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_v3/BimGisCad.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dd-bim/IfcGeoRef/a501534ada7b64c33774bb560d9e09ee08e12886/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_v3/BimGisCad.dll
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_v3/Geographic.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dd-bim/IfcGeoRef/a501534ada7b64c33774bb560d9e09ee08e12886/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_v3/Geographic.dll
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_v3/IO/IfcImport.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.IO;
3 | using System.Linq;
4 | using System.Windows;
5 | using System.Windows.Input;
6 | using IfcGeometryExtractor;
7 | using Serilog;
8 | using Xbim.Ifc;
9 | using Xbim.Ifc4.Interfaces;
10 |
11 | namespace IfcGeoRefChecker.IO
12 | {
13 | public class IfcImport
14 | {
15 | public Dictionary CheckObjs { get; set; } = new Dictionary();
16 | public Dictionary> GroundWallObjects { get; set; } = new Dictionary>();
17 | public Dictionary NamePathDict { get; set; } = new Dictionary();
18 |
19 | //private string fileName;
20 |
21 | public IfcImport(string direc)
22 | {
23 | try
24 | {
25 | Log.Information("Start of file import.");
26 |
27 | var fd = new Microsoft.Win32.OpenFileDialog();
28 |
29 | fd.InitialDirectory = direc;
30 | fd.Filter = "IFC-files (*.ifc)|*.ifc|All Files (*.*)|*.*";
31 | fd.Multiselect = true;
32 |
33 | fd.ShowDialog();
34 |
35 | Log.Debug("Selected files for Import: " + fd.FileNames.Length);
36 |
37 | Mouse.OverrideCursor = Cursors.Wait;
38 |
39 | try
40 | {
41 | for(int i = 0; i < fd.FileNames.Length; i++)
42 | {
43 | importProcess(fd.FileNames[i]);
44 | }
45 | }
46 | finally
47 | {
48 | Mouse.OverrideCursor = null;
49 | }
50 | }
51 | catch(IOException exIO)
52 | {
53 | Log.Error("Not able to open file dialog. Error: " + exIO);
54 | MessageBox.Show("Not able to open file dialog. Error: " + exIO);
55 | }
56 | }
57 |
58 | public IfcImport(InputGroup iGroup)
59 | {
60 | for(int i = 0; i < iGroup.InputObjects.Count; i++)
61 | {
62 | importProcess(iGroup.InputObjects[i].Filename);
63 | }
64 | }
65 |
66 | private void importProcess(string filename)
67 | {
68 | var filePath = Path.ChangeExtension(filename, null);
69 | var fileExtensionless = Path.GetFileNameWithoutExtension(filename);
70 |
71 | try
72 | {
73 | Log.Information("Import of " + filename);
74 |
75 | using (var model = IfcStore.Open(filename))
76 | {
77 | Log.Information("Start GeoRef-Check for " + filename);
78 |
79 | this.NamePathDict.Add(fileExtensionless, filePath);
80 |
81 | var checkObj = new Appl.GeoRefChecker(model);
82 | this.CheckObjs.Add(fileExtensionless, checkObj);
83 |
84 | Log.Information("Start calculating of ground floor walls for " + filename);
85 |
86 | var reader = new IfcReader(model);
87 | var bldg = reader.BldgReader();
88 |
89 | var calc = new Calculation();
90 | var elems = new List();
91 | try
92 | {
93 | var ifc = new Extraction(model);
94 | //Extrahiere alle Slabs, die im (vermutlich) Erdgeschoss liegen
95 | var slabs = ifc.GetSlabsOnGround();
96 |
97 | //-------------------------------------
98 | //Untersuchung der in IFC-Datei vorhandenen Geometrie-Repräsentationen für die slabs
99 | //wenn einer der GeometrieTypen je Slab unterstützt wird, werden slabs berechnet
100 | //wenn nicht, werden die Wände untersucht --> diese sollten je Wand mindestens eine unterstützte Axis-Geometrie enthalten
101 | //wenn weder Slabs noch Walls vorhanden sind, untersuche IFC auf Proxys
102 | if (slabs.Any() && calc.CompareSupportedRepTypes(slabs))
103 | {
104 | elems = slabs.ToList();
105 | }
106 | else
107 | {
108 | var walls = ifc.GetWallsOnGround();
109 |
110 | if (walls.Any() && calc.CompareSupportedRepTypes(walls))
111 | {
112 | elems = walls.ToList();
113 | }
114 | else
115 | {
116 | elems = ifc.GetProxysOnGround().ToList();
117 | }
118 | }
119 | this.GroundWallObjects.Add(fileExtensionless, elems);
120 | }
121 | catch (System.Exception ex)
122 | {
123 | MessageBox.Show("No building elements found. Trying to proceed without. Problem:" + ex);
124 | }
125 |
126 | }
127 | }
128 | catch (FileLoadException exL)
129 | {
130 | var exStr = "Import of " + filename + " failed. Error: " + exL.Message;
131 |
132 | Log.Error(exStr);
133 | MessageBox.Show(exStr);
134 | Log.Information(filename + " will be ignored.");
135 | }
136 | }
137 | }
138 | }
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_v3/IO/IfcReader.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Linq;
3 | using Serilog;
4 | using Xbim.Ifc;
5 | using Xbim.Ifc4.Interfaces;
6 |
7 | namespace IfcGeoRefChecker.IO
8 | {
9 | public class IfcReader
10 | {
11 | private IfcStore model;
12 |
13 | ///
14 | /// Initialized IfcReader with Xbim IfcStore
15 | ///
16 | public IfcReader(IfcStore model)
17 | {
18 | this.model = model;
19 |
20 | Log.Information("IFC reader initialized...");
21 | }
22 |
23 | ///
24 | /// Returns the first IfcProject entity.
25 | /// Valid files should only contain one IfcProject.
26 | ///
27 | public IIfcProject ProjReader()
28 | {
29 | var res = model.Instances.OfType().ToList();
30 |
31 | Log.Information("IFC reader: Projects found = " + res.Count);
32 |
33 | if(res.Count == 0)
34 | Log.Error("IFC reader: No IfcProject present. IFC file is NOT valid.");
35 |
36 | if(res.Count > 1)
37 | Log.Error("IFC reader: More than one IfcProject present. IFC file is NOT valid.");
38 |
39 | return res.FirstOrDefault();
40 | }
41 |
42 | ///
43 | /// Returns the first IfcSite entity.
44 | /// Files according IFC implementers agreements should contain only one IfcSite.
45 | ///
46 | public IIfcSite SiteReader()
47 | {
48 | var res = model.Instances.OfType().ToList();
49 |
50 | Log.Information("IFC reader: Sites found = " + res.Count);
51 |
52 | if(res.Count == 0)
53 | Log.Warning("IFC reader: No IfcSite present. IFC file is valid but violated implementation agreements. Some LoGeoRef could not be checked.");
54 |
55 | if(res.Count > 1)
56 | Log.Warning("IFC reader: More than one IfcSite present. This application supports currently only one (the first) site.");
57 |
58 | return res.FirstOrDefault();
59 | }
60 |
61 | ///
62 | /// Returns the first IfcBuilding entity.
63 | /// More than one IfcBuilding in one file is not in scope yet.
64 | ///
65 | public IIfcBuilding BldgReader()
66 | {
67 | var res = model.Instances.OfType().ToList();
68 |
69 | Log.Information("IFC reader: Buildings found = " + res.Count());
70 |
71 | if(res.Count == 0)
72 | Log.Error("IFC reader: No IfcBuilding present. IFC file is valid but violated implementation agreements.");
73 |
74 | if(res.Count > 1)
75 | Log.Warning("IFC reader: More than one IfcBuilding present. This application supports currently only one (the first) building.");
76 |
77 | return res.FirstOrDefault();
78 | }
79 |
80 | ///
81 | /// Returns a list of IfcGeometricRepresentationContext entities.
82 | /// Valid IFC-files should contain at least one context for model view.
83 | /// Optionally there could be another context for plan view.
84 | ///
85 | public List ContextReader(IIfcProject proj)
86 | {
87 | var allCtx = proj.RepresentationContexts.OfType(); //includes also inherited SubContexts (not necessary for this application)
88 |
89 | var noSubCtx = allCtx.Where(ctx => ctx.ExpressType.ToString() != "IfcGeometricRepresentationSubContext").ToList(); //avoid subs (unneccessary overhead)
90 |
91 | Log.Information("IFC reader: GeometricRepresentationContext found = " + noSubCtx.Count());
92 |
93 | if(noSubCtx.Count == 0)
94 | Log.Error("IFC reader: No IfcGeometricRepresentationContext present. IFC file is NOT valid.");
95 |
96 | if(noSubCtx.Count > 2)
97 | Log.Error("IFC reader: More than two IfcGeometricRepresentationContext present. IFC file is NOT valid.");
98 |
99 | return noSubCtx;
100 | }
101 |
102 | ///
103 | /// Returns the first IfcMapConversion entity which is connected to the project`s context.
104 | /// Valid IFC-files reference only one such IfcMapConversion.
105 | ///
106 | public IIfcMapConversion MapReader(IIfcGeometricRepresentationContext ctx)
107 | {
108 | var map = model.Instances.OfType().Where(m => m.SourceCRS == ctx).ToList();
109 |
110 | Log.Information("IFC reader: MapConversion with connection to project found = " + map.Count());
111 |
112 | if(map.Count > 1)
113 | Log.Error("IFC reader: More than one IfcMapConversion connected to IfcProject present. IFC file is valid but violated implementation agreements.");
114 |
115 | return map.FirstOrDefault();
116 | }
117 |
118 | ///
119 | /// Returns the first IfcPropertySet with "ProjectedCRS" in its name.
120 | /// If applied, there should be only one such entity.
121 | ///
122 | public IIfcPropertySet PSetReaderCRS()
123 | {
124 | var pset = model.Instances.OfType()
125 | .Where(p => p.Name.ToString().Contains("ProjectedCRS")).ToList();
126 |
127 | Log.Information("IFC reader: PsetCRS found = " + pset.Count);
128 |
129 | if(pset.Count > 1)
130 | Log.Warning("IFC reader: More than one PropertySet for ProjectedCRS present. IFC file is valid but information could be redundant.");
131 |
132 | return pset.FirstOrDefault();
133 | }
134 |
135 | ///
136 | /// Returns the first IfcPropertySet with "MapConversion" in its name.
137 | /// If applied, there should be only one such entity.
138 | ///
139 | public IIfcPropertySet PSetReaderMap()
140 | {
141 | var pset = model.Instances.OfType()
142 | .Where(p => p.Name.ToString().Contains("MapConversion")).ToList();
143 |
144 | Log.Information("IFC reader: PsetMapConversion found = " + pset.Count());
145 |
146 | if(pset.Count > 1)
147 | Log.Warning("IFC reader: More than one PropertySet for MapConversion present. IFC file is valid but information could be redundant.");
148 |
149 | return pset.FirstOrDefault();
150 | }
151 |
152 | ///
153 | /// Returns the Project Length Unit associsated to the projects unit assignment (sholud be one for valid file)
154 | ///
155 | public string LengthUnitReader()
156 | {
157 | try
158 | {
159 | var unit = model.Instances.OfType().Select(u => u.Units).First().OfType()
160 | .Where(s => s.UnitType.ToString().Equals("LENGTHUNIT")).Select(un => un.Symbol).Single();
161 |
162 | Log.Information("IFC Reader: LengthUnit = " + unit);
163 |
164 | return unit;
165 | }
166 | catch
167 | {
168 | Log.Error("IFC Reader: no or more than one LengthUnit was found. IFC-file is NOT valid. Return metre as unit.");
169 | return "m";
170 | }
171 | }
172 |
173 | ///
174 | /// Returns a list of from IfcProduct inherited entities with global placement.
175 | /// Valid IFC-files should contain at least one, the IfcSite entity.
176 | ///
177 | public List UpperPlcmProdReader()
178 | {
179 | var res = model.Instances.Where(e => e.PlacementRelTo == null)
180 | .SelectMany(e => e.PlacesObject).ToList();
181 |
182 | Log.Information("IFC reader: Objects with global placement found = " + res.Count());
183 |
184 | if(res.Count == 0)
185 | Log.Error("IFC reader: No products with global placement present. IFC file is NOT valid.");
186 |
187 | return res;
188 | }
189 |
190 | /////
191 | ///// Reads walls and calculates ground floor walls out of building and building storey height attributes
192 | /////
193 | //public IEnumerable GroundFloorWallReader(IIfcBuilding bldg)
194 | //{
195 | // Log.Information("IFC reader: Ground floor wall detecting...");
196 |
197 | // var bldgRefHeight = (bldg.ElevationOfRefHeight != null) ? (double)bldg.ElevationOfRefHeight : 0.0; //Selektion BuildingRefHeight (wenn NULL -> 0.0)
198 |
199 | // Log.Information("IFC reader: Building Ref Height = " + bldgRefHeight);
200 |
201 | // var storeys = bldg.BuildingStoreys; //alle Stockwerke
202 |
203 | // Log.Information("IFC reader: Number of Building storeys = " + storeys.Count());
204 |
205 | // var dictStorey = new Dictionary();
206 |
207 | // foreach(var storey in storeys)
208 | // {
209 | // var delta = Math.Abs(bldgRefHeight - (double)storey.Elevation);
210 |
211 | // dictStorey.Add(storey, delta); //für jedes Stockwerk Differenz zur BuildingrefHeight ermitteln
212 |
213 | // Log.Information("IFC reader: Height difference between storey and Building Ref Height = " + delta);
214 | // }
215 |
216 | // var minVal = dictStorey.Values.Min();
217 | // var groundStorey = dictStorey.Where(s => s.Value == minVal).Select(s => s.Key).FirstOrDefault(); //Auswahl Stockwerk, wo Differenz minimal ist (mutmaßlich Erdgeschoss)
218 |
219 | // var walls = model.Instances.OfType() //Selektion aller IfcWalls im Erdgeschoss
220 | // .Where(s => s is IIfcWall /*|| s is IIfcCurtainWall*/) //TO DO: IfcCurtainWall berücksichtigen (besteht im Bsp Burogebäude aus IfcPlate....)
221 | // .Where(b => b.IsContainedIn == groundStorey); //evtl. TO DO: IfcWall-Objekte im Außenbereich ausschließen?
222 |
223 | // Log.Information("IFC reader: Ground floor walls found = " + walls.Count());
224 |
225 | // return walls;
226 | //}
227 | }
228 | }
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_v3/IO/InputGroup.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace IfcGeoRefChecker.IO
8 | {
9 | public class InputGroup
10 | {
11 | public List InputObjects { get; set; }
12 | public string outputDirectory { get; set; }
13 | public bool outJson { get; set; }
14 | public bool outLog { get; set; }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_v3/IO/JsonInput.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace IfcGeoRefChecker.IO
8 | {
9 | public class JsonInput
10 | {
11 | public string Filename { get; set; }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_v3/IO/JsonOutput.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 | using System.Windows;
4 | using Newtonsoft.Json;
5 | using Serilog;
6 |
7 | namespace IfcGeoRefChecker.IO
8 | {
9 | public class JsonOutput
10 | {
11 | public void JsonOutputFile(Appl.GeoRefChecker checkObj, string file)
12 | {
13 | var jsonObj = JsonConvert.SerializeObject(checkObj, Formatting.Indented);
14 |
15 | using(var writeJson = File.CreateText((/*direc + "\\" + */file + ".json")))
16 | {
17 | try
18 | {
19 | writeJson.WriteLine(jsonObj);
20 |
21 | Log.Information("JSON-file successfully exported.");
22 | }
23 |
24 | catch(Exception ex)
25 | {
26 | var str = $"Error occured while writing JSON-file. \r\n Message: {ex.Message}";
27 |
28 | Log.Error(str);
29 | MessageBox.Show(str);
30 | }
31 | }
32 | }
33 |
34 | public void JsonOutputDialog(Appl.GeoRefChecker checkObj, string filePath, string fileName)
35 | {
36 | var jsonObj = JsonConvert.SerializeObject(checkObj, Formatting.Indented);
37 |
38 | try
39 | {
40 | var saveFileDialog1 = new Microsoft.Win32.SaveFileDialog();
41 |
42 | saveFileDialog1.InitialDirectory = filePath; //Pfad, der zunächst angeboten wird
43 | saveFileDialog1.DefaultExt = "json";
44 | saveFileDialog1.Filter = "json files (*.json)|*.json";
45 | saveFileDialog1.FilterIndex = 1;
46 | saveFileDialog1.Title = "Save json file with building perimeter (WKTRep-Attribute)";
47 | saveFileDialog1.RestoreDirectory = true;
48 | saveFileDialog1.FileName = fileName + "_WKT.json";
49 | saveFileDialog1.ShowDialog();
50 |
51 | var text = saveFileDialog1.FileName;
52 |
53 | using(StreamWriter sw = new StreamWriter(text))
54 | sw.WriteLine(jsonObj);
55 | }
56 | catch(Exception ex)
57 | {
58 | var str = $"Error occured while writing JSON-file. \r\n Message: {ex.Message}";
59 |
60 | Log.Error(str);
61 | MessageBox.Show(str);
62 | }
63 | }
64 | }
65 | }
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_v3/IO/LogOutput.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Globalization;
3 | using System.IO;
4 | using System.Threading;
5 | using System.Windows;
6 | using Serilog;
7 |
8 | namespace IfcGeoRefChecker.IO
9 | {
10 | public class LogOutput
11 | {
12 | public LogOutput(Appl.GeoRefChecker checkObj, string fileDirec, string file)
13 | {
14 | Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
15 |
16 | string dashline = "\r\n----------------------------------------------------------------------------------------------------------------------------------------";
17 | var headline = $"\r\nExamination of {file}.ifc regarding georeferencing content ({DateTime.Now.ToShortDateString()}, {DateTime.Now.ToLongTimeString()})" + dashline + dashline + "\r\n";
18 |
19 | using(var writeLog = File.CreateText((fileDirec + ".txt")))
20 | {
21 | try
22 | {
23 | writeLog.WriteLine(headline);
24 | writeLog.WriteLine("IfcVersion: " + checkObj.IFCSchema);
25 | writeLog.WriteLine("LengthUnit: " + checkObj.LengthUnit);
26 |
27 | foreach (var lev in checkObj.LoGeoRef10)
28 | {
29 | writeLog.WriteLine(LogLevel10(lev));
30 | }
31 |
32 | foreach (var lev in checkObj.LoGeoRef20)
33 | {
34 | writeLog.WriteLine(LogLevel20(lev));
35 | }
36 |
37 | foreach(var lev in checkObj.LoGeoRef30)
38 | {
39 | writeLog.WriteLine(LogLevel30(lev));
40 | }
41 |
42 | foreach(var lev in checkObj.LoGeoRef40)
43 | {
44 | writeLog.WriteLine(LogLevel40(lev));
45 | }
46 |
47 | foreach(var lev in checkObj.LoGeoRef50)
48 | {
49 | writeLog.WriteLine(LogLevel50(lev));
50 | }
51 |
52 | Log.Information("GeoRef Log-file successfully exported.");
53 | }
54 |
55 | catch(Exception ex)
56 | {
57 | var str = $"Error occured while writing Logfile. \r\n Message: {ex.Message}";
58 |
59 | Log.Error(str);
60 | MessageBox.Show(str);
61 | }
62 | };
63 | }
64 |
65 | public string LogLevel10(Appl.Level10 lev)
66 | {
67 | string logLevel10 = "";
68 | string line = "\r\n________________________________________________________________________________________________________________________________________";
69 | string dashline = "\r\n----------------------------------------------------------------------------------------------------------------------------------------";
70 |
71 | logLevel10 += "Existing addresses referenced by IfcSite or IfcBuilding" + dashline + "\r\n";
72 |
73 | if(lev.Instance_Object.Count == 0)
74 |
75 | {
76 | //logLevel10 += "\r\n " + lev.Reference_Object[0] + "=" + lev.Reference_Object[1] + " references no address.";
77 | logLevel10 += "\r\n " + " references no address.";
78 | }
79 | else
80 | {
81 | logLevel10 += "Found address referenced by " + lev.Reference_Object[0] + "=" + lev.Reference_Object[1] + ":\r\n" + lev.Instance_Object[0] + "=" + lev.Instance_Object[1] + "\r\n Address: \r\n";
82 |
83 | foreach(var a in lev.AddressLines)
84 | {
85 | logLevel10 += a;
86 | }
87 |
88 | logLevel10 += "\r\n Postal code: " + lev.Postalcode + "\r\n Town: " + lev.Town + "\r\n Region: " + lev.Region + "\r\n Country: " + lev.Country;
89 | }
90 |
91 | logLevel10 += "\r\n \r\n LoGeoRef 10 = " + lev.GeoRef10 + line;
92 |
93 | return logLevel10;
94 | }
95 |
96 | public string LogLevel20(Appl.Level20 lev)
97 |
98 | {
99 | string logLevel20 = "";
100 | string line = "\r\n________________________________________________________________________________________________________________________________________";
101 | string dashline = "\r\n----------------------------------------------------------------------------------------------------------------------------------------";
102 |
103 | logLevel20 += "\r\n \r\nGeographic coordinates referenced by IfcSite (Latitude / Longitude / Elevation)" + dashline + "\r\n";
104 |
105 | if((lev.Longitude == null) || (lev.Latitude == null))
106 | {
107 | logLevel20 += "\r\n " + lev.Reference_Object[0] + "=" + lev.Reference_Object[1] + " has no geographic coordinates.";
108 | }
109 | else
110 | {
111 | logLevel20 += "Referenced in " + lev.Reference_Object[0] + "=" + lev.Reference_Object[1] + ":\r\n Latitude: " + lev.Latitude + "\r\n Longitude: " + lev.Longitude;
112 | }
113 |
114 | if(lev.Elevation == null)
115 | {
116 | logLevel20 += "\r\n " + lev.Reference_Object[0] + "=" + lev.Reference_Object[1] + " has no Elevation.";
117 | }
118 | else
119 | {
120 | logLevel20 += "\r\n Elevation: " + lev.Elevation;
121 | }
122 |
123 | logLevel20 += "\r\n \r\n LoGeoRef 20 = " + lev.GeoRef20 + line;
124 |
125 | return logLevel20;
126 | }
127 |
128 | public string LogLevel30(Appl.Level30 lev)
129 |
130 | {
131 | string logLevel30 = "";
132 | string line = "\r\n________________________________________________________________________________________________________________________________________";
133 | string dashline = "\r\n----------------------------------------------------------------------------------------------------------------------------------------";
134 |
135 | logLevel30 += "\r\n \r\nLocal placement for uppermost Elements (usually an instance of IfcSite or IfcBuilding)"
136 | + "\r\nThe placement of those elements is only relative to the WorldCoordinateSystem (see LoGeoRef 40) but not to other IFC-Elements"
137 | + dashline
138 | + "\r\n Referencing Element:" + lev.Reference_Object[0] + "=" + lev.Reference_Object[1]
139 | + "\r\n Placement referenced in " + lev.Instance_Object[0] + "=" + lev.Instance_Object[1];
140 |
141 | logLevel30 += "\r\n X = " + lev.ObjectLocationXYZ[0] + "\r\n Y = " + lev.ObjectLocationXYZ[1] + "\r\n Z = " + lev.ObjectLocationXYZ[2];
142 |
143 | logLevel30 += $"\r\n Rotation X-axis = ({lev.ObjectRotationX[0]}/{lev.ObjectRotationX[1]}/{lev.ObjectRotationX[2]})";
144 |
145 | logLevel30 += $"\r\n Rotation Z-axis = ({lev.ObjectRotationZ[0]}/{lev.ObjectRotationZ[1]}/{lev.ObjectRotationZ[2]})";
146 |
147 | logLevel30 += "\r\n \r\n LoGeoRef 30 = " + lev.GeoRef30 + "\r\n" + line;
148 |
149 | return logLevel30;
150 | }
151 |
152 | public string LogLevel40(Appl.Level40 lev)
153 |
154 | {
155 | string logLevel40 = "";
156 | string line = "\r\n________________________________________________________________________________________________________________________________________";
157 | string dashline = "\r\n----------------------------------------------------------------------------------------------------------------------------------------";
158 |
159 | logLevel40 += "\r\n \r\nProject context attributes for georeferencing (Location: WorldCoordinateSystem / Rotation: TrueNorth)"
160 | + dashline + "\r\n Project:" + lev.Reference_Object[0] + "=" + lev.Reference_Object[1]
161 | + "\r\n Project context element: " + lev.Instance_Object[0] + "=" + lev.Instance_Object[1];
162 |
163 | logLevel40 += "\r\n X = " + lev.ProjectLocation[0] + "\r\n Y = " + lev.ProjectLocation[1] + "\r\n Z = " + lev.ProjectLocation[2];
164 | logLevel40 += $"\r\n Rotation X-axis = ({lev.ProjectRotationX[0]}/{lev.ProjectRotationX[1]}/{lev.ProjectRotationX[2]})";
165 | logLevel40 += $"\r\n Rotation Z-axis = ({lev.ProjectRotationZ[0]}/{lev.ProjectRotationZ[1]}/{lev.ProjectRotationZ[2]})";
166 |
167 | logLevel40 += "\r\n \r\n True North:"
168 | + "\r\n X-component =" + lev.TrueNorthXY[0]
169 | + "\r\n Y-component =" + lev.TrueNorthXY[1];
170 |
171 | logLevel40 += "\r\n \r\n LoGeoRef 40 = " + lev.GeoRef40 + "\r\n" + line;
172 |
173 | return logLevel40;
174 | }
175 |
176 | public string LogLevel50(Appl.Level50 lev)
177 |
178 | {
179 | string logLevel50 = "";
180 | string line = "\r\n________________________________________________________________________________________________________________________________________";
181 | string dashline = "\r\n----------------------------------------------------------------------------------------------------------------------------------------";
182 |
183 | logLevel50 += "\r\n \r\nSpecific entities for georeferencing" + dashline + "\r\n";
184 |
185 | if(lev.Instance_Object.Count == 0)
186 | {
187 | logLevel50 += "\r\n No conversion of the world coordinate system (WCS) in a coordinate reference system (CRS) applicable.";
188 | }
189 | else
190 | {
191 | double rotX, rotY;
192 |
193 | if(lev.RotationXY == null)
194 | {
195 | rotX = 0;
196 | rotY = 1;
197 | }
198 | else
199 | {
200 | rotX = lev.RotationXY[0];
201 | rotY = lev.RotationXY[1];
202 | }
203 |
204 | logLevel50 += " Project for which IfcMapConversion applies: " + lev.Reference_Object[0] + "=" + lev.Reference_Object[1]
205 | + "\r\n MapConversion element: " + lev.Instance_Object[0] + "=" + lev.Instance_Object[1]
206 | + "\r\n Translation Eastings:" + lev.Translation_Eastings
207 | + "\r\n Translation Northings:" + lev.Translation_Northings
208 | + "\r\n Translation Height:" + lev.Translation_Orth_Height
209 | + "\r\n Rotation X-axis(Abscissa):" + rotX
210 | + "\r\n Rotation X-axis(Ordinate):" + rotY
211 | + "\r\n Scale:" + lev.Scale
212 | + "\r\n CRS element: "
213 | + "\r\n Name:" + lev.CRS_Name
214 | + "\r\n Description:" + lev.CRS_Description
215 | + "\r\n Geodetic Datum:" + lev.CRS_Geodetic_Datum
216 | + "\r\n Vertical Datum:" + lev.CRS_Vertical_Datum
217 | + "\r\n Projection Name:" + lev.CRS_Projection_Name
218 | + "\r\n Projection Zone:" + lev.CRS_Projection_Zone;
219 | }
220 |
221 | logLevel50 += "\r\n \r\n LoGeoRef 50 = " + lev.GeoRef50 + "\r\n" + line;
222 |
223 | return logLevel50;
224 | }
225 | }
226 | }
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_v3/IfcGeometryExtractor.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dd-bim/IfcGeoRef/a501534ada7b64c33774bb560d9e09ee08e12886/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_v3/IfcGeometryExtractor.dll
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_v3/NETGeographic.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dd-bim/IfcGeoRef/a501534ada7b64c33774bb560d9e09ee08e12886/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_v3/NETGeographic.dll
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_v3/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Resources;
3 | using System.Runtime.CompilerServices;
4 | using System.Runtime.InteropServices;
5 | using System.Windows;
6 |
7 | // General Information about an assembly is controlled through the following
8 | // set of attributes. Change these attribute values to modify the information
9 | // associated with an assembly.
10 | [assembly: AssemblyTitle("IfcGeoRefChecker_v3")]
11 | [assembly: AssemblyDescription("")]
12 | [assembly: AssemblyConfiguration("")]
13 | [assembly: AssemblyCompany("")]
14 | [assembly: AssemblyProduct("IfcGeoRefChecker_v3")]
15 | [assembly: AssemblyCopyright("Copyright © 2018")]
16 | [assembly: AssemblyTrademark("")]
17 | [assembly: AssemblyCulture("")]
18 |
19 | // Setting ComVisible to false makes the types in this assembly not visible
20 | // to COM components. If you need to access a type in this assembly from
21 | // COM, set the ComVisible attribute to true on that type.
22 | [assembly: ComVisible(false)]
23 |
24 | //In order to begin building localizable applications, set
25 | //CultureYouAreCodingWith in your .csproj file
26 | //inside a . For example, if you are using US english
27 | //in your source files, set the to en-US. Then uncomment
28 | //the NeutralResourceLanguage attribute below. Update the "en-US" in
29 | //the line below to match the UICulture setting in the project file.
30 |
31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
32 |
33 |
34 | [assembly: ThemeInfo(
35 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
36 | //(used if a resource is not found in the page,
37 | // or application resource dictionaries)
38 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
39 | //(used if a resource is not found in the page,
40 | // app, or any theme specific resource dictionaries)
41 | )]
42 |
43 |
44 | // Version information for an assembly consists of the following four values:
45 | //
46 | // Major Version
47 | // Minor Version
48 | // Build Number
49 | // Revision
50 | //
51 | // You can specify all the values or you can default the Build and Revision Numbers
52 | // by using the '*' as shown below:
53 | // [assembly: AssemblyVersion("1.0.*")]
54 | [assembly: AssemblyVersion("1.0.0.0")]
55 | [assembly: AssemblyFileVersion("1.0.0.0")]
56 |
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_v3/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // Dieser Code wurde von einem Tool generiert.
4 | // Laufzeitversion:4.0.30319.42000
5 | //
6 | // Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
7 | // der Code erneut generiert wird.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace IfcGeoRefChecker_v3.Properties {
12 | using System;
13 |
14 |
15 | ///
16 | /// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
17 | ///
18 | // Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
19 | // -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
20 | // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
21 | // mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal Resources() {
33 | }
34 |
35 | ///
36 | /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
37 | ///
38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39 | internal static global::System.Resources.ResourceManager ResourceManager {
40 | get {
41 | if (object.ReferenceEquals(resourceMan, null)) {
42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("IfcGeoRefChecker_v3.Properties.Resources", typeof(Resources).Assembly);
43 | resourceMan = temp;
44 | }
45 | return resourceMan;
46 | }
47 | }
48 |
49 | ///
50 | /// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
51 | /// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
52 | ///
53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54 | internal static global::System.Globalization.CultureInfo Culture {
55 | get {
56 | return resourceCulture;
57 | }
58 | set {
59 | resourceCulture = value;
60 | }
61 | }
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_v3/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | text/microsoft-resx
107 |
108 |
109 | 2.0
110 |
111 |
112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
113 |
114 |
115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_v3/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // Dieser Code wurde von einem Tool generiert.
4 | // Laufzeitversion:4.0.30319.42000
5 | //
6 | // Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
7 | // der Code erneut generiert wird.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace IfcGeoRefChecker_v3.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_v3/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_v3/egm2008.egm:
--------------------------------------------------------------------------------
1 | EGMF-1
2 | # An Earth Gravity Model (Format 1) file. For documentation on the
3 | # format of this file see
4 | # http://geographiclib.sf.net/html/gravity.html#gravityformat
5 | Name egm2008
6 | Publisher National Geospatial Intelligence Agency
7 | Description Earth Gravity Model 2008
8 | URL http://earth-info.nga.mil/GandG/wgs84/gravitymod/egm2008
9 | ReleaseDate 2008-06-01
10 | ConversionDate 2011-11-19
11 | DataVersion 1
12 | ModelRadius 6378136.3
13 | ModelMass 3986004.415e8
14 | AngularVelocity 7292115e-11
15 | ReferenceRadius 6378137
16 | ReferenceMass 3986004.418e8
17 | Flattening 1/298.257223563
18 | HeightOffset -0.41
19 |
20 | # Gravitational and correction coefficients taken from
21 | # EGM2008_to2190_TideFree and Zeta-to-N_to2160_egm2008 from
22 | # the egm2008 distribution.
23 | ID EGM2008A
24 |
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_v3/egm2008.egm.cof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dd-bim/IfcGeoRef/a501534ada7b64c33774bb560d9e09ee08e12886/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_v3/egm2008.egm.cof
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_v3/icon_ico.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dd-bim/IfcGeoRef/a501534ada7b64c33774bb560d9e09ee08e12886/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_v3/icon_ico.ico
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_v3/img/DD-BIM-LOGO.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dd-bim/IfcGeoRef/a501534ada7b64c33774bb560d9e09ee08e12886/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_v3/img/DD-BIM-LOGO.png
--------------------------------------------------------------------------------
/IfcGeoRefChecker/IfcGeoRefChecker_v3/IfcGeoRefChecker_v3/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/IfcGeoRefChecker/icon_ico.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dd-bim/IfcGeoRef/a501534ada7b64c33774bb560d9e09ee08e12886/IfcGeoRefChecker/icon_ico.ico
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 dd-bim
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Quick_Guide.md:
--------------------------------------------------------------------------------
1 | #  IFCGeoRefChecker
2 |
3 | # Quick Guide
4 |
5 | [TOC]
6 |
7 | ## The -IFCGeoRefChecker- tool (Version: 0.3.1.0)
8 |
9 | 
10 |
11 | ### GeoRefChecker functionality
12 |
13 | 1. **"Set working directory" section**
14 | -- optional, but recommended via Change... button
15 | -- some export files will be stored there
16 | -- you need permission to write in there
17 |
18 | 2. **"Check IFC-file(s)..." button**
19 | -- main functionality
20 | -- automatically export of Log- and/or json-file to working directory possible (if Checkboxes are checked)
21 | -- check one or more IFC-files per import regarding LoGeoRef concept (see Documentation)
22 | -- imported and checked models will be displayed in Listbox
23 |
24 | 3. **"Check overview" section**
25 | -- short results of check against Level of Georeferencing
26 | -- switch between results via selecting models in Listbox above
27 | -- (if checked before) buttons for displaying of Log- and/or JSON-file
28 |
29 | 4. **"--> GeoRefComparer" button**
30 | -- comparing of georeferencing attribute values of two or more IFC files
31 | -- see [GeoRefComparer](#Comparing georef)
32 |
33 | 5. **Update GeoRef" section**
34 | -- possibility to update/change the georeferencing of your IFC file
35 | -- first step: update georef attributes manually OR via map (external web app)
36 | -- second step: Export Updates to IFC file
37 | -- see [GeoRefUpdater](#Updating georef)
38 |
39 |
40 | ### Comparing georef
41 |
42 | 
43 |
44 | 1. **"Reference model" section**
45 | -- choose the IFC file which should be the reference for the comparison
46 | -- normally that is the coordination model (with correct georef data)
47 |
48 | 2. **"Comparison models" section**
49 | -- select the models which should be compared with the reference model
50 | -- please note: they will be not compared with each other
51 | -- normally that are the models of participating disciplines
52 |
53 | 3. **"Start Comparison" button**
54 | -- start of comparison
55 | -- internally export of compare log file to working directory
56 | -- quick view on compare file via click on "See compare file" button
57 |
58 |
59 | ### GeoRefUpdate functionality
60 |
61 | #### First option: edit "...via manual setup"
62 |
63 | 
64 |
65 | Possibility to edit manually address, Geolocation (Geographic site coordinates) and Geodetic transformation.
66 | Via "Save and Close" the new attribute values will be stored as json in a user defined directory.
67 | The json file will be needed for further IFC export.
68 |
69 | #### Second option: edit "...via browser map"
70 |
71 | 1. **Calculating building perimeter**
72 | -- for later display at the map the application will internally calculate the building perimeter out of the wall geometry in IFC file
73 | -- because of the wide variety of storing geometry in IFC this is prone to error
74 | -- please contact us if calculation will fail or will be incorrect
75 |
76 | 2. **Saving of json with building perimeter**
77 | -- the application requests to save the json file with the calculated building perimeter
78 | -- please save the file in the working directory or any other known folder
79 |
80 | 3. **"Building Locator" will be opened**
81 | -- start of the Building Locator via opening your local setted browser
82 | -- on the left side a map is displayed
83 | -- if not check your Internet connection and/or try another browser
84 | -
85 |
86 | 5. **Updating georef via "Building Locator"**
87 | - **Select File:**
88 | -- import the json file with the calculated building perimeter (WKTRep-attribute in json file)
89 |
90 | - **Show Existing Georef Information**
91 | -- display of the georef content in json file
92 |
93 | - **Select Map Projection**
94 | -- choose one of the offered projections
95 |
96 | - **Position Building**
97 | -- displaying of the WKT-string representing the building perimeter
98 | -- via **Draw Building** display of the building and its project base point in the map
99 | -- the positioning is orientated to the Level50 attributes or if they are not given, ob the LatLon coordinate of Level20
100 | -- user defined positioning via **move** and **rotate** functionality
101 |
102 | - **Query Buildng Address**
103 | -- get the address of the choosen location
104 | -- source: [Nominatim](https://nominatim.org/release-docs/develop/api/Overview/)
105 |
106 | - **Save Position and Download File**
107 | -- updating of the georef json file
108 | -- Download to working directory or user-defined folder
109 |
110 | #### Export changes to IFC
111 |
112 | 
113 |
114 | 1. **Export Updates to IFC via IfcGeoRefChecker**
115 | -- import of updated json file from file system
116 | -- choosing of the required export options (dependent to your BIM-software)
117 | -- possibility to edit manually IFC attributes, see [IFC export for experts](#Extended export)
118 |
119 |
120 |
121 | #### Extended export to IFC (only for IFC experts recommended)
122 |
123 | 
124 |
125 | - Updating georef via Level of Georeferencing concept
126 | - displaying of attribute values of certain levels and their corresponding IFC entities
127 |
128 | ## Built with
129 |
130 | - [xBIM Toolkit](http://docs.xbim.net/) - Main functionality used to read IFC-files
131 | - [Json.NET](https://www.newtonsoft.com/json) - Functionality for exporting JSON-files
132 | - [Pixabay](https://pixabay.com/) - Graphics used to design LoGeoRef-Icons
133 |
134 | ##Contributors
135 |
136 | The concept together with the tool was developed within the scope of the following sponsorship projects:
137 |
138 | | 3D-Punktwolke - CityBIM | Digitalisierung des Bauwesens - DD BIM |
139 | |--------|--------|
140 | |
| Supported by:
Landeshauptstadt Dresden
Amt für Wirtschaftsförderung |
141 |
142 | ## Contact
143 |
144 |
145 |
146 | **HTW Dresden**
147 | **Fakultät Geoinformation**
148 | Friedrich-List-Platz 1
149 | 01069 Dresden
150 |
151 | Project head:
152 |
153 | - Prof. Dr.-Ing. Christian Clemen ()
154 |
155 | Project staff:
156 |
157 | - Hendrik Görne, M.Eng. ()
158 | - Tim Kaiser, M.Eng.
159 | - Enrico Romanschek, M.Eng.
160 |
161 | ## License
162 |
163 | This project is licensed under the MIT License:
164 |
165 | ```
166 | Copyright (c) 2019 HTW Dresden
167 |
168 | Permission is hereby granted, free of charge, to any person obtaining a copy
169 | of this software and associated documentation files (the "Software"), to deal
170 | in the Software without restriction, including without limitation the rights
171 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
172 | copies of the Software, and to permit persons to whom the Software is
173 | furnished to do so, subject to the following conditions:
174 |
175 | The above copyright notice and this permission notice shall be included in all
176 | copies or substantial portions of the Software.
177 |
178 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
179 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
180 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
181 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
182 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
183 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
184 | SOFTWARE.
185 |
186 | ```
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # IfcGeoRef
2 |
3 | This is the public archive of the old IfcGeoRefChecker version.
4 |
5 | You find the new version here: [IfcGeoRefChecker](https://github.com/dd-bim/City2BIM/tree/master/IFCGeoRefCheckerGUI) and the
6 | documentation at the [project wiki](https://github.com/dd-bim/City2BIM/wiki/IFCGeoRefChecker)
7 |
--------------------------------------------------------------------------------
/README_Deu.md:
--------------------------------------------------------------------------------
1 | 
2 |
3 | # IfcGeoRefChecker- Kurzanleitung
4 |
5 | [TOC]
6 |
7 | ## Das -IFCGeoRefChecker- Tool (Version: 0.3.1.0)
8 |
9 | 
10 |
11 | ### GeoRefChecker Funktionsumfang
12 |
13 | 1. **"Arbeitsverzeichnis festlegen" Bereich**
14 | -- optional, aber empfohlen über die Schaltfläche Ändern...
15 | -- einige Exportdateien werden dort gespeichert
16 | -- Sie benötigen die Berechtigung, dort hinein zu schreiben
17 |
18 | 2. **"Überprüfe IFC-Datei(en)..." Button**
19 | -- Hauptfunktionalität
20 | -- automatischer Export von Log- und/oder json-Datei ins Arbeitsverzeichnis möglich (wenn Checkboxen aktiviert sind)
21 | -- Prüfung einer oder mehrerer IFC-Dateien pro Import auf LoGeoRef-Konzept (siehe Dokumentation)
22 | -- importierte und geprüfte Modelle werden in der Liste im Bereich: "Statusmeldung" angezeigt
23 |
24 | 3. **"GeoRefCheck Überblick" Bereich**
25 | -- kurze Ergebnisse des festgestellten Georeferenzierungsgrades der IFC-Datei(en)
26 | -- Umschalten zwischen den Ergebnissen durch Auswahl der Modelle in der Liste oben im Bereich "Statusmeldung"
27 | -- (wenn vorher angehakt) Schaltflächen zur Anzeige der Log- und/oder JSON-Datei
28 |
29 | 4. **"--> GeoRefComparer" Button**
30 | -- Vergleich von georeferenzierenden Attributwerten zweier oder mehrerer IFC-Dateien
31 | -- siehe [GeoRefComparer]( #Comparing) georef)
32 |
33 | 5. **"Aktualisiere GeoRef" Bereich**
34 | -- Möglichkeit zur Aktualisierung/Änderung der Georeferenzierung Ihrer IFC-Datei
35 | -- erster Schritt: Georeferenzierungsattribute manuell ODER über Karte (externe Web-App) aktualisieren
36 | -- zweiter Schritt: Aktualisierungen in IFC-Datei exportieren
37 | -- siehe [GeoRefUpdater](#Updating georef)
38 |
39 |
40 | ### IfcGeoRefComparer
41 |
42 | 
43 |
44 | 1. **"Referenzmodell" Bereich**
45 | -- wählen Sie die IFC-Datei, die als Referenz für den Vergleich dienen soll
46 | -- normalerweise ist das das Koordinationsmodell (mit korrekten Georeferenzdaten)
47 |
48 | 2. **"Vergleichsmodelle" Bereich**
49 | -- wählen Sie die Modelle aus, die mit dem Referenzmodell verglichen werden sollen
50 | -- bitte beachten Sie: sie werden nicht miteinander verglichen
51 | -- normalerweise sind das die Modelle der beteiligten Gewerke
52 |
53 | 3. **"Starte Vergleich" Button**
54 | -- Start des Vergleichs
55 | -- interner Export der Vergleichsprotokolldatei in das Arbeitsverzeichnis
56 | -- Schnellansicht der Vergleichsdatei durch Klick auf den Button "Vergleichsdatei ansehen"
57 |
58 |
59 | ### Aktualisiere GeoRef Funktionsumfang
60 |
61 | #### Erste Variante: bearbeiten "...via manuelle Eingabe"
62 |
63 | 
64 |
65 | Möglichkeit zur manuellen Bearbeitung von Adresse, Geolocation (Geographische Standortkoordinaten) und Geodätische Transformation.
66 | Über "Speichern und Schließen" werden die neuen Attributwerte als json-Datei in einem benutzerdefinierten Verzeichnis gespeichert.
67 | Die json-Datei wird für den weiteren IFC-Export benötigt.
68 |
69 | #### Zweite Variante: bearbeiten "...via Browser-Karte"
70 |
71 | 1. **Berechnung des Gebäudeumrisses**
72 | -- für die spätere Darstellung in der Karte berechnet die Anwendung intern den Gebäudeumriss aus der Wandgeometrie in der IFC-Datei
73 | -- aufgrund der vielfältigen Speichermöglichkeiten der Geometrie in IFC ist dies fehleranfällig
74 | -- bitte kontaktieren Sie uns, wenn die Berechnung fehlschlägt oder fehlerhaft ist
75 |
76 | 2. **Speichern von json mit Gebäudeumriss**
77 | -- die Anwendung fordert zum Speichern der json-Datei mit dem berechneten Gebäudeumriss auf
78 | -- bitte speichern Sie die Datei im Arbeitsverzeichnis oder in einem anderen bekannten Ordner
79 |
80 | 3. **"Building Locator" wird geöffnet**
81 | -- Start des "Building Locator" durch Öffnen des lokal eingestellten Browsers
82 | -- auf der linken Seite wird eine Karte angezeigt
83 | -- falls nicht, überprüfen Sie Ihre Internetverbindung und/oder versuchen Sie einen anderen Browser
84 | -
85 |
86 | 4. **Georef aktualisieren über "Building Locator "**
87 | - **Datei auswählen:**
88 | -- Importieren Sie die json-Datei mit dem berechneten Gebäudeumriss (WKTRep-Attribut in json-Datei)
89 |
90 | - **Vorhandene Georef-Informationen anzeigen**
91 | -- Anzeige des Georef-Inhalts in der json-Datei
92 |
93 | - **Kartenprojektion wählen**
94 | -- Auswahl einer der angebotenen Projektionen
95 |
96 | - **Gebäude positionieren**
97 | -- Anzeige der WKT-Zeichenkette, die den Gebäudeumriss repräsentiert
98 | -- über **Gebäude zeichnen** Darstellung des Gebäudes und seines Projektbasispunktes in der Karte
99 | -- die Positionierung orientiert sich an den Level50-Attributen oder, wenn diese nicht angegeben sind, an der LatLon-Koordinate von Level20
100 | -- benutzerdefinierte Positionierung über **Verschieben** und **Drehen** Funktionalität
101 |
102 | - **Gebäudeadresse abfragen**
103 | -- liefert die Adresse des gewählten Ortes
104 | -- Quelle: [Nominatim](https://nominatim.org/release-docs/develop/api/Overview/)
105 |
106 | - **Position speichern und Datei herunterladen**
107 | -- Aktualisieren der georef json-Datei
108 | -- Download in Arbeitsverzeichnis oder benutzerdefinierten Ordner
109 |
110 | #### Änderungen in IFC exportieren
111 |
112 | 
113 |
114 | 1. **Aktualisierungen nach IFC über IfcGeoRefChecker** exportieren
115 | -- Import der aktualisierten json-Datei aus dem Dateisystem
116 | -- Auswahl der gewünschten Exportoptionen (abhängig von Ihrer BIM-Software)
117 | -- Möglichkeit, IFC-Attribute manuell zu bearbeiten, siehe [IFC-Export für Experten](#Erweiterter Export)
118 |
119 |
120 |
121 | #### Erweiterter Export nach IFC (nur für IFC-Experten empfohlen)
122 |
123 | 
124 |
125 | - Aktualisieren von Georef über das Konzept der Georeferenzierungsebene
126 | - Anzeige von Attributwerten bestimmter Ebenen und ihrer zugehörigen IFC-Entitäten
127 |
128 | ## Programmiert mit
129 |
130 | - [xBIM Toolkit](http://docs.xbim.net/) - Hauptfunktionalität zum Lesen von IFC-Dateien
131 | - [Json.NET](https://www.newtonsoft.com/json) - Funktionalität zum Exportieren von JSON-Dateien
132 | - [Pixabay](https://pixabay.com/) - Grafiken, die zur Gestaltung von LoGeoRef-Icons verwendet werden
133 |
134 | ##Mitwirkende
135 |
136 | Das Konzept mitsamt dem Tool wurde im Rahmen der folgenden Förderprojekte entwickelt:
137 |
138 | | 3D-Punktwolke - CityBIM | Digitalisierung des Bauwesens - DD BIM |
139 | |--------|--------|
140 | |
| Supported by:
Landeshauptstadt Dresden
Amt für Wirtschaftsförderung |
141 |
142 | ## Kontakt
143 |
144 |
145 |
146 | **HTW Dresden**
147 | **Fakultät Geoinformation**
148 | Friedrich-List-Platz 1
149 | 01069 Dresden
150 |
151 | Projektleiter:
152 |
153 | - Prof. Dr.-Ing. Christian Clemen ()
154 |
155 | Projektmitarbeiter:
156 |
157 | - Hendrik Görne, M.Eng. ()
158 | - Tim Kaiser, M.Eng.
159 | - Enrico Romanschek, M.Eng.
160 |
161 | ## Lizenz
162 |
163 | Dieses Projekt ist unter der MIT-Lizenz lizenziert:
164 |
165 | ```
166 | Copyright (c) 2019 HTW Dresden
167 | Permission is hereby granted, free of charge, to any person obtaining a copy
168 | of this software and associated documentation files (the "Software"), to deal
169 | in the Software without restriction, including without limitation the rights
170 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
171 | copies of the Software, and to permit persons to whom the Software is
172 | furnished to do so, subject to the following conditions:
173 | The above copyright notice and this permission notice shall be included in all
174 | copies or substantial portions of the Software.
175 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
176 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
177 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
178 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
179 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
180 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
181 | SOFTWARE.
182 | ```
183 |
--------------------------------------------------------------------------------
/README_old.md:
--------------------------------------------------------------------------------
1 | 
2 |
3 | # IfcGeoRefChecker- Quick Guide
4 |
5 | [TOC]
6 |
7 | ## The -IFCGeoRefChecker- tool (Version: 0.3.1.0)
8 |
9 | 
10 |
11 | ### GeoRefChecker functionality
12 |
13 | 1. **"Set working directory" section**
14 | -- optional, but recommended via Change... button
15 | -- some export files will be stored there
16 | -- you need permission to write in there
17 |
18 | 2. **"Check IFC-file(s)..." button**
19 | -- main functionality
20 | -- automatically export of Log- and/or json-file to working directory possible (if Checkboxes are checked)
21 | -- check one or more IFC-files per import regarding LoGeoRef concept (see Documentation)
22 | -- imported and checked models will be displayed in Listbox
23 |
24 | 3. **"Check overview" section**
25 | -- short results of check against Level of Georeferencing
26 | -- switch between results via selecting models in Listbox above
27 | -- (if checked before) buttons for displaying of Log- and/or JSON-file
28 |
29 | 4. **"--> GeoRefComparer" button**
30 | -- comparing of georeferencing attribute values of two or more IFC files
31 | -- see [GeoRefComparer](#Comparing georef)
32 |
33 | 5. **Update GeoRef" section**
34 | -- possibility to update/change the georeferencing of your IFC file
35 | -- first step: update georef attributes manually OR via map (external web app)
36 | -- second step: Export Updates to IFC file
37 | -- see [GeoRefUpdater](#Updating georef)
38 |
39 |
40 | ### Comparing georef
41 |
42 | 
43 |
44 | 1. **"Reference model" section**
45 | -- choose the IFC file which should be the reference for the comparison
46 | -- normally that is the coordination model (with correct georef data)
47 |
48 | 2. **"Comparison models" section**
49 | -- select the models which should be compared with the reference model
50 | -- please note: they will be not compared with each other
51 | -- normally that are the models of participating disciplines
52 |
53 | 3. **"Start Comparison" button**
54 | -- start of comparison
55 | -- internally export of compare log file to working directory
56 | -- quick view on compare file via click on "See compare file" button
57 |
58 |
59 | ### GeoRefUpdate functionality
60 |
61 | #### First option: edit "...via manual setup"
62 |
63 | 
64 |
65 | Possibility to edit manually address, Geolocation (Geographic site coordinates) and Geodetic transformation.
66 | Via "Save and Close" the new attribute values will be stored as json in a user defined directory.
67 | The json file will be needed for further IFC export.
68 |
69 | #### Second option: edit "...via browser map"
70 |
71 | 1. **Calculating building perimeter**
72 | -- for later display at the map the application will internally calculate the building perimeter out of the wall geometry in IFC file
73 | -- because of the wide variety of storing geometry in IFC this is prone to error
74 | -- please contact us if calculation will fail or will be incorrect
75 |
76 | 2. **Saving of json with building perimeter**
77 | -- the application requests to save the json file with the calculated building perimeter
78 | -- please save the file in the working directory or any other known folder
79 |
80 | 3. **"Building Locator" will be opened**
81 | -- start of the Building Locator via opening your local setted browser
82 | -- on the left side a map is displayed
83 | -- if not check your Internet connection and/or try another browser
84 | -
85 |
86 | 5. **Updating georef via "Building Locator"**
87 | - **Select File:**
88 | -- import the json file with the calculated building perimeter (WKTRep-attribute in json file)
89 |
90 | - **Show Existing Georef Information**
91 | -- display of the georef content in json file
92 |
93 | - **Select Map Projection**
94 | -- choose one of the offered projections
95 |
96 | - **Position Building**
97 | -- displaying of the WKT-string representing the building perimeter
98 | -- via **Draw Building** display of the building and its project base point in the map
99 | -- the positioning is orientated to the Level50 attributes or if they are not given, ob the LatLon coordinate of Level20
100 | -- user defined positioning via **move** and **rotate** functionality
101 |
102 | - **Query Buildng Address**
103 | -- get the address of the choosen location
104 | -- source: [Nominatim](https://nominatim.org/release-docs/develop/api/Overview/)
105 |
106 | - **Save Position and Download File**
107 | -- updating of the georef json file
108 | -- Download to working directory or user-defined folder
109 |
110 | #### Export changes to IFC
111 |
112 | 
113 |
114 | 1. **Export Updates to IFC via IfcGeoRefChecker**
115 | -- import of updated json file from file system
116 | -- choosing of the required export options (dependent to your BIM-software)
117 | -- possibility to edit manually IFC attributes, see [IFC export for experts](#Extended export)
118 |
119 |
120 |
121 | #### Extended export to IFC (only for IFC experts recommended)
122 |
123 | 
124 |
125 | - Updating georef via Level of Georeferencing concept
126 | - displaying of attribute values of certain levels and their corresponding IFC entities
127 |
128 | ## Built with
129 |
130 | - [xBIM Toolkit](http://docs.xbim.net/) - Main functionality used to read IFC-files
131 | - [Json.NET](https://www.newtonsoft.com/json) - Functionality for exporting JSON-files
132 | - [Pixabay](https://pixabay.com/) - Graphics used to design LoGeoRef-Icons
133 |
134 | ##Contributors
135 |
136 | The concept together with the tool was developed within the scope of the following sponsorship projects:
137 |
138 | | 3D-Punktwolke - CityBIM | Digitalisierung des Bauwesens - DD BIM |
139 | |--------|--------|
140 | |
| Supported by:
Landeshauptstadt Dresden
Amt für Wirtschaftsförderung |
141 |
142 | ## Contact
143 |
144 |
145 |
146 | **HTW Dresden**
147 | **Fakultät Geoinformation**
148 | Friedrich-List-Platz 1
149 | 01069 Dresden
150 |
151 | Project head:
152 |
153 | - Prof. Dr.-Ing. Christian Clemen ()
154 |
155 | Project staff:
156 |
157 | - Hendrik Görne, M.Eng. ()
158 | - Tim Kaiser, M.Eng.
159 | - Enrico Romanschek, M.Eng.
160 |
161 | ## License
162 |
163 | This project is licensed under the MIT License:
164 |
165 | ```
166 | Copyright (c) 2019 HTW Dresden
167 |
168 | Permission is hereby granted, free of charge, to any person obtaining a copy
169 | of this software and associated documentation files (the "Software"), to deal
170 | in the Software without restriction, including without limitation the rights
171 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
172 | copies of the Software, and to permit persons to whom the Software is
173 | furnished to do so, subject to the following conditions:
174 |
175 | The above copyright notice and this permission notice shall be included in all
176 | copies or substantial portions of the Software.
177 |
178 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
179 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
180 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
181 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
182 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
183 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
184 | SOFTWARE.
185 |
186 | ```
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
--------------------------------------------------------------------------------
/pic/BMWi_4C_Gef_en.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dd-bim/IfcGeoRef/a501534ada7b64c33774bb560d9e09ee08e12886/pic/BMWi_4C_Gef_en.jpg
--------------------------------------------------------------------------------
/pic/DD-BIM-LOGO.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dd-bim/IfcGeoRef/a501534ada7b64c33774bb560d9e09ee08e12886/pic/DD-BIM-LOGO.png
--------------------------------------------------------------------------------
/pic/GeoRefChecker_GUI_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dd-bim/IfcGeoRef/a501534ada7b64c33774bb560d9e09ee08e12886/pic/GeoRefChecker_GUI_1.png
--------------------------------------------------------------------------------
/pic/GeoRefChecker_GUI_1_v3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dd-bim/IfcGeoRef/a501534ada7b64c33774bb560d9e09ee08e12886/pic/GeoRefChecker_GUI_1_v3.png
--------------------------------------------------------------------------------
/pic/GeoRefChecker_GUI_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dd-bim/IfcGeoRef/a501534ada7b64c33774bb560d9e09ee08e12886/pic/GeoRefChecker_GUI_2.png
--------------------------------------------------------------------------------
/pic/GeoRefChecker_GUI_2_v3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dd-bim/IfcGeoRef/a501534ada7b64c33774bb560d9e09ee08e12886/pic/GeoRefChecker_GUI_2_v3.png
--------------------------------------------------------------------------------
/pic/GeoRefChecker_Locator.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dd-bim/IfcGeoRef/a501534ada7b64c33774bb560d9e09ee08e12886/pic/GeoRefChecker_Locator.png
--------------------------------------------------------------------------------
/pic/GeoRefComparer_GUI1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dd-bim/IfcGeoRef/a501534ada7b64c33774bb560d9e09ee08e12886/pic/GeoRefComparer_GUI1.png
--------------------------------------------------------------------------------
/pic/GeoRefUpdater_GUI1_v3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dd-bim/IfcGeoRef/a501534ada7b64c33774bb560d9e09ee08e12886/pic/GeoRefUpdater_GUI1_v3.png
--------------------------------------------------------------------------------
/pic/GeoRefUpdater_GUI3_v3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dd-bim/IfcGeoRef/a501534ada7b64c33774bb560d9e09ee08e12886/pic/GeoRefUpdater_GUI3_v3.png
--------------------------------------------------------------------------------
/pic/GeoRefUpdater_GUI4_v3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dd-bim/IfcGeoRef/a501534ada7b64c33774bb560d9e09ee08e12886/pic/GeoRefUpdater_GUI4_v3.png
--------------------------------------------------------------------------------
/pic/icon_georef10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dd-bim/IfcGeoRef/a501534ada7b64c33774bb560d9e09ee08e12886/pic/icon_georef10.png
--------------------------------------------------------------------------------
/pic/icon_georef20.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dd-bim/IfcGeoRef/a501534ada7b64c33774bb560d9e09ee08e12886/pic/icon_georef20.png
--------------------------------------------------------------------------------
/pic/icon_georef30.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dd-bim/IfcGeoRef/a501534ada7b64c33774bb560d9e09ee08e12886/pic/icon_georef30.png
--------------------------------------------------------------------------------
/pic/icon_georef40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dd-bim/IfcGeoRef/a501534ada7b64c33774bb560d9e09ee08e12886/pic/icon_georef40.png
--------------------------------------------------------------------------------
/pic/icon_georef50.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dd-bim/IfcGeoRef/a501534ada7b64c33774bb560d9e09ee08e12886/pic/icon_georef50.png
--------------------------------------------------------------------------------
/pic/icon_img.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dd-bim/IfcGeoRef/a501534ada7b64c33774bb560d9e09ee08e12886/pic/icon_img.png
--------------------------------------------------------------------------------
/pic/ifc_georef10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dd-bim/IfcGeoRef/a501534ada7b64c33774bb560d9e09ee08e12886/pic/ifc_georef10.png
--------------------------------------------------------------------------------
/pic/ifc_georef20.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dd-bim/IfcGeoRef/a501534ada7b64c33774bb560d9e09ee08e12886/pic/ifc_georef20.png
--------------------------------------------------------------------------------
/pic/ifc_georef30.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dd-bim/IfcGeoRef/a501534ada7b64c33774bb560d9e09ee08e12886/pic/ifc_georef30.png
--------------------------------------------------------------------------------
/pic/ifc_georef40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dd-bim/IfcGeoRef/a501534ada7b64c33774bb560d9e09ee08e12886/pic/ifc_georef40.png
--------------------------------------------------------------------------------
/pic/ifc_georef50.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dd-bim/IfcGeoRef/a501534ada7b64c33774bb560d9e09ee08e12886/pic/ifc_georef50.png
--------------------------------------------------------------------------------
/pic/logeoref10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dd-bim/IfcGeoRef/a501534ada7b64c33774bb560d9e09ee08e12886/pic/logeoref10.png
--------------------------------------------------------------------------------
/pic/logeoref20.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dd-bim/IfcGeoRef/a501534ada7b64c33774bb560d9e09ee08e12886/pic/logeoref20.png
--------------------------------------------------------------------------------
/pic/logeoref30.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dd-bim/IfcGeoRef/a501534ada7b64c33774bb560d9e09ee08e12886/pic/logeoref30.png
--------------------------------------------------------------------------------
/pic/logeoref40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dd-bim/IfcGeoRef/a501534ada7b64c33774bb560d9e09ee08e12886/pic/logeoref40.png
--------------------------------------------------------------------------------
/pic/logeoref50.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dd-bim/IfcGeoRef/a501534ada7b64c33774bb560d9e09ee08e12886/pic/logeoref50.png
--------------------------------------------------------------------------------
/pic/logo_htwdd.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dd-bim/IfcGeoRef/a501534ada7b64c33774bb560d9e09ee08e12886/pic/logo_htwdd.jpg
--------------------------------------------------------------------------------