Conflicts:
	vtm
This commit is contained in:
qiji4215
2023-06-28 11:14:12 +08:00
82 changed files with 2165 additions and 431 deletions

View File

@@ -79,7 +79,7 @@ dependencies {
implementation "net.sf.kxml:kxml2:2.3.0"
implementation 'org.slf4j:slf4j-api:2.0.7'
implementation project(":vtm-themes")
implementation project(":vtm-android")
api project(":vtm-android")
implementation project(':vtm-extras')
implementation project(":vtm-http")
// implementation "org.mapsforge:vtm-themes:$vtmVersion"
@@ -109,10 +109,8 @@ dependencies {
implementation "com.google.protobuf:protobuf-java:3.6.1"
implementation "com.wdtinc:mapbox-vector-tile:3.1.0"
implementation "com.caverock:androidsvg:1.4"
implementation "com.badlogicgames.gdx:gdx:1.11.0"
implementation "com.badlogicgames.gdx:gdx-backend-android:1.11.0"
implementation "com.caverock:androidsvg:1.4"
// api "org.mapsforge:vtm-jts:$vtmVersion"
api project(":vtm-jts")
api 'org.locationtech.jts:jts-core:1.19.0'

View File

@@ -174,7 +174,8 @@
<!-- omdb -->
<style-line id="boundaryType" stipple-width="0.1" width="0.1" />
<style-line id="s2e" dasharray="1,1" repeat-gap="3" repeat-start="0" stroke="#14582c"
width="0.1" />
<!--###### ASSIGNMENT ######-->
<m e="way" k="natural" v="issea|sea">
@@ -1478,83 +1479,83 @@
</m>
</m>
<!-- 自定义渲染样式 -->
<m k="navi_type" zoom-max="22" zoom-min="15">
<!-- 车道中心线 -->
<m v="had_lane_link">
<line dasharray="20,20" fix="true" stipple-stroke="#00000000" stroke="#ff0000"
width="0.3" />
</m>
<!-- 车道边线 -->
<m v="had_lane_mark_link">
<line stipple-width="0.5" stroke="#0000ff" width="0.1" />
</m>
<!--道路箭头 objectArrow-->
<m v="object_arrow">
<area fade="5" fill="#88aaaa00" stroke="#ff0000" stroke-width="0.1"></area>
</m>
<!--人行横道 objectcrosswalk-->
<m v="object_crosswalk">
<area fill="#88800080" stroke="#ff0000" stroke-width="0.2"></area>
<caption style="bold" dy="12" fill="#4D2F08" k="name" size="14" stroke="#ffffff"
stroke-width="2.0" />
<caption style="bold" dy="-12" fill="#4D2F08" k="ele" size="12" stroke="#ffffff"
stroke-width="2.0" />
</m>
<!--杆状物 objectpole-->
<m v="object_pole">
<line stipple-width="0.5" stroke="#8800aaaa" width="0.1" />
</m>
<!--对象标志 objectsymbol-->
<m v="object_symbol">
<area fill="#880000cc" stroke="#0000cc" stroke-width="0.2"></area>
</m>
<!--交通信号灯 objectTrfficLights-->
<m v="object_trrfic">
<area fill="#8800cc00" stroke="#00cc00" stroke-width="0.2"></area>
</m>
<!-- &lt;!&ndash; 自定义渲染样式 &ndash;&gt;-->
<!-- <m k="navi_type" zoom-max="22" zoom-min="15">-->
<!-- &lt;!&ndash; 车道中心线 &ndash;&gt;-->
<!-- <m v="had_lane_link">-->
<!-- <line dasharray="20,20" fix="true" stipple-stroke="#00000000" stroke="#ff0000"-->
<!-- width="0.3" />-->
<!-- </m>-->
<!-- &lt;!&ndash; 车道边线 &ndash;&gt;-->
<!-- <m v="had_lane_mark_link">-->
<!-- <line stipple-width="0.5" stroke="#0000ff" width="0.1" />-->
<!-- </m>-->
<!-- &lt;!&ndash;道路箭头 objectArrow&ndash;&gt;-->
<!-- <m v="object_arrow">-->
<!-- <area fade="5" fill="#88aaaa00" stroke="#ff0000" stroke-width="0.1"></area>-->
<!-- </m>-->
<!-- &lt;!&ndash;人行横道 objectcrosswalk&ndash;&gt;-->
<!-- <m v="object_crosswalk">-->
<!-- <area fill="#88800080" stroke="#ff0000" stroke-width="0.2"></area>-->
<!-- <caption style="bold" dy="12" fill="#4D2F08" k="name" size="14" stroke="#ffffff"-->
<!-- stroke-width="2.0" />-->
<!-- <caption style="bold" dy="-12" fill="#4D2F08" k="ele" size="12" stroke="#ffffff"-->
<!-- stroke-width="2.0" />-->
<!-- </m>-->
<!-- &lt;!&ndash;杆状物 objectpole&ndash;&gt;-->
<!-- <m v="object_pole">-->
<!-- <line stipple-width="0.5" stroke="#8800aaaa" width="0.1" />-->
<!-- </m>-->
<!-- &lt;!&ndash;对象标志 objectsymbol&ndash;&gt;-->
<!-- <m v="object_symbol">-->
<!-- <area fill="#880000cc" stroke="#0000cc" stroke-width="0.2"></area>-->
<!-- </m>-->
<!-- &lt;!&ndash;交通信号灯 objectTrfficLights&ndash;&gt;-->
<!-- <m v="object_trrfic">-->
<!-- <area fill="#8800cc00" stroke="#00cc00" stroke-width="0.2"></area>-->
<!-- </m>-->
<m zoom-max="19" zoom-min="15">
<text use="ferry" />
</m>
<!-- <m zoom-max="19" zoom-min="15">-->
<!-- <text use="ferry" />-->
<!-- </m>-->
<!--道路方向-->
<m v="symbol_object_arrow">
<symbol use="oneway"></symbol>
</m>
<!--杆状物-->
<m v="symbol_object_pole">
<symbol src="assets:symbols/gondola.svg" />
</m>
<!--对象标志-->
<m v="symbol_object_symbol">
<symbol src="assets:symbols/peak.svg" />
</m>
<!--交通信号灯-->
<m v="symbol_object_traffic">
<symbol src="assets:symbols/traffic_signal.svg" />
</m>
</m>
<!-- &lt;!&ndash;道路方向&ndash;&gt;-->
<!-- <m v="symbol_object_arrow">-->
<!-- <symbol use="oneway"></symbol>-->
<!-- </m>-->
<!-- &lt;!&ndash;杆状物&ndash;&gt;-->
<!-- <m v="symbol_object_pole">-->
<!-- <symbol src="assets:symbols/gondola.svg" />-->
<!-- </m>-->
<!-- &lt;!&ndash;对象标志&ndash;&gt;-->
<!-- <m v="symbol_object_symbol">-->
<!-- <symbol src="assets:symbols/peak.svg" />-->
<!-- </m>-->
<!-- &lt;!&ndash;交通信号灯&ndash;&gt;-->
<!-- <m v="symbol_object_traffic">-->
<!-- <symbol src="assets:symbols/traffic_signal.svg" />-->
<!-- </m>-->
<!-- </m>-->
<m k="nav_style">
<m v="symbol_object_line">
<m k="rule" zoom-max="22" zoom-min="15">
<!-- 蓝色黑色间隔线 -->
<m v="blue_link">
<line dasharray="20,20" fix="true" stipple-stroke="#00000000" stroke="#00000000"
width="0.1" />
</m>
<!-- 黄色线 -->
<m v="yellow_link">
<line stipple-width="0.1" stroke="#f4ea2a" width="0.1" />
</m>
</m>
<line stipple-width="0.5" stroke="#33aaaa" width="0.3" />
</m>
<m v="symbol_track_point" zoom-max="25" zoom-min="10">
<symbol src="assets:symbols/dot_blue.svg" />
</m>
</m>
<!-- <m k="nav_style">-->
<!-- <m v="symbol_object_line">-->
<!-- <m k="rule" zoom-max="22" zoom-min="15">-->
<!-- &lt;!&ndash; 蓝色黑色间隔线 &ndash;&gt;-->
<!-- <m v="blue_link">-->
<!-- <line dasharray="20,20" fix="true" stipple-stroke="#00000000" stroke="#00000000"-->
<!-- width="0.1" />-->
<!-- </m>-->
<!-- &lt;!&ndash; 黄色线 &ndash;&gt;-->
<!-- <m v="yellow_link">-->
<!-- <line stipple-width="0.1" stroke="#f4ea2a" width="0.1" />-->
<!-- </m>-->
<!-- </m>-->
<!-- <line stipple-width="0.5" stroke="#33aaaa" width="0.3" />-->
<!-- </m>-->
<!-- <m v="symbol_track_point" zoom-max="25" zoom-min="10">-->
<!-- <symbol src="assets:symbols/dot_blue.svg" />-->
<!-- </m>-->
<!-- </m>-->
<m k="qi_table">
<!--车道数-->
@@ -1799,13 +1800,41 @@
symbol-width="76"></symbol>
</m>
<m k="type" v="s_2_e">
<line dasharray="1,1" repeat-gap="3" repeat-start="0" stroke="#14582c"
width="0.1" />
<line use="s2e" />
</m>
</m>
<!--电子眼-->
<m v="OMDB_ELECTRONICEYE">
<m k="angle">
<symbol repeat="false" repeat-start="0" rotate="false"
src="assets:symbols/volcano.svg" symbol-height="69" symbol-width="69"></symbol>
</m>
<caption k="name" fill="#000000" priority="0" size="14" stroke="#ffffff" stroke-width="1.0" dy="-30"></caption>
<m k="type" v="angle">
<symbol repeat="false" repeat-gap="2000" repeat-start="0" rotate="true"
src="assets:omdb/icon_arrow_right.svg" symbol-height="76"
symbol-width="76"></symbol>
</m>
<m k="type" v="s_2_e">
<line use="s2e" />
</m>
</m>
<!-- 路口 -->
<m v="OMDB_INTERSECTION">
<m k="type" v="node">
<symbol src="assets:symbols/dot_blue_dark.svg"></symbol>
</m>
<m k="intersectionPid">
<symbol src="assets:symbols/dot_magenta.svg"></symbol>
</m>
</m>
<!-- 道路名 -->
<m v="OMDB_LINK_NAME">
<text use="road"></text>
</m>
<!-- 车信 -->
<m v="OMDB_LANEINFO">
<text use="road"></text>
</m>
</m>
</rendertheme>

View File

@@ -1,5 +1,6 @@
package com.navinfo.collect.library.data.entity
import android.os.Parcelable
import com.navinfo.collect.library.system.Constant
import com.navinfo.collect.library.utils.GeometryTools
import com.navinfo.collect.library.utils.GeometryToolsKt
@@ -8,6 +9,7 @@ import io.realm.RealmObject
import io.realm.RealmSet
import io.realm.annotations.Ignore
import io.realm.annotations.PrimaryKey
import kotlinx.parcelize.Parcelize
import org.locationtech.jts.geom.Coordinate
import org.locationtech.jts.geom.Geometry
import org.oscim.core.MercatorProjection
@@ -16,13 +18,15 @@ import java.util.*
/**
* 渲染要素对应的实体
* */
open class RenderEntity() : RealmObject() {
@Parcelize
open class RenderEntity() : RealmObject(), Parcelable {
@PrimaryKey
var id: String = UUID.randomUUID().toString() // id
lateinit var name: String //要素名
lateinit var table: String //要素表名
var code: Int = 0 // 要素编码
var geometry: String = "" // 要素渲染参考的geometry该数据可能会在导入预处理环节被修改原始geometry会保存在properties的geometry字段下
var geometry: String =
"" // 要素渲染参考的geometry该数据可能会在导入预处理环节被修改原始geometry会保存在properties的geometry字段下
get() {
wkt = GeometryTools.createGeometry(field)
return field
@@ -56,7 +60,7 @@ open class RenderEntity() : RealmObject() {
var tileX: RealmSet<Int> = RealmSet() // x方向的tile编码
var tileY: RealmSet<Int> = RealmSet() // y方向的tile编码
constructor(name: String): this() {
constructor(name: String) : this() {
this.name = name
}
@@ -65,9 +69,11 @@ open class RenderEntity() : RealmObject() {
//道路linkId
const val linkPid = "linkPid"
}
object LimitTable {
const val linkPid = "linkPid"
}
object KindCodeTable {
const val linkPid = "linkPid"
}

View File

@@ -293,7 +293,7 @@ public class GeometryTools {
* @param coords []
* @return Geometry
*/
public LineString createLineString(Coordinate[] coords) {
public static LineString createLineString(Coordinate[] coords) {
LineString lineString = null;
GeometryFactory factory = new GeometryFactory();
lineString = factory.createLineString(coords);