在图像文件上绘制位置点 [英] plotting location points over image file

查看:73
本文介绍了在图像文件上绘制位置点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,正在寻找一些很好的建议,以便在图像文件的顶部显示一些位置数据(例如经纬度和经度)的简便方法.

本质上,我的应用程序从远程车辆(也称为赛车卡丁车)接收数据(通过USB端口),其中数据来自卡丁车中GPS的纬度和经度.

我希望能够将最后几个位置(例如最近5个位置)显示为图像文件顶部上的点(从最近到最近逐渐变小).图像文件是静态地图(例如,赛道).

我知道我可以将图像文件加载为表单(或其他控件)的背景.我可以创建一个数组来保存位置点集.只是还没有找到一种合理的方法来在图像文件上显示这些点并使其具有正确的宽高比.

也许值得提前说;该应用程序在运行时将无法访问互联网,因此无法在Google地图(或类似地图)上进行叠加.这需要是独立的解决方案.

因此,非常感谢任何有用的建议和示例,甚至甚至引用了其他类似工作.

Hi there, looking for some good suggestions as to a nice and easy way to present some location data (eg lat and long) over the top of an image file.

Essentially my application receives data (via usb port) from a remote vehicle(aka racing kart), within this data is the lat and long from the GPS in the kart.

I want to be able to show the last few locations (say last 5 locations) as dots (getting progressively smaller from most recent to least recent) over the top of an image file. The image file is a static map (eg race track).

I know I could load the image file as a background to a form (or other control). And I can create a array to hold the set of location points. Just haven''t worked out a reasonable way to show those dots over the image file and have it hold the right aspect ratio.

Probably worth saying upfront; The application, when running will not have internet access, so overlaying on google maps (or like) is not an option. This needs to be standalone solution.

So, any useful suggestions and or examples even references to other similar work much appreciated.

推荐答案

您可以为此使用Panel控件.

1)创建一个面板.
2)在面板中将轨道设置为背景图像.
3)将GPS坐标标准化/转换为面板X/Y坐标.
4)使用Panel_Paint子类从数据数组中绘制最后5个点.
5)如果接收到新的数据点,则使面板无效.
You could use a Panel control for this.

1) Create a Panel.
2) Set the track as Background Image in your panel.
3) Normalize/convert your GPS coordinates to panel X/Y-coordinates.
4) Use a Panel_Paint subclass to draw the last 5 dots from the data array.
5) Invalidate the panel if a new datapoint is received.


这篇关于在图像文件上绘制位置点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