水准导出「测段.LEV」文件的格式调整;更新totalstation-release.aar

main_modify
chenglifeng 9 months ago
parent c9ac786342
commit 61545ff425
  1. BIN
      aar/totalstation/totalstation-release.aar
  2. 14
      app/src/main/java/com/bingce/controlnetwork/func/level/util/LevelExportUtilTj.kt

@ -45,7 +45,7 @@ class LevelExportUtilTj {
private var endPointName = ""
private val printSbLev = StringBuilder()
private var printSbLev = StringBuilder()
/**
* 导出路线文件夹下的数据
@ -54,6 +54,8 @@ class LevelExportUtilTj {
fun doExportRouteData(projectId: String, routeId: String) {
val routeRecord = LevelingDbFactory.instance.levelDataSource.getByIdSync(routeId)
?: throw IllegalArgumentException("routeRecord==null")
// 初始化,防止导出多条路线时,后面的会在前面的基础上继续拼接
printSbLev = StringBuilder()
//路线的基础数据
confirmRouteCommonData(routeRecord)
//收集路线的具体数据
@ -434,7 +436,8 @@ class LevelExportUtilTj {
//结束点高程
appendZ(
lastFinishStation.frontSightPointId,
getFrontPointZ(stationHeightDiffTotal)
getFrontPointZ(stationHeightDiffTotal),
true
)
column1Index++
//end-line
@ -565,12 +568,15 @@ class LevelExportUtilTj {
return SurveyorDatabaseFactory.instance.pointDataSource.findByIdSync(pointId)
}
private fun appendZ(pointId: String, height: Double) {
/**
* @param isShowEndPoint 是否显示最后一个点
*/
private fun appendZ(pointId: String, height: Double, isShowEndPoint: Boolean = false) {
val startPoint = getPoint(pointId)
val z = LevelFormatUtil.formatHeight(height)
val dataSecondLine = LevelExportLine(
LevelExportLine.Column1(column1Index),
LevelExportLine.Column2("KD1", getPointName(startPoint), ""),
LevelExportLine.Column2("KD1", if (isShowEndPoint) endPointName else getPointName(startPoint), ""),
LevelExportLine.ColumnHeight("", ""),
LevelExportLine.ColumnDistance(""),
LevelExportLine.ColumnEnd("Z", "$z m")

Loading…
Cancel
Save