Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
a85e892
add OSM class directory
moiezsyed Mar 5, 2023
0795ad8
add OSM data support
moiezsyed Mar 5, 2023
25baad6
add triangulation lib support for OSM class
moiezsyed Mar 5, 2023
02e53d7
add OSM data model definition
moiezsyed Mar 5, 2023
088991d
add OSM data model implementation
moiezsyed Mar 5, 2023
fc9b7c3
add OSM class namespace
moiezsyed Mar 5, 2023
9eb91f4
add libigl triangulation support
moiezsyed Mar 5, 2023
a36dad3
qt network support + libigl linking
moiezsyed Mar 5, 2023
8f2b211
add main OSM geometry handling class definition
moiezsyed Mar 5, 2023
b702cc3
add OSM geometry handling class implementation
moiezsyed Mar 5, 2023
9793158
add OSM data reader class definition
moiezsyed Mar 5, 2023
fa4b9fc
add OSM data reader class implementation
moiezsyed Mar 5, 2023
b9284da
add OSM exception class
moiezsyed Mar 5, 2023
e3fb244
add OSM changeflag
moiezsyed Mar 6, 2023
9c3c102
add OSM support
moiezsyed Mar 6, 2023
d45087f
read OSM file type via importJob
moiezsyed Mar 6, 2023
8c03ba6
add OSM rendering effect definition
moiezsyed Mar 6, 2023
1989afa
add OSM rendering effects implementation
moiezsyed Mar 6, 2023
fac4ed3
add OSM effect to Viewport definition
moiezsyed Mar 6, 2023
11bcd95
add OSM effects to Viewport implementation
moiezsyed Mar 6, 2023
eb835ae
add HttpTreeModel dialog
moiezsyed Mar 6, 2023
2ed685a
add HttpTreeModel definition
moiezsyed Mar 6, 2023
2492631
add HttpTreeModel implementation
moiezsyed Mar 6, 2023
f7418b6
add main HttpDownload dialog for OSM import
moiezsyed Mar 6, 2023
fd22beb
add HttpDownload definition (OSM import)
moiezsyed Mar 6, 2023
0e1e0cf
add HttpDownload dialog implementation
moiezsyed Mar 6, 2023
1d500b5
add import OSM logo
moiezsyed Mar 6, 2023
6a41eba
add OSM logo in OIP qrc
moiezsyed Mar 6, 2023
9e8e92e
update MainWindow UI with OSM import
moiezsyed Mar 6, 2023
f5f8100
add OSM import forms
moiezsyed Mar 6, 2023
818cdf4
add signal/slot mechanism for handling OSM data import
moiezsyed Mar 6, 2023
22fefbd
implement signal/slot mechanism to handle OSM data import
moiezsyed Mar 6, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,14 @@ if(Boost_FOUND)
set(Boost_DIR ${Boost_INCLUDE_DIR})
endif()

# Libigl
FetchContent_Declare(
libigl
GIT_REPOSITORY https://github.com/libigl/libigl.git
GIT_TAG v2.4.0
)

