Skip to content
pubscout

point_in_polygon

1.0.0, released 5 years ago by molteo.com

Check if a point is inside a polygon using the Ray-Casting algorithm.

WASM-ready
$ flutter pub add point_in_polygon
Source repository

What it does

Determines whether a geographic or coordinate point is located inside or outside of a polygon represented by a list of points. It applies a standard ray-casting algorithm to calculate edge intersections.

AI-written summary of version 1.0.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to check if coordinates fall within a geofenced area or polygonal region.
  • You are building location-based apps that require simple point-in-polygon checks.

Skip it when

  • You need complex GIS features, spatial indexing, or advanced map rendering.
  • You require large-scale spatial databases or spatial querying.

Strengths

  • Simple and lightweight utility for point-in-polygon calculations.
  • Easy-to-use API requiring only a point and a list of vertices.

Weaknesses

  • Very limited scope focusing only on ray-casting point inclusion.
  • Lacks advanced spatial analysis features.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0
final List<Point> points = <Point>[
  Point(y: 42.4123, x: -71.6157),
  Point(y: 42.3829, x: -71.6325),
];
final Point point = Point(x: -71.6047, y: 42.3895);
bool isInside = Poly.isPointInPolygon(point, points);

Alternatives

Packages that do the same job and could replace point_in_polygon.