简体   繁体   English

在没有起点的情况下将X / Y转换为纬度/经度

[英]Converting X/Y to Lat/Long without point of origin

I have tens of thousands of X/Y points that are designed to be displayed on a black background instead of a map. 我有成千上万的X / Y点设计为显示在黑色背景而不是地图上。 Think of a rail network. 想想铁路网。

However I would like to display them on a map. 但是,我想在地图上显示它们。 I can manually get latitudes and longitudes of the points and associate them with some of the x/y's. 我可以手动获取这些点的纬度和经度,并将它们与某些x / y关联。 I find a street and use another online tool to get the lat/long of that point. 我找到一条街道,并使用另一个在线工具获取该点的经/纬度。

I was wondering if there is some code that could calculate the positions of the other points? 我想知道是否有一些代码可以计算其他点的位置?

I'm open to feedback about the question to provide more clarity. 我愿意就该问题提供反馈,以提供更多信息。

UPDATE: 更新:

It is for a web application (Google Maps API) and based in the United Kingdom. 它用于Web应用程序(Google Maps API),位于英国。

You should reproject lat/lon to a geometric coordinate system like UTM coordinate system or WebMercator (they have the same origin of lat/lon). 您应该将经纬度重新投影到UTM坐标系或WebMercator之类的几何坐标系(它们的经纬度原点相同)。 Otherwise you coud use a library for gis or similiar applications (just check DotSpatial ). 否则,您可以将库用于gis或类似的应用程序(只需检查DotSpatial即可 )。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM