merge code

This commit is contained in:
qiji4215
2023-08-15 16:15:07 +08:00
parent de86fb57fb
commit 04d8922c90
7 changed files with 117 additions and 63 deletions

View File

@@ -158,12 +158,19 @@
"transformer2Code": ""
},
"2204":{
"table": "OMDB_RoundAbout",
"table": "OMDB_ROUNDABOUT",
"code": 2204,
"name": "环岛",
"zoomMin": 15,
"zoomMax": 17,
"transformer2Code": ""
"transformer": [
{
"k": "geometry",
"v": "~",
"klib": "geometry",
"vlib": "generateS2EReferencePoint()"
}
]
},
"2205":{
"table": "OMDB_LINK_FORM1",

View File

@@ -218,6 +218,7 @@ class ImportPreProcess {
val startReference = ReferenceEntity()
startReference.renderEntityId = renderEntity.id
startReference.name = "${renderEntity.name}参考点"
startReference.code = renderEntity.code
startReference.table = renderEntity.table
startReference.zoomMin = renderEntity.zoomMin
startReference.zoomMax = renderEntity.zoomMax
@@ -225,8 +226,7 @@ class ImportPreProcess {
startReference.enable = renderEntity.enable
// 起点坐标
startReference.geometry =
GeometryTools.createGeometry(GeoPoint(pointStart.y, pointStart.x)).toString()
startReference.geometry = GeometryTools.createGeometry(GeoPoint(pointStart.y, pointStart.x)).toString()
startReference.properties = renderEntity.properties
startReference.properties["qi_table"] = renderEntity.table
Log.e("qj","generateS2EReferencePoint===$table===$proKey")
@@ -238,13 +238,16 @@ class ImportPreProcess {
}
} else {
startReference.properties["type"] = "s_2_p"
Log.e("qj","generateS2EReferencePoint===s_2_p${renderEntity.name}")
}
startReference.properties["geometry"] = startReference.geometry
Realm.getDefaultInstance().insert(startReference)
val endReference = ReferenceEntity()
endReference.renderEntityId = renderEntity.id
endReference.name = "${renderEntity.name}参考点"
endReference.code = renderEntity.code
endReference.table = renderEntity.table
endReference.zoomMin = renderEntity.zoomMin
endReference.zoomMax = renderEntity.zoomMax
@@ -252,8 +255,7 @@ class ImportPreProcess {
endReference.enable = renderEntity.enable
// 终点坐标
endReference.geometry =
GeometryTools.createGeometry(GeoPoint(pointEnd.y, pointEnd.x)).toString()
endReference.geometry = GeometryTools.createGeometry(GeoPoint(pointEnd.y, pointEnd.x)).toString()
endReference.properties = renderEntity.properties
endReference.properties["qi_table"] = renderEntity.table
if (renderEntity.table == table) {
@@ -262,7 +264,9 @@ class ImportPreProcess {
}
} else {
endReference.properties["type"] = "e_2_p"
Log.e("qj","generateS2EReferencePoint===e_2_p${renderEntity.name}")
}
endReference.properties["geometry"] = endReference.geometry
Realm.getDefaultInstance().insert(endReference)
}