View unanswered posts | View active topics It is currently 2021-12-03 6:29



Reply to topic  [ 5 posts ] 
 请教一个通过距离获取指定地点经纬度坐标的问题 
Author Message
新手上路

Joined: 2010-08-07 14:51
Posts: 38
Post 请教一个通过距离获取指定地点经纬度坐标的问题
在TWaver GIS for Java版本中,使用如下代码将ShapeNode放入地图中显示:

ShapeNode shapeNode = new ShapeNode();
shapeNode.setShapeNodeType(TWaverConst.SHAPENODE_STRAIGHT_LINE);
shapeNode.setName("shapeNode");
List points = new ArrayList();
points.add(new GeoCoordinate(10, 20));//点1
points.add(new GeoCoordinate(30, 30));//点2
points.add(new GeoCoordinate(20, 60));//点3
points.add(new GeoCoordinate(30, 45));//点4
shapeNode.putClientProperty(TWaverGisConst.SHAPE_BOUNDS, points);
shapeNode.putCustomDrawOutlineColor(new Color(11, 143, 226, 200));
network.getDataBox().addElement(shapeNode);

运行效果请见附件图片。

问题:假定ShapeNode对应的总长度为10000m,并且以“点1”为起点,那么是否可以实现通过给出指定距离(比如9050m处),就可以得到该地点的经纬度?


Attachments:
gis shapenode2.png
gis shapenode2.png [ 63.87 KiB | Viewed 577 times ]
2021-08-16 13:59
Profile
TWaver开发组
User avatar

Joined: 2017-02-22 10:01
Posts: 485
Post Re: 请教一个通过距离获取指定地点经纬度坐标的问题
应该是可以的,可以获取点的屏幕坐标,在转成对应的经纬度坐标。


2021-08-18 9:40
Profile
新手上路

Joined: 2010-08-07 14:51
Posts: 38
Post Re: 请教一个通过距离获取指定地点经纬度坐标的问题
问题恰好就是如何知道指定距离点对应的屏幕坐标? grin


2021-08-18 15:31
Profile
TWaver开发组
User avatar

Joined: 2017-02-22 10:01
Posts: 485
Post Re: 请教一个通过距离获取指定地点经纬度坐标的问题
你都知道你shape的点坐标了,根据总长度还有实际长度,肯定可以算出来啊。


2021-08-19 17:45
Profile
新手上路

Joined: 2010-08-07 14:51
Posts: 38
Post Re: 请教一个通过距离获取指定地点经纬度坐标的问题
是的,已经解决了。基本思路就是通过shapenode的控制点将线条分段,根据目标距离可以确定目标点落在哪一段内,然后结合该段的方位角即可确定目标点的具体坐标。


2021-08-26 22:31
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron