Code_TYMPAN  4.4.0
Industrial site acoustic simulation
Classes | Signals | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
TYIGNLevelCurvesParser Class Reference

Holds the business logic of parsing the response of level curve IGN web service, in order to send signals to create level curves in Tympan site. More...

#include <TYIGNLevelCurvesParser.h>

Inheritance diagram for TYIGNLevelCurvesParser:
Inheritance graph
[legend]
Collaboration diagram for TYIGNLevelCurvesParser:
Collaboration graph
[legend]

Classes

struct  AltimetryInfo
 

Signals

void courbeNiveauCreated (LPTYCourbeNiveau courbeNiveau)
 

Public Member Functions

 TYIGNLevelCurvesParser (QObject *parent=nullptr)
 
bool isXmlLoaded () const
 Getter for the isXmlLoaded flag. More...
 
bool hasRetrievedLevelCurves () const
 Getter for the hasRetrievedLevelCurves flag. More...
 
QDomDocument getXmlDocument () const
 Getter for the xmlDocument. More...
 
const CTgetCT () const
 Getter for the CT member. More...
 
std::unordered_map< ConstraintIdWrapper, AltimetryInfo > & getConstraintToAltimetryInfoMap ()
 Getter for the constraint to AltimetryInfo map. More...
 
void reset ()
 
bool loadXmlFile (const QString &filePath)
 
void parseXmlData (const OCoord3D &SIGCoords, const OBox &selectedZone, double scaleFactor)
 
bool buildXmlDocument (const QString &text)
 
bool buildCTFromXMLFile (const OCoord3D &SIGCoords)
 Build constrained triangulation from IGN XML file containing level curves. More...
 
bool buildPolylineFromCourbe (const QDomElement &courbe, const OCoord3D &SIGCoords)
 
size_t simplifyPolylines ()
 
bool createLevelCurvesFromCT (const OCoord3D &SIGCoords, const OBox &selectedZone, double scaleFactor)
 Create level curves from CGAL constrained triangulation. More...
 

Static Public Member Functions

static TYPoint convertLatLonToWebMercator (double latitude, double longitude)
 
static TYPoint getPoint (const QStringList &points, int index, const OCoord3D &SIGCoords, double altitude)
 
static Point getCGALPoint (const QStringList &points, int index, const OCoord3D &SIGCoords, double altitude)
 

Private Attributes

QDomDocument m_xmlDocument
 
bool m_isXmlLoaded
 
bool m_hasRetrievedLevelCurves
 
CT m_ct
 
std::unordered_map< ConstraintIdWrapper, AltimetryInfom_constraintToAltimetryInfoMap
 

Detailed Description

Holds the business logic of parsing the response of level curve IGN web service, in order to send signals to create level curves in Tympan site.

Definition at line 82 of file TYIGNLevelCurvesParser.h.

Constructor & Destructor Documentation

◆ TYIGNLevelCurvesParser()

TYIGNLevelCurvesParser::TYIGNLevelCurvesParser ( QObject *  parent = nullptr)
explicit

Definition at line 20 of file TYIGNLevelCurvesParser.cpp.

Member Function Documentation

◆ buildCTFromXMLFile()

bool TYIGNLevelCurvesParser::buildCTFromXMLFile ( const OCoord3D SIGCoords)

Build constrained triangulation from IGN XML file containing level curves.

Parameters
SIGCoordsThe coordinates of the origin of the zone in Tympan coordinate system
Returns
bool true if succeeds; false if not.

Definition at line 105 of file TYIGNLevelCurvesParser.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ buildPolylineFromCourbe()

bool TYIGNLevelCurvesParser::buildPolylineFromCourbe ( const QDomElement &  courbe,
const OCoord3D SIGCoords 
)

Definition at line 121 of file TYIGNLevelCurvesParser.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ buildXmlDocument()

bool TYIGNLevelCurvesParser::buildXmlDocument ( const QString &  text)

Definition at line 79 of file TYIGNLevelCurvesParser.cpp.

◆ convertLatLonToWebMercator()

TYPoint TYIGNLevelCurvesParser::convertLatLonToWebMercator ( double  latitude,
double  longitude 
)
static

Definition at line 245 of file TYIGNLevelCurvesParser.cpp.

Here is the caller graph for this function:

◆ courbeNiveauCreated

void TYIGNLevelCurvesParser::courbeNiveauCreated ( LPTYCourbeNiveau  courbeNiveau)
signal
Here is the caller graph for this function:

◆ createLevelCurvesFromCT()

