bool PolygonElementParser::parseElementStartTag(const NodeType::XMLNode& node, Attributes& attributes) { if (!handlesElement(node)) { CITYGML_LOG_ERROR(m_logger, "Expected start tag of PolygonObject but got <" << node.name() << "> at " << getDocumentLocation()); throw std::runtime_error("Unexpected start tag found."); } m_model = m_factory.createPolygon(attributes.getCityGMLIDAttribute()); return true; }
bool LineStringElementParser::parseElementStartTag(const NodeType::XMLNode& node, Attributes& attributes) { if (!handlesElement(node)) { CITYGML_LOG_ERROR(m_logger, "Expected start tag <" << NodeType::GML_LineStringNode << "> or <" << NodeType::GML_PointNode << "> but got <" << node.name() << "> at " << getDocumentLocation()); throw std::runtime_error("Unexpected start tag found."); } m_model = m_factory.createLineString(attributes.getCityGMLIDAttribute()); parseDimension(attributes); return true; }