Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
ogs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dmitri Naumov
ogs
Commits
d1e3e96d
Commit
d1e3e96d
authored
12 years ago
by
Karsten Rink
Browse files
Options
Downloads
Patches
Plain Diff
added missing sensordata-part in stn-reader, fixed missing library reference in cmakefile
parent
c7c7fb76
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
FileIO/XmlIO/XmlStnInterface.cpp
+13
-11
13 additions, 11 deletions
FileIO/XmlIO/XmlStnInterface.cpp
SimpleTests/MeshTests/CMakeLists.txt
+4
-0
4 additions, 0 deletions
SimpleTests/MeshTests/CMakeLists.txt
with
17 additions
and
11 deletions
FileIO/XmlIO/XmlStnInterface.cpp
+
13
−
11
View file @
d1e3e96d
...
@@ -95,19 +95,24 @@ void XmlStnInterface::readStations( const QDomNode &stationsRoot,
...
@@ -95,19 +95,24 @@ void XmlStnInterface::readStations( const QDomNode &stationsRoot,
station
.
hasAttribute
(
"y"
))
station
.
hasAttribute
(
"y"
))
{
{
std
::
string
stationName
(
"[NN]"
);
std
::
string
stationName
(
"[NN]"
);
std
::
string
sensor_data_file_name
(
""
);
std
::
string
boreholeDate
(
"0000-00-00"
);
std
::
string
boreholeDate
(
"0000-00-00"
);
double
boreholeDepth
(
0.0
),
stationValue
(
0.0
);
double
boreholeDepth
(
0.0
),
stationValue
(
0.0
);
QDomNodeList
stationFeatures
=
station
.
childNodes
();
QDomNodeList
stationFeatures
=
station
.
childNodes
();
for
(
int
i
=
0
;
i
<
stationFeatures
.
count
();
i
++
)
for
(
int
i
=
0
;
i
<
stationFeatures
.
count
();
i
++
)
{
{
// check for general station features
const
QDomNode
feature_node
(
stationFeatures
.
at
(
i
));
const
QDomNode
feature_node
(
stationFeatures
.
at
(
i
));
const
QString
feature_name
(
feature_node
.
nodeName
());
const
QString
feature_name
(
feature_node
.
nodeName
());
const
std
::
string
element_text
(
feature_node
.
toElement
().
text
().
toStdString
());
const
std
::
string
element_text
(
feature_node
.
toElement
().
text
().
toStdString
());
if
(
feature_name
.
compare
(
"name"
)
==
0
)
if
(
feature_name
.
compare
(
"name"
)
==
0
)
stationName
=
feature_node
.
toElement
().
text
().
toStdString
();
stationName
=
feature_node
.
toElement
().
text
().
toStdString
();
if
(
feature_name
.
compare
(
"sensordata"
)
==
0
)
sensor_data_file_name
=
feature_node
.
toElement
().
text
().
toStdString
();
/* add other station features here */
/* add other station features here */
// check for general borehole features
else
if
(
feature_name
.
compare
(
"value"
)
==
0
)
else
if
(
feature_name
.
compare
(
"value"
)
==
0
)
stationValue
=
strtod
(
element_text
.
c_str
(),
0
);
stationValue
=
strtod
(
element_text
.
c_str
(),
0
);
else
if
(
feature_name
.
compare
(
"bdepth"
)
==
0
)
else
if
(
feature_name
.
compare
(
"bdepth"
)
==
0
)
...
@@ -117,10 +122,7 @@ void XmlStnInterface::readStations( const QDomNode &stationsRoot,
...
@@ -117,10 +122,7 @@ void XmlStnInterface::readStations( const QDomNode &stationsRoot,
/* add other borehole features here */
/* add other borehole features here */
}
}
double
zVal
=
(
station
.
hasAttribute
(
"z"
))
?
strtod
((
station
.
attribute
(
double
zVal
=
(
station
.
hasAttribute
(
"z"
))
?
strtod
((
station
.
attribute
(
"z"
)).
toStdString
().
c_str
(),
0
)
:
0.0
;
"z"
)).
toStdString
().
c_str
(),
0
)
:
0.0
;
if
(
station
.
nodeName
().
compare
(
"station"
)
==
0
)
if
(
station
.
nodeName
().
compare
(
"station"
)
==
0
)
{
{
...
@@ -128,9 +130,11 @@ void XmlStnInterface::readStations( const QDomNode &stationsRoot,
...
@@ -128,9 +130,11 @@ void XmlStnInterface::readStations( const QDomNode &stationsRoot,
new
GeoLib
::
Station
(
new
GeoLib
::
Station
(
strtod
((
station
.
attribute
(
"x"
)).
toStdString
().
c_str
(),
0
),
strtod
((
station
.
attribute
(
"x"
)).
toStdString
().
c_str
(),
0
),
strtod
((
station
.
attribute
(
"y"
)).
toStdString
().
c_str
(),
0
),
strtod
((
station
.
attribute
(
"y"
)).
toStdString
().
c_str
(),
0
),
zVal
,
zVal
,
stationName
);
stationName
);
s
->
setStationValue
(
stationValue
);
s
->
setStationValue
(
stationValue
);
if
(
!
sensor_data_file_name
.
empty
())
s
->
addSensorDataFromCSV
(
BaseLib
::
copyPathToFileName
(
sensor_data_file_name
,
station_file_name
));
stations
->
push_back
(
s
);
stations
->
push_back
(
s
);
}
}
else
if
(
station
.
nodeName
().
compare
(
"borehole"
)
==
0
)
else
if
(
station
.
nodeName
().
compare
(
"borehole"
)
==
0
)
...
@@ -144,17 +148,15 @@ void XmlStnInterface::readStations( const QDomNode &stationsRoot,
...
@@ -144,17 +148,15 @@ void XmlStnInterface::readStations( const QDomNode &stationsRoot,
boreholeDate
);
boreholeDate
);
s
->
setStationValue
(
stationValue
);
s
->
setStationValue
(
stationValue
);
/* add stratigraphy to the borehole */
/* add stratigraphy to the borehole */
for
(
int
i
=
0
;
i
<
stationFeatures
.
count
();
i
++
)
for
(
int
j
=
0
;
j
<
stationFeatures
.
count
();
j
++
)
if
(
stationFeatures
.
at
(
i
).
nodeName
().
compare
(
"strat"
)
==
0
)
if
(
stationFeatures
.
at
(
j
).
nodeName
().
compare
(
"strat"
)
==
0
)
this
->
readStratigraphy
(
stationFeatures
.
at
(
i
),
s
);
this
->
readStratigraphy
(
stationFeatures
.
at
(
j
),
s
);
stations
->
push_back
(
s
);
stations
->
push_back
(
s
);
}
}
}
}
else
else
std
::
cout
<<
std
::
cout
<<
"XmlStnInterface::readStations() - Attribute missing in <station> tag ..."
<<
std
::
endl
;
"XmlStnInterface::readStations() - Attribute missing in <station> tag ..."
<<
std
::
endl
;
station
=
station
.
nextSiblingElement
();
station
=
station
.
nextSiblingElement
();
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
SimpleTests/MeshTests/CMakeLists.txt
+
4
−
0
View file @
d1e3e96d
IF
(
WIN32
)
SET
(
ADDITIONAL_LIBS Winmm.lib
)
ENDIF
()
INCLUDE_DIRECTORIES
(
INCLUDE_DIRECTORIES
(
.
.
...
@@ -23,6 +26,7 @@ TARGET_LINK_LIBRARIES ( MeshRead
...
@@ -23,6 +26,7 @@ TARGET_LINK_LIBRARIES ( MeshRead
BaseLib
BaseLib
GeoLib
GeoLib
logog
logog
${
ADDITIONAL_LIBS
}
)
)
# Create CollapseMeshNodes executable
# Create CollapseMeshNodes executable
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment