kbiesemans / point_in_polygon

Point in polygon


point_in_polygon() uses the ‘Ray Casting’ method to determine whether a given point (as a longitude, latitude) lies within a given area (as a list of longitude, latitude tuples).

Example

pip = scraperwiki.utils.swimport('point_in_polygon')
polygon = [(0,10),(10,10),(10,0),(0,0)]
print pip.point_in_polygon(5, 5, polygon)
print pip.point_in_polygon(10, 10, polygon)
print pip.point_in_polygon(15, 5, polygon)

Forked from ScraperWiki

Contributors kbiesemans

Last run completed successfully .

Console output of last run

Statistics

Average successful run time: less than 5 seconds

Total run time: less than a minute

Total cpu time used: less than 5 seconds

Total disk space used: 18.1 KB

History

  • Manually ran revision 81b48a77 and completed successfully .
    nothing changed in the database
  • Manually ran revision 81b48a77 and failed .
    nothing changed in the database
  • Forked from ScraperWiki

Scraper code

Python

point_in_polygon / scraper.py