GIS 获取特定 bb 框/缩放级别的信息
请随时纠正本文中任何遗漏的单词,因为我对这些领域并不熟悉,我尽我所知使用了单词,但它们可能是错误的。
所以这就是我想做的:
拐卖儿童在中国是一个相当严重的问题,今天下午我的一个朋友跟我聊天,在 iOS 和 Android 上开发一个单独的应用程序来完成这项任务的想法,用户可以采取图片及其 GPS 位置上传到数据库,应用程序还可以显示数据库中的信息,作为地图上的注释。
我的问题是:
在应用程序中,当用户向数据库提交新帖子(包括照片、GPS 位置、任何注释)时。
然后我们用户切换到地图视图,我们必须获取当前缩放级别/bb框的信息,所以
我应该如何将这些信息以什么格式存储在数据库中?
和
是否有任何开源工具可以解析给定 bb 框/缩放级别的信息并返回 xml 文件,以便我可以使用它来显示信息?
-- 我找到了 GeoServer,有更好的适合我使用吗?我真的只需要它来生成基于 bb 框/缩放级别的 xml 文件。
我想在 Google App Engine/Amazon Ec2 上托管该工具(它叫地理编码器吗?)是最理想的,对数据库了解不多,可能是 Amazon Simple DB?
谢谢!
Please feel free to correct any miss used words in this post, as I'm not familiar in such areas, I use words to the best of my knowledge but they're probably wrong.
So here's what I want to do:
Child abducting and trafficking is a quite serious problem back in China, a friend of mine was talking to me this afternoon, the idea of a separate app on iOS and Android to do this task, users can take pictures, upload along with their GPS location to a db, and the app can also display information that's in the db, as annotations on a map.
And my question is:
In the app when user submit a new post, which includes photos, GPS location, any notes, to a database.
Then we user switch to map view, we'll have to get information for the current zoom level/bb box, so
how should I store those information in the db, in what format?
and
are there any open source tools that can parse the information for given bb box/zoom level and return a xml file so that I can take and use it to display the information?
-- I found GeoServer, are there better ones for my use? I really only need it to generate xml files based on bb box/zoom level.
I would imagine that host the tool (is it called geocoder?) on Google App Engine/Amazon Ec2 is the most ideal, don't know much for db, probably Amazon Simple DB?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有许多开源工具可以提供帮助 - 您可以查看 GeoDjango<例如,它可以使用 PostGIS 地理数据库 - 但老实说,对于此应用程序,您不需要不需要任何东西地理特定:
您将收到以纬度/经度表示的 GPS 坐标,因此数据库中可能有一个包含两列的表:
纬度
和经度
.要进行边界框查找,您所需要的只是经度和纬度的最小值/最大值(任何基于网络的地图都可以为您提供)。一旦你有了这个,几乎所有的 SQL 数据库都将支持这样的查询:
这将为您提供位于边界框内的记录列表。
现在您可以使用您喜欢的任何中间件 - CMS 系统(如 Django 或 Drupal)、自定义 PHP 脚本等 - 将结果集转换为 XML 或 JSON 格式。
地理数据库可以完成很多关系数据库无法轻松完成的事情,例如查找半径内的点或一组多边形内的点。但您的应用程序不需要这些 - 任何具有基本数据库查询功能的系统都应该满足您的需求。
There are a number of Open Source tools that could help - you could look at GeoDjango, for example, which can use the PostGIS geo database - but honestly, for this application, you don't need anything geo-specific:
You will be receiving GPS coordinates in latitude/longitude, so presumably you'll have a table in your database with two columns,
latitude
andlongitude
.To do a bounding box lookup, all you need is the minimum/maximum for both longitude and latitude (which any web-based map will be able to give you). Once you have that, almost any SQL database will support a query like this:
This gives you a list of records that falls within your bounding box.
Now you can use whatever middleware you like - a CMS system like Django or Drupal, a custom PHP script, etc - to turn the resultset into XML or JSON format.
Geographic databases do a lot of things relational databases don't do easily, like find points within a radius or points within a set of polygons. But you don't need that for your application - any system with basic database-querying functions should give you what you need.