fix: 修改主点偏移与参考图标不匹配的问题

This commit is contained in:
xiaoyan 2023-09-07 17:28:09 +08:00
parent bcc11946a1
commit 408d98ddea

View File

@ -18,7 +18,7 @@ class ImportPreProcess {
val code2NameMap = Code2NameMap()
lateinit var cacheRdLink: Map<String?, RenderEntity>
val defaultTranslateDistance = 3.0
val testFlag:Boolean = true
val testFlag:Boolean = false
fun checkCircleRoad(renderEntity: RenderEntity): Boolean {
// val linkInId = renderEntity.properties["linkIn"]
// val linkOutId = renderEntity.properties["linkOut"]
@ -58,7 +58,7 @@ class ImportPreProcess {
)!=null) {
var angle = renderEntity?.properties?.get("angle")?.toDouble()!!
// angle角度为与正北方向的顺时针夹角将其转换为与X轴正方向的逆时针夹角即为正东方向的夹角
angle = -((450 - angle) % 360)
angle = ((450 - angle) % 360)
radian = Math.toRadians(angle)
} else {
var isReverse = false // 是否为逆向
@ -135,7 +135,7 @@ class ImportPreProcess {
// angle += 180
// }
// angle角度为与正北方向的顺时针夹角将其转换为与X轴正方向的逆时针夹角即为正东方向的夹角
angle = -((450 - angle) % 360)
angle = ((450 - angle) % 360)
radian = Math.toRadians(angle)
} else if (Geometry.TYPENAME_LINESTRING == geometry?.geometryType) {
var coordinates = geometry.coordinates
@ -309,7 +309,7 @@ class ImportPreProcess {
"angle"
)?.toDouble()!!
// angle角度为与正北方向的顺时针夹角将其转换为与X轴正方向的逆时针夹角即为正东方向的夹角
angle = -((450 - angle) % 360)
angle = ((450 - angle) % 360)
radian = Math.toRadians(angle)
} else if (Geometry.TYPENAME_LINESTRING == geometry?.geometryType) {
var coordinates = geometry.coordinates
@ -333,7 +333,7 @@ class ImportPreProcess {
}
} else renderEntity?.properties?.get("angle")?.toDouble()!!
angle = -((450 - angle) % 360)
angle = ((450 - angle) % 360)
radian = Math.toRadians(angle)
}
@ -697,7 +697,7 @@ class ImportPreProcess {
"angle"
)?.toDouble()!!
// angle角度为与正北方向的顺时针夹角将其转换为与X轴正方向的逆时针夹角即为正东方向的夹角
angle = -((450 - angle) % 360)
angle = ((450 - angle) % 360)
radian = Math.toRadians(angle)
} else if (Geometry.TYPENAME_LINESTRING == geometry?.geometryType) {
var coordinates = geometry.coordinates
@ -718,7 +718,7 @@ class ImportPreProcess {
}
} else renderEntity?.properties?.get("angle")?.toDouble()!!
angle = -((450 - angle) % 360)
angle = ((450 - angle) % 360)
radian = Math.toRadians(angle)
}