开发者

Is there a "service in area" algorithm based on US street addresses?

I have a database of US based street addresses for which a client of mine offers their services. I am working on a form that would allow a custome开发者_开发百科r to enter in their zip code or address to see if there is service in their area.

Is there a component or an algorithm "out there" somewhere that I can use as a template?

I have played with GIS and the tiger zips in a previous geolocation project but am not sure this is the best way to go.


Here is one crude approach:

  1. First, the client's service territory needs to be geographically referenced as areal units or polygons on a map.
  2. Second, get the geographic coordinates of the zip-code polygons (you can parse the shapefile).
  3. Third, loop over and find the service polygons that overlap the chosen zip-code polygon by performing an overlapping polygon test. You can use the python shapely library.

Of course, you can speed things up by some how adding information on the centroid proximity structure or contiguity structure of the polygons so there was less looping needed.

good luck

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