这对于GIS可行吗?
我只是让自己熟悉 GIS,但我想事先知道以下内容对于当前的 GIS 应用程序/工具是否可行......
- 我通过地理编码得到了地址的要点。简单的部分。
- 现在,如果该点落在边界内(可能是城市/县/州),那么我需要获取与边界关联的数据(任何 ID/标志)。
- 然后根据 id/flag 我应用一些业务逻辑。
我的问题是...
- 我如何定义边界?我应该使用什么工具?
- 如何将边界定义存储在数据库中以便检查点是否落在其中?这必须在后端完成,而不是在可视地图中完成,因为我们不打算显示/使用地图。
- 如何将我的自定义数据(id/flag)与上述边界定义关联起来?
希望我对 GIS 的功能有正确的假设。我看到的大多数例子都是人们试图显示带有数据的地图,而这恰恰不是我想要的。另外请给我推荐一些这方面的工具/书籍。
I'm just getting myself to familiarize with GIS but i like to know before hand if the following is feasible with current GIS apps/tools...
- I get the point for an address by geocoding. Easy part.
- Now if the point falls within a boundary (may be a city/county/state) then i need to get the data (any id/flag) associated with the boundary.
- Based on the id/flag i then apply some business logic.
My question is...
- How do i define the boundary? What tools should i use for it?
- How can i store the boundary definition in database in order to check if the point falls within it? This has to be done in the back end and not in visual maps as we don't intend to show/use maps.
- How do i associate my custom data (id/flag) with the above boundary definition?
Hope i'm having right assumption on capabilities of GIS. Most of examples what i see is around people trying to show maps with data which is exactly not what i'm looking for. Also please suggest me some tools/books on this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如何定义边界?我应该使用什么工具?
边界可以是(也可能是)一个形状(多边形、多边形),您可以以任何当前的 GIS 格式提供该形状。您将需要考虑投影和您提供的数据。
如何将边界定义存储在数据库中以便检查点是否落在其中?
使用PostGreSQL 及其空间扩展 (Postgis< /a>)。将 (1) 中的多边形导入数据库(例如使用 FWTOOLS
ogr2ogr
)。这将在表中产生一个漂亮的几何字段,您可以在其中使用漂亮的 Postgis 几何函数标准 SQL 方式(St_Intersects 在这里是合适的:找出该点在地理上是否与我们的多边形“相交”,或者您可以使用 ST_Within 来找出该点是否很好地落在多边形内)我如何关联我的自定义数据(id/flag) 是否具有上述边界定义?
只需向存储
几何图形
的表中添加一个额外的列即可。How do i define the boundary? What tools should i use for it?
The boundary could be (and probably is) a shape (polygon, multipolygon) which you can provide in any current GIS-format. You will need to think about the projection and the datum you provide this in.
How can i store the boundary definition in database in order to check if the point falls within it?
Use PostGreSQL and it's spatial extensions (Postgis). Import the polygon from (1) into the database (for example with FWTOOLS
ogr2ogr
). This will yield you a nice geometry field in a table on which you can use the nice Postgis geometry functions in standard SQL fashion (St_Intersects would be appropriate here: finding out if the point geographically 'intersects' with our polygon, or you could use ST_Within to find out if the point falls well withing the polygon)How do i associate my custom data (id/flag) with the above boundary definition?
Simply add an extra column to the table where the
geometry
is stored.