如何根据位置接近度平均值(How to average values based on location proximity)

我有一个带有地理标记值(经度,纬度,值)的SQL表。 该表快速累积,有数千个条目。 因此,在表中查询某些区域中的值会返回非常大的数据集。

我想知道平均值与近距离接近一个值的方法,这里是一个例子:

表:

Long            lat           value
10.123001       53.567001      10
10.123002       53.567002      12
10.123003       53.567003      18
10.124003       53.568003      13

比方说我目前的位置是10.123004,53.567004。 如果我在查询附近的值,我会得到值为10,12,18和13的四个原始数据。如果数据集相对较小,则可以使用。 如果数据很大我想查询sql的舍入位置(10.123,53.567)并需要sql来返回类似的东西

Long            lat           value
10.123       53.567      10 (this is the average of 10, 12, and 18)
10.124       53.568      13

这可能吗? 我们如何根据位置平均大数据集?

sql数据库首先是正确的选择吗?


I have an SQL table with geo-tagged values (Longitude, Latitude, value). The table is accumulated quickly and has thousands entries. Therefore, querying the table for values in some area return very large data-set.

I would like to know the way to average value with close location proximity to one value, here is an illustration:

Table:

Long            lat           value
10.123001       53.567001      10
10.123002       53.567002      12
10.123003       53.567003      18
10.124003       53.568003      13

lets say my current location is 10.123004, 53.567004. If I am querying for the values near by I will get the four raws with values 10, 12, 18, and 13. This works if the data-set is relatively small. If the data is large I would like to query sql for rounded location (10.123, 53.567) and need sql to return something like

Long            lat           value
10.123       53.567      10 (this is the average of 10, 12, and 18)
10.124       53.568      13

Is this possible? how we can average large data set based on locations?

Is sql database is the right choice in the first place?


原文:https://stackoverflow.com/questions/10384076
2024-03-26 18:03

满意答案

最后我可以使用我的苹果ID登录。 我从应用商店获得更新,所以我更新了软件(现在的版本是OS X El Capitan版本10.11.6)。 现在我可以登录了。 希望这对其他人有所帮助


Finally i am able to login using my apple id. I got update from app store so i have updated the software(Now version is OS X El Capitan version 10.11.6 ). Now i am able to login. Hope this will help to others

相关问答

更多

Xcode 6 GM上传错误:在SoftwareAssets找不到与apple_id相关的软件(Xcode 6 GM Upload Error: No software found with apple_id at SoftwareAssets)

我不知道这是新的预期行为还是只是一个错误。 但对我来说,上传只有当我注册为苹果开发者和itunesconnect用户具有相同的AppleId时工作。 这个答案XCode6 GoldMaster提交构建失败 ,克里斯帮助我的错误 ,但不幸的是没有做到这一切。 我是我的单一AppleId的不同开发者团队的成员。 上传应用程序只适用于我在itunesconnect中使用相同appleId注册的团队(不幸的是,您可以成为不同开发人员团队的成员,但只能是具有一个Apple ID的单个itunesconnec...

使用Apple ID登录(Login with Apple ID)

虽然这是不可能的(我认为合法的方式)。 这不是我们正在谈论的社交网站,所以我认为Apple不会允许这样做。 如果你在这里问你的问题会更好: - Apple支持社区 希望你从那里得到一些帮助:).... Though this is not possible (the legal way I think). This is not a social networking site we are talking about, So I do not think Apple would allow th...

如何更改Xcode 4用于下载组件的Apple ID?(How can I change the Apple ID that Xcode 4 uses to download components?)

您可以使用Mac OS X的Keychain Access应用程序更改Xcode已关联的Apple Developer ID: 退出Xcode 打开应用程序>实用程序>钥匙串访问 找到名为“daw2.apple.com([您的Apple ID])的种类互联网密码的钥匙串条目 删除该钥匙串条目,并通过重新输入凭据重新输入Xcode中的下载,或者双击该条目并更新“帐户和密码”字段 打开Xcode并重试内容下载 You can change the Apple Developer ID that Xco...

如何使用新的Apple ID更新Xcode?(How to update Xcode with a new Apple ID?)