# Eigen
FetchContent_Declare(
eigen
GIT_REPOSITORY https://gitlab.com/libeigen/eigen.git
Expand All @@ -159,7 +167,7 @@ FetchContent_Declare(
set(BUILD_TESTING FALSE CACHE INTERNAL "Build the testing tree." FORCE)
mark_as_advanced(FORCE BUILD_TESTING)

FetchContent_MakeAvailable(eigen)
FetchContent_MakeAvailable(eigen libigl)

FetchContent_Declare(
tclap
Expand Down Expand Up @@ -241,6 +249,10 @@ if(Qt5_FOUND AND WIN32 AND TARGET Qt5::qmake AND NOT TARGET Qt5::windeployqt)
endif()
endif()

#------------------------------------------------------------------------------
# Setup libigl
option(LIBIGL_RESTRICTED_TRIANGLE "Enable Triangle library" ON)
igl_include(restricted triangle)
#------------------------------------------------------------------------------

FetchContent_Declare(
Expand Down Expand Up @@ -403,6 +415,8 @@ set(OpenInfraPlatform_UserInterface_Forms
UserInterface/Forms/MainWindow.ui
UserInterface/Forms/LicenseAndCopyrightInformation.ui
UserInterface/Forms/PreferencesDialog.ui
UserInterface/Forms/HttpDownloadDialog.ui
UserInterface/Forms/HttpTreeModelDialog.ui

# Currently not included.
#UserInterface/Forms/CreateAccidentReport.ui
Expand Down Expand Up @@ -521,6 +535,7 @@ target_link_libraries( OpenInfraPlatform.UI
Qt5::Core
Qt5::Gui
Qt5::Widgets
Qt5::Network
Qt5::Svg
Qt5::PrintSupport
Qt5::Quick
Expand All @@ -542,6 +557,7 @@ target_link_libraries( OpenInfraPlatform.UI
Rpcrt4.lib
eigen
${PROJ_LIBRARIES}
igl_restricted::triangle
)

set(QT_WINDEPLOY_FLAGS -xml -concurrent)
Expand Down
4 changes: 4 additions & 0 deletions Core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ file(GLOB Core_DataManagement_Source src/DataManagement/*.*)
file(GLOB Core_DataManagement_General_Source src/DataManagement/General/*.*)
file(GLOB Core_IfcGeometryConverter_Source src/IfcGeometryConverter/*.*)
file(GLOB Core_OffConverter_Source src/OffConverter/*.*)
file(GLOB Core_OsmDataConverter_Source src/OsmDataConverter/*.*)
file(GLOB Core_Exception_Source src/Exception/*.*)
file(GLOB Core_SplineInterpretation_Source src/SplineInterpretation/*.*)

Expand All @@ -35,6 +36,7 @@ source_group(Core\\DataManagement FILES ${Core_DataManagement_Source})
source_group(Core\\DataManagement\\General FILES ${Core_DataManagement_General_Source})
source_group(Core\\IfcGeometryConverter FILES ${Core_IfcGeometryConverter_Source})
source_group(Core\\OffConverter FILES ${Core_OffConverter_Source})
source_group(Core\\OsmDataConverter FILES ${Core_OsmDataConverter_Source})
source_group(Core\\Exception FILES ${Core_Exception_Source})
source_group(Core\\SplineInterpretation FILES ${Core_SplineInterpretation_Source})

Expand All @@ -44,6 +46,7 @@ add_library(OpenInfraPlatform.Core STATIC
${Core_DataManagement_General_Source}
${Core_IfcGeometryConverter_Source}
${Core_OffConverter_Source}
${Core_OsmDataConverter_Source}
${Core_Exception_Source}
${Core_SplineInterpretation_Source}
)
Expand All @@ -67,6 +70,7 @@ target_link_libraries(OpenInfraPlatform.Core PRIVATE
BlueFramework.Application
carve
eigen
igl_restricted::triangle
)

target_link_libraries(OpenInfraPlatform.Core PUBLIC OpenInfraPlatform.Base)
Expand Down
17 changes: 17 additions & 0 deletions Core/src/DataManagement/General/Data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@
#include "IfcGeometryConverter\IfcImporterImpl.h"
#include "OffConverter\OffModel.h"
#include "OffConverter\OffReader.h"
#include "OsmDataConverter\OsmDataModel.h"
#include "OsmDataConverter\OsmDataReader.h"
#include "Exception\IfcPeekReaderException.h"

#include <QtXml>
Expand Down Expand Up @@ -207,6 +209,21 @@ void OpenInfraPlatform::Core::DataManagement::Data::importJob(const std::string&
return;
}

else if (filetype == ".xml") {
// update status
OpenInfraPlatform::AsyncJob::getInstance().updateStatus(std::string("OSM data meshing in progress!"));
// import osmReader
OpenInfraPlatform::Core::OsmDataConverter::OsmReader osmReader;
// read the '.xml' file
auto osmModel = osmReader.readFile(filename);
// add the model to list of models (if any)
addModel(osmModel);
// change flag to OsmDataGeo. type
latestChangeFlag_ = ChangeFlag::OsmDataGeometry;
return;
}


#ifdef OIP_WITH_POINT_CLOUD_PROCESSING
QString extension = QString(filetype.substr(1, filetype.size() - 1).data());
if (buw::PointCloud::GetSupportedExtensions().contains(extension)
Expand Down
4 changes: 3 additions & 1 deletion Core/src/DataManagement/General/Data.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "..\EarlyBinding\src\EXPRESS\EXPRESSModel.h"
#include "..\Core\src\IfcGeometryConverter\ConverterBuw.h"
#include "..\Core\src\IfcGeometryConverter\IfcGeometryModel.h"
#include "..\Core\src\OsmDataConverter\OsmDataReader.h"

#include <BlueFramework/Application/DataManagement/DocumentManager.h>
#include <BlueFramework/ImageProcessing/color.h>
Expand Down Expand Up @@ -52,7 +53,8 @@ namespace OpenInfraPlatform
PointCloud = 1 << 1,
Preferences = 1 << 2,
OffGeometry = 1 << 3,
All = IfcGeometry | PointCloud | Preferences | OffGeometry
OsmDataGeometry = 1 << 4,
All = IfcGeometry | PointCloud | Preferences | OffGeometry | OsmDataGeometry
};

inline ChangeFlag operator|(ChangeFlag a, ChangeFlag b)
Expand Down
53 changes: 53 additions & 0 deletions Core/src/Exception/OsmDataReaderException.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/*
Copyright (c) 2021 Technical University of Munich
Chair of Computational Modeling and Simulation.

TUM Open Infra Platform is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License Version 3
as published by the Free Software Foundation.

TUM Open Infra Platform is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#pragma once

#ifndef OSMDATAREADEREXCEPTION_H
#define OSMDATAREADEREXCEPTION_H

#include "namespace.h"

#include <exception>
#include <string>

OIP_NAMESPACE_OPENINFRAPLATFORM_CORE_EXCEPTION_BEGIN

class OsmReaderException : public std::exception
{
public:

OsmReaderException(const std::string& msg) noexcept
{
message_ = msg;
}

virtual char const* what() const override
{
return message_.data();
}

private:
std::string message_;

};

OIP_NAMESPACE_OPENINFRAPLATFORM_CORE_EXCEPTION_END

EMBED_CORE_EXCEPTION_INTO_OIP_NAMESPACE(OsmReaderException);

#endif // !OSMDATAREADEREXCEPTION_H
Loading