什么“路”?是否有特定的纬度/经度?美国人口普查形状文件
我已将美国人口普查形状文件(所有道路)导入到 SQL Serve 2008 R2 中。我想找出特定的纬度/经度坐标落在哪条“道路”上。该查询是什么样的?
我是 GIS 新手;四处寻找但没有运气。谢谢!
以下是前 10 行作为示例数据集:
MULTILINESTRING ((-73.924385 40.865365, -73.92249799999999 40.866064, -73.920611999999991 40.866758999999995, -73.919215 40.867275, -73.918414 40.867584), (-73.92662 40.864525, -73.924385 40.865365))
LINESTRING (-73.91434 40.862521, -73.915523999999991 40.863040999999996, -73.917063 40.863690999999996, -73.918943 40.864463, -73.919361999999992 40.864809, -73.919996 40.865797, -73.920611999999991 40.866758999999995, -73.921213999999992 40.867692999999996, -73.921725999999992 40.868497, -73.922145 40.86915, -73.922343 40.869459)
LINESTRING (-73.91704399999999 40.867025999999996, -73.918414 40.867584, -73.919754 40.868114)
LINESTRING (-73.91911 40.859573, -73.919845999999993 40.859898, -73.921235 40.860476)
LINESTRING (-73.917913 40.869667, -73.918109 40.86987, -73.918269999999993 40.870035, -73.918643 40.870421, -73.919249999999991 40.871010999999996, -73.919671 40.872076)
LINESTRING (-73.917913 40.869667, -73.918109 40.86987, -73.918269999999993 40.870035, -73.918643 40.870421, -73.919249999999991 40.871010999999996, -73.919671 40.872076)
LINESTRING (-73.911771 40.868096, -73.913352 40.868777, -73.915183 40.869551, -73.91588 40.869847)
LINESTRING (-73.911227 40.871655, -73.91268 40.872292)
LINESTRING (-73.911227 40.871655, -73.91268 40.872292)
LINESTRING (-73.932523 40.854538, -73.932092 40.855157, -73.931654999999992 40.855754999999995, -73.929509 40.857341999999996)
I've imported US Census Shapefiles (All Roads) into SQL Serve 2008 R2. I'd like to find out what "road" a particular lat/long coordinates fall on. What does that query look like?
I'm new to GIS; searched around without luck. Thanks!
Here are the top 10 rows as a sample data set:
MULTILINESTRING ((-73.924385 40.865365, -73.92249799999999 40.866064, -73.920611999999991 40.866758999999995, -73.919215 40.867275, -73.918414 40.867584), (-73.92662 40.864525, -73.924385 40.865365))
LINESTRING (-73.91434 40.862521, -73.915523999999991 40.863040999999996, -73.917063 40.863690999999996, -73.918943 40.864463, -73.919361999999992 40.864809, -73.919996 40.865797, -73.920611999999991 40.866758999999995, -73.921213999999992 40.867692999999996, -73.921725999999992 40.868497, -73.922145 40.86915, -73.922343 40.869459)
LINESTRING (-73.91704399999999 40.867025999999996, -73.918414 40.867584, -73.919754 40.868114)
LINESTRING (-73.91911 40.859573, -73.919845999999993 40.859898, -73.921235 40.860476)
LINESTRING (-73.917913 40.869667, -73.918109 40.86987, -73.918269999999993 40.870035, -73.918643 40.870421, -73.919249999999991 40.871010999999996, -73.919671 40.872076)
LINESTRING (-73.917913 40.869667, -73.918109 40.86987, -73.918269999999993 40.870035, -73.918643 40.870421, -73.919249999999991 40.871010999999996, -73.919671 40.872076)
LINESTRING (-73.911771 40.868096, -73.913352 40.868777, -73.915183 40.869551, -73.91588 40.869847)
LINESTRING (-73.911227 40.871655, -73.91268 40.872292)
LINESTRING (-73.911227 40.871655, -73.91268 40.872292)
LINESTRING (-73.932523 40.854538, -73.932092 40.855157, -73.931654999999992 40.855754999999995, -73.929509 40.857341999999996)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
以下命令返回距指定搜索点最近的道路。在我们将空间索引添加到道路表中之前,速度有点慢。
The following returns the closest road to the search point specified. It was kinda slow until we added spatial indexes to the roads table.
这是一个不平凡的问题,可能不会在这里给你一个满意的答案。尝试使用老虎数据解析房屋街道的问题在于,实际上没有足够的信息来做出良好的确定性决策 - 老虎文件提供的只是路段每一端的地理坐标,沿着以及道路名称和一些其他信息。
我的房子就是一个很好的例子,说明了为什么这很困难。该地产以住宅区道路、三级道路和州际高速公路为界。我的房子位于该地段较远的地方,因此屋顶经纬度在地理上比其他两条道路更靠近高速公路。我的地址当然是在住宅街上,但你无法从你拥有的数据中确定这一点。
This is a non-trivial problem, and probably won't get you a satisfactory answer here. The problem with trying to resolve the street of a house with the tiger data is that there isn't really enough information to make a good deterministic decision- all that the tiger files provide is the geographic coordinates for each end of a road segment, along with the name of the road and a few other bits of information.
My house is a great example of why this is difficult. The property is bounded by a residential road, a tertiary road, and an interstate highway. My house is set far back on the lot, and so the rooftop lat/lon is geographically closer to the highway than either of the other two roads. My address of course is on the residential street, but there is no way you'd be able to determine that from the data that you have.