假设您遇到错误的问题 要更新此应用程序,请登录您以前购买的帐户。 在App Store应用程序中,转到商店 - >退出 然后做这里建议的东西 请从Beartech查看此修复程序https://discussions.apple.com/thread/2794280?start=15&tstart=0 App Store以某种方式使用Spotlight。 我的修复是将整个高清添加到Spotlight System prefs窗格中的“隐私”选项卡中,关闭prefs并等待30秒,然后从“隐私”选项卡重...

Xcode无法使用Apple ID登录(Xcode cannot sign in with Apple ID)

我可能找到了答案。 尝试使用Apple ID登录时挂起 我的macbook是二手的,我不知道它为什么没有序列号。 在El Capital(Mac OS X 10.11)下使用Apple Id登录时,系统会尝试检查序列号,然后我的mac挂起。 这不仅是Xcode问题,而且AppStore和其他地方需要在系统中使用Apple Id登录。 我有两个选择来解决这个问题。 一个是将系统恢复到10.10,另一个是去苹果商店修复它。 I probably find the answer. Hangs when ...

Xcode 8.0,当试图用Apple ID登录时,会话过期(Xcode 8.0, session expired when tried to login with Apple id)

您需要为Apple ID启用双因素身份验证 在这里阅读如何做到这一点 Actually this was an issue from Apple. I have contacted them over mail and they have fixed the issue in 24 hours.

如何指定哪个Apple ID xCode应用于Product-> Archive-> Export(How to specify which Apple ID xCode should use for Product->Archive->Export)

那个苹果ID是下拉列表。 单击它后,您将能够选择第二个。 如果它没有显示其他人,您需要在帐户中添加新的苹果ID。 如果您使用了正确的软件包ID,证书和配置,它将自动选择apple id。 如果仍然没有,请转到查看帐户/帐户/添加Apple ID(+) 这也可以访问xcode / Preferences / Accounts。 That apple id is drop down list. Once you click it, you will be able to select second o...

将app app groups container添加到apple id时,Xcode会显示错误(Xcode shows error when add app groups container to apple id)

您需要成为Apple Developer Program的一部分才能使用App Groups ... You need to be a part of the Apple Developer Program in order to make use of App Groups...

无法从XCode 9导出Apple ID(Cannot export Apple ID from Xcode 9)

我遇到了同样的问题,但在更新到Xcode 9.3.1时已解决。 I had the same issue, but it was resolved when updating to Xcode 9.3.1.

Apple ID没有登录Xcode?(Apple id not logging in Xcode?)

最后我可以使用我的苹果ID登录。 我从应用商店获得更新,所以我更新了软件(现在的版本是OS X El Capitan版本10.11.6)。 现在我可以登录了。 希望这对其他人有所帮助 Finally i am able to login using my apple id. I got update from app store so i have updated the software(Now version is OS X El Capitan version 10.11.6 ). Now ...

相关文章

更多

如何用Hadoop计算平均值

如何用Hadoop计算平均值 数据 data.txt a 2 a 3 a 4 b 5 b 6 b 7 ...

Java-based 实现的索引复制

solr 包含一个基于 Java-based 实现的索引复制,通过http方式完成。 这 ...

nginx配置中location的优先级

