fix: omdb_config增加是否引入3D Z轴数据参数,默认不引入,如果引入,数据按照3D样式渲染

This commit is contained in:
2023-08-22 13:54:14 +08:00
parent df2524244f
commit b3bb83032b
6 changed files with 58 additions and 7 deletions

View File

@@ -25,8 +25,7 @@ open class RenderEntity() : RealmObject(), Parcelable {
lateinit var name: String //要素名
lateinit var table: String //要素表名
var code: String = "0" // 要素编码
var geometry: String =
"" // 要素渲染参考的geometry该数据可能会在导入预处理环节被修改原始geometry会保存在properties的geometry字段下
var geometry: String = "" // 要素渲染参考的geometry该数据可能会在导入预处理环节被修改原始geometry会保存在properties的geometry字段下
get() {
wkt = GeometryTools.createGeometry(field)
return field

View File

@@ -146,7 +146,7 @@ public class OMDBDataDecoder extends TileDecoder {
for (int i = 0; i < length; i++) {
// double z = longitudeToX(MercatorProjection.pixelXToLongitudeWithScale(MercatorProjection.metersToPixelsWithScale((float) coordinates[i].z, coordinates[i].y, mTileScale), mTileScale))* mTileScale/8;
mMapElement.addPoint((float) ((longitudeToX(coordinates[i].x) - mTileX) * mTileScale),
(float) ((latitudeToY(coordinates[i].y) - mTileY) * mTileScale), 0);
(float) ((latitudeToY(coordinates[i].y) - mTileY) * mTileScale), (float) coordinates[i].z);
}
// int length = removeLast ? coordinates.length - 1 : coordinates.length;

View File

@@ -143,7 +143,7 @@ public class OMDBReferenceDecoder extends TileDecoder {
// 将Z坐标的米转换为屏幕像素坐标
// double z = longitudeToX(MercatorProjection.pixelXToLongitudeWithScale(MercatorProjection.metersToPixelsWithScale((float) coordinates[i].z, coordinates[i].y, mTileScale), mTileScale))* mTileScale/8;
mMapElement.addPoint((float) ((longitudeToX(coordinates[i].x) - mTileX) * mTileScale),
(float) ((latitudeToY(coordinates[i].y) - mTileY) * mTileScale), 0);
(float) ((latitudeToY(coordinates[i].y) - mTileY) * mTileScale), (float) coordinates[i].z);
}
// int length = removeLast ? coordinates.length - 1 : coordinates.length;