-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from 3dcl/bug/REN-259-LibCityGML-does-not-pars…
…e-GenericCityObjects Bug/ren 259 lib city gml does not parse generic city objects
- Loading branch information
Showing
24 changed files
with
485 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#pragma once | ||
|
||
#include <citygml/citygml_api.h> | ||
#include <citygml/object.h> | ||
#include <citygml/vecs.hpp> | ||
#include <memory> | ||
|
||
#include <vector> | ||
|
||
namespace citygml { | ||
|
||
class CityGMLFactory; | ||
|
||
/** | ||
* @brief The LineString class implements the gml:LineString object may also be used as a container of a single gml::Point | ||
*/ | ||
class LIBCITYGML_EXPORT LineString : public Object { | ||
friend class CityGMLFactory; | ||
public: | ||
int getDimensions() const; | ||
|
||
const std::vector<TVec2d>& getVertices2D() const; | ||
const std::vector<TVec3d>& getVertices3D() const; | ||
|
||
std::vector<TVec2d>& getVertices2D(); | ||
std::vector<TVec3d>& getVertices3D(); | ||
|
||
void setVertices2D(const std::vector<TVec2d>& vertices); | ||
void setVertices3D(const std::vector<TVec3d>& vertices); | ||
|
||
void setDimensions(int dim); | ||
|
||
protected: | ||
LineString(const std::string& id); | ||
std::vector<TVec2d> m_vertices_2d; | ||
std::vector<TVec3d> m_vertices_3d; | ||
int m_dimensions; | ||
}; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#pragma once | ||
|
||
#include <parser/gmlobjectparser.h> | ||
|
||
#include <functional> | ||
#include <memory> | ||
|
||
namespace citygml { | ||
|
||
class LineString; | ||
|
||
class LineStringElementParser : public GMLObjectElementParser { | ||
public: | ||
LineStringElementParser(CityGMLDocumentParser& documentParser, CityGMLFactory& factory, std::shared_ptr<CityGMLLogger> logger, std::function<void(std::shared_ptr<LineString>)> callback); | ||
|
||
// ElementParser interface | ||
virtual std::string elementParserName() const; | ||
virtual bool handlesElement(const NodeType::XMLNode &node) const override; | ||
protected: | ||
// CityGMLElementParser interface | ||
virtual bool parseElementStartTag(const NodeType::XMLNode& node, Attributes& attributes) override; | ||
virtual bool parseElementEndTag(const NodeType::XMLNode& node, const std::string& characters) override; | ||
virtual bool parseChildElementStartTag(const NodeType::XMLNode& node, Attributes& attributes) override; | ||
virtual bool parseChildElementEndTag(const NodeType::XMLNode& node, const std::string& characters) override; | ||
|
||
// GMLObjectElementParser interface | ||
virtual Object* getObject() override; | ||
|
||
private: | ||
std::shared_ptr<LineString> m_model; | ||
std::function<void(std::shared_ptr<LineString>)> m_callback; | ||
|
||
void parseDimension(Attributes& attributes); | ||
}; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.