nginx配置中location的优先级:(location =) > (location 完整路径 ...

Eclipse中Hadoop的DFS Location无法显示DFS下的文件 解决方法

问题如上图所示,前提是首先要将Hadoop正确安装,在命令行中可以运行例子程序,然后在eclipse中 ...

Guava Booleans类-布尔型基本的实用工具类

static int countTrue(boolean... values)返回为true值的数目

JFreeChart笔记 (六) 时间序列图:移动平均线

什么是移动平均线呢?移动平均线(MA)是以道·琼斯的“平均成本概念”为理论基础,采用统计学中"移动平均 ...

查找某个文件在HDFS集群中的位置

通过"FileSystem.getFileBlockLocation(FileStatus ...

微信如何根据经纬度坐标查询具体地理位置

好多人会问为什么微信高级接口获取的坐标信息位置不准,主要原因不是微信获取的不准,而是微信获取的是gps ...

【金融市场】黄金牛市行情的第二波正开始2/3

For gold bugs, the unthinkable has now happened. Th ...

最新问答

更多

如何在Laravel 5.2中使用paginate与关系?(How to use paginate with relationships in Laravel 5.2?)

请尝试以下方法: $messages = $user->contact_messages()->paginate(10); Try the following: $messages = $user->contact_messages()->paginate(10);

linux的常用命令干什么用的

linux和win7不一样,win7都图形界面,都是用鼠标来操作打开,解压,或者关闭。而linux是没有图形界面的,就和命令提示符一样的一个文本框,操作linux里的文件可没有鼠标给你用,打开文件夹或者解压文件之类的操作都要通过linux常用命令。

由于有四个新控制器,Auth刀片是否有任何变化?(Are there any changes in Auth blades due to four new controllers?)

它创建了这些视图: 'auth/login.blade.php', 'auth/register.blade.php', 'auth/passwords/email.blade.php', 'auth/passwords/reset.blade.php', 'layouts/app.blade.php', 'home.blade.php' 并修改这些文件: 'Http/Controllers/HomeController.php', 'routes/web.php' 如果使用--views

如何交换返回集中的行?(How to swap rows in a return set?)

您可以使用特殊的CASE表达式进行ORDER BY如下所示: SELECT * FROM table ORDER BY CASE id WHEN 3 THEN 8 WHEN 8 THEN 3 ELSE id END You can ORDER BY using a special CASE expression like this: SELECT * FROM table ORDER BY CASE id WHEN 3 THEN 8 WHEN 8 THEN 3 ELSE id END

在ios 7中的UITableView部分周围绘制边界线(draw borderline around UITableView section in ios 7)

我建议你制作一个新的TableView Cell,在这个newTableViewCell中,加载第2节中的所有单元格,然后为newTableViewCell提供边框。 但如果您不想这样做,那么您可以使用以下代码: @property(strong,nonatomic) CAShapeLayer* borderPath; -(void)viewDidLayoutSubviews{ [_borderPath removeFromSuperlayer]; UIView *viewToGiveBord

使用Boost.Spirit Qi和Lex时的空白队长(Whitespace skipper when using Boost.Spirit Qi and Lex)

出于一些奇怪的原因,我现在发现了一个不同的问题, Boost.Spirit SQL语法/词法分析失败 ,其中提供了一些其他解决方案来进行空格跳过。 一个更好的! 以下是根据建议重新编写的示例代码: #include #include #include #include #include #incl

Java中的不可变类(Immutable class in Java)

1.如果我只有final变量的课程? 这会让你远离但不是全部。 这些变量的类型也需要是不可变的。 考虑一下 class MyImmutableClass { // final variable, referring to a mutable type final String[] arr = { "hello" }; // ... } 这允许有人做 myImmutableObject.arr[0] = "world"; 并有效地改变你的不可变类的对象。 此外,建议禁

WordPress发布查询(WordPress post query)

如果你想要在div中包含所有帖子: post_parent) { $myposts = get_posts('numberposts=10&tag=medical&order=DESC'); echo ' '; foreach ($myposts as $post): ?>

如何在关系数据库中存储与IPv6兼容的地址(How to store IPv6-compatible address in a relational database)

我不确定哪个是MySQL的正确答案,因为它本身还不支持IPv6地址格式(尽管“ WL#798:MySQL IPv6支持 ”表明它将在MySQL v6.0中,当前文档不支持)。 不过,你建议的人建议去2 * BIGINT,但要确保他们是UNSIGNED。 在IPv6的/ 64地址边界处有一种自然分割(因为/ 64是最小的网格块大小),这将与其很好地对齐。 I'm not sure which is the right answer for MySQL given that it doesn't y

是否可以检查对象值的条件并返回密钥?(Is it possible to check the condition of a value of an object and JUST return the key?)

您可以使用Object.keys和Array#find来获取匹配value的key 。 const letters = {a:'26',b:'25',c:'24',d:'23',e:'22',f:'21',g:'20',h:'19',i:'18',j:'17',k:'16',l:'15',m:'14',n:'13',o:'12',p:'11',q:'10',r:'9',s:'8',t:'7',u:'6',v:'5',w:'4',x:'3',y:'2',z:'1'}; function sw