Skip to Content
Analytics for the Internet of Things (IoT)
book

Analytics for the Internet of Things (IoT)

by Andrew Minteer
July 2017
Beginner to intermediate
378 pages
10h 26m
English
Packt Publishing
Content preview from Analytics for the Internet of Things (IoT)

Contains

You can also test if one spatial object contains another, such as a point in a polygon or a city in a state using the contains function. This can be used to determine if a location is in a postal code, province, or congressional district. The within function is the inverse and determines if the object is within another object:

#import polygon classfrom shapely.geometry import Polygon#create a square polygonpolysquare = Polygon([(0,0),(0,2),(2,2),(2,0),(0,0)])#test if polygon contains the pointprint(polysquare.contains(Point(1,1)))#test if point is within the polygonprint(Point(1,1).within(polysquare))#test if other point is within the polygonprint(Point(5,7).within(polysquare))
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Big Data Analytics for Internet of Things

Big Data Analytics for Internet of Things

Tausifa Jan Saleem, Mohammad Ahsan Chishti
Hands-On Industrial Internet of Things

Hands-On Industrial Internet of Things

Giacomo Veneri, Antonio Capasso
Internet of Things

Internet of Things

Mayur Ramgir

Publisher Resources

ISBN: 9781787120730Supplemental Content