bool TYIGNLevelCurvesParser::createLevelCurvesFromCT ( const OCoord3D SIGCoords,
const OBox selectedZone,
double  scaleFactor 
)

Create level curves from CGAL constrained triangulation.

Parameters
SIGCoordsThe coordinates of the origin of the zone in Tympan coordinate system
selectedZoneZone selected by user in IGN coordinate system
scaleFactorScale factor depending from latitude which preserves geometry at the best when projecting in Tympan 2D coordinate system
Returns
bool true if succeeds; false if not.

Definition at line 169 of file TYIGNLevelCurvesParser.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCGALPoint()

Point TYIGNLevelCurvesParser::getCGALPoint ( const QStringList &  points,
int  index,
const OCoord3D SIGCoords,
double  altitude 
)
static

Definition at line 274 of file TYIGNLevelCurvesParser.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getConstraintToAltimetryInfoMap()

std::unordered_map< CT::Constraint_id, AltimetryInfo > & TYIGNLevelCurvesParser::getConstraintToAltimetryInfoMap ( )
inline

Getter for the constraint to AltimetryInfo map.

For test purpose only

Returns
A constant reference to the map associating constraints with AltimetryInfo objects.

Definition at line 146 of file TYIGNLevelCurvesParser.h.

Here is the caller graph for this function:

◆ getCT()

const CT & TYIGNLevelCurvesParser::getCT ( ) const
inline

Getter for the CT member.

Returns
A constant reference to the CT member.

Definition at line 135 of file TYIGNLevelCurvesParser.h.

◆ getPoint()

TYPoint TYIGNLevelCurvesParser::getPoint ( const QStringList &  points,
int  index,
const OCoord3D SIGCoords,
double  altitude 
)
static

Definition at line 259 of file TYIGNLevelCurvesParser.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getXmlDocument()

QDomDocument TYIGNLevelCurvesParser::getXmlDocument ( ) const
inline

Getter for the xmlDocument.

Returns
The xmlDocument.

Definition at line 125 of file TYIGNLevelCurvesParser.h.

◆ hasRetrievedLevelCurves()

bool TYIGNLevelCurvesParser::hasRetrievedLevelCurves ( ) const
inline

Getter for the hasRetrievedLevelCurves flag.

Returns
The hasRetrievedLevelCurves flag.

Definition at line 115 of file TYIGNLevelCurvesParser.h.

◆ isXmlLoaded()

bool TYIGNLevelCurvesParser::isXmlLoaded ( ) const
inline

Getter for the isXmlLoaded flag.

Returns
The isXmlLoaded flag.

Definition at line 105 of file TYIGNLevelCurvesParser.h.

◆ loadXmlFile()

bool TYIGNLevelCurvesParser::loadXmlFile ( const QString &  filePath)

Definition at line 33 of file TYIGNLevelCurvesParser.cpp.

◆ parseXmlData()

void TYIGNLevelCurvesParser::parseXmlData ( const OCoord3D SIGCoords,
const OBox selectedZone,
double  scaleFactor 
)

Definition at line 59 of file TYIGNLevelCurvesParser.cpp.

Here is the call graph for this function:

◆ reset()

void TYIGNLevelCurvesParser::reset ( )

Definition at line 25 of file TYIGNLevelCurvesParser.cpp.

◆ simplifyPolylines()

size_t TYIGNLevelCurvesParser::simplifyPolylines ( )

Definition at line 161 of file TYIGNLevelCurvesParser.cpp.

Here is the caller graph for this function:

Member Data Documentation

◆ m_constraintToAltimetryInfoMap

std::unordered_map<ConstraintIdWrapper, AltimetryInfo> TYIGNLevelCurvesParser::m_constraintToAltimetryInfoMap
private

Definition at line 245 of file TYIGNLevelCurvesParser.h.

◆ m_ct

CT TYIGNLevelCurvesParser::m_ct
private

Definition at line 243 of file TYIGNLevelCurvesParser.h.

◆ m_hasRetrievedLevelCurves

bool TYIGNLevelCurvesParser::m_hasRetrievedLevelCurves
private

Definition at line 241 of file TYIGNLevelCurvesParser.h.

◆ m_isXmlLoaded

bool TYIGNLevelCurvesParser::m_isXmlLoaded
private

Definition at line 240 of file TYIGNLevelCurvesParser.h.

◆ m_xmlDocument

QDomDocument TYIGNLevelCurvesParser::m_xmlDocument
private

Definition at line 239 of file TYIGNLevelCurvesParser.h.


The documentation for this class was generated from the following files: