是否存在将纬度和经度更改为一个数字的公式? [英] Is there a formula to change a latitude and longitude into a single number?

查看:79
本文介绍了是否存在将纬度和经度更改为一个数字的公式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您能告诉我是否存在将纬度和经度更改为一个数字的公式吗?

Can you tell me if there is a formula to change a latitude and longitude into a single number?

我计划将其用于提供送货路线的软件中的数据库表.表格行将具有该编号以及邮政地址.数据库表将按升序排列,以便软件可以确定卡车需要移至第一个,第二个等的地址.

I plan to use this for a database table in software that provides routing for deliveries. The table row would have that number as well as the postal address. The database table would be sorted in ascending numeric order so the software can figure out which address the truck would need to go to first, second etc.

请您回答显示VB或VB.Net语法,以便我了解其工作原理吗?

Please can you respond showing VB or VB.Net syntax so I can understand how it works?

例如,我将以下数字用于纬度和经度: 纬度= 40.71412890 长= -73.96140740

For example I would use the following numbers for the latitude and longitude: Lat = 40.71412890 Long = -73.96140740

其他信息:

我正在使用Basic4Android开发一个Android应用程序. Basic4Android使用带有SQLite的VB或VB.Net语法作为数据库.

I'm developing an Android app using Basic4Android. Basic4Android uses a VB or VB.Net syntax with SQLite as the database.

此应用的一部分将进行路线规划.我想将此数字用作SQLite表的第一列,而其他列将用作地址.如果我在应用程序中进行查询,然后按数字升序对行进行排序,那么我将能够找出哪个邮寄地址彼此最接近,这样一来,我花费的时间就更少了.

Part of this app will have route planning. I want to use this number as the first column in an SQLite table and the other columns will be for the address. If I do a query within the app that sorts the rows in numerical ascending order, I will be able to figure out which postal address are closest to each other so it will take less time for me to go from house to house.

例如,如果数字为: 194580、199300、178221

For example, if the numbers were: 194580, 199300, 178221

我可以先去邮政地址178221,然后再去194580,最后到199300,这样我就不必花很多时间就可以对我的邮件进行分类了.

I can go to postal address 178221 then to 194580 and finally to 199300 and I won't need to take the long way around town to do my deliveries after they were sorted.

作为一种选择,如果有一种简便的方法可以调用Web服务,并且如果我将邮政地址发送到网站,该方法可以返回一个包含单个数字的json响应,我将很高兴. Basic4Android确实具有可以将请求发送到网站的http服务.

As an alternative, I would be happy if there was an easy way to call a web service that returns maybe a json response that has the single number if I send a postal address to the web site. Basic4Android does have http services that can send requests to a web site.

推荐答案

我发现我可以通过添加特定地址的经度和纬度来获得良好的结果,方法是不包括房屋号,并通过在门牌号之后按升序第二个排序后添加数字.

I found I can get good results by adding the latitude and longitude of a particular address by not including the house number and sorting the results in the database table by the added number following by a 2nd sort on the house number in ascending order.

我使用此网址获取需要加在一起的数字:

I used this url to get the numbers I needed to add together:

http://where.yahooapis.com/geocode?q=stedman+st,+lowell,+ma

这篇关于是否存在将纬度和经度更改为一个数字的公式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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