Polygon labeling by dominant shapes
First Claim
1. A method for generating label positions for labeling polygons, the method comprising:
- receiving, by one or more processors, a description of a polygon;
generating, by the one or more processors, a Voronoi diagram based on vertices of the polygon,determining, by the one or more processors, a substantially largest inscribed circle that fits within the polygon based on the Voronoi diagram, including;
calculating a respective radius of each of a plurality of segments of the Voronoi diagram that is enclosed within a boundary of the polygon, andselecting a largest radius from among the calculated radii, wherein the largest radius is a radius of the substantially largest inscribed circle;
determining, by the one or more processors based on the Voronoi diagram, a single-branch shape that fits completely within the polygon, wherein a centerline of the single-branch shape is a polyline that has;
(i) only one branch, and (ii) a largest coverage of the polygon;
generating, by the one or more processors, an indication of a first candidate label position, based on the inscribed circle;
generating, by the one or more processors, an indication of a second candidate label position, based on the centerline; and
providing, by the one or more processors, the indication of the first candidate label position and the indication of the second candidate label position to a rendering component for positioning a label for the polygon in accordance with at least one of the first candidate label position and the second candidate label position.
2 Assignments
0 Petitions
Accused Products
Abstract
A method for generating label positions for labeling polygons includes receiving a description of a polygon, determining an inscribed circle within the polygon, and determining a single-branch shape that fits completely within the polygon. The method also includes generating an indication of a first candidate label position, based on the inscribed circle, and generating an indication of a second candidate label position, based on the centerline. Still further, the method includes providing the indication of the first candidate label position and the indication of the second candidate label position to a rendering component for positioning a label for the polygon in accordance with at least one of the first candidate label position and the second candidate label position.
-
Citations
14 Claims
-
1. A method for generating label positions for labeling polygons, the method comprising:
-
receiving, by one or more processors, a description of a polygon; generating, by the one or more processors, a Voronoi diagram based on vertices of the polygon, determining, by the one or more processors, a substantially largest inscribed circle that fits within the polygon based on the Voronoi diagram, including; calculating a respective radius of each of a plurality of segments of the Voronoi diagram that is enclosed within a boundary of the polygon, and selecting a largest radius from among the calculated radii, wherein the largest radius is a radius of the substantially largest inscribed circle; determining, by the one or more processors based on the Voronoi diagram, a single-branch shape that fits completely within the polygon, wherein a centerline of the single-branch shape is a polyline that has;
(i) only one branch, and (ii) a largest coverage of the polygon;generating, by the one or more processors, an indication of a first candidate label position, based on the inscribed circle; generating, by the one or more processors, an indication of a second candidate label position, based on the centerline; and providing, by the one or more processors, the indication of the first candidate label position and the indication of the second candidate label position to a rendering component for positioning a label for the polygon in accordance with at least one of the first candidate label position and the second candidate label position. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A computing device comprising:
-
one or more processors; and a non-transitory computer readable medium storing instructions thereon that, when executed by the one or more processors, cause the computing device to; receive a description of a polygon, determine an inscribed circle within the polygon, determine a single-branch shape that fits completely within the polygon, wherein a centerline of the single-branch shape is a polyline that has;
(i) only one branch, and (ii) a largest coverage of the polygon, wherein the centerline of the single-branch shape intersects a center point of the inscribed circle,generate an indication of a first candidate label position, based on the inscribed circle, generate an indication of a second candidate label position, based on the centerline, and provide the indication of the first candidate label position and the indication of the second candidate label position to a rendering component for positioning a label for the polygon in accordance with at least one of the first candidate label position and the second candidate label position. - View Dependent Claims (9, 10, 11, 12, 13)
-
-
14. A method for generating label positions for labeling polygons, the method comprising:
-
receiving, by one or more processors, a description of a polygon; determining, by the one or more processors, an inscribed circle within the polygon determining, by the one or more processors, a single-branch shape that fits completely within the polygon, wherein a centerline of the single-branch shape is a polyline that has;
(i) only one branch, and (ii) a largest coverage of the polygon;detecting, by the one or more processors, that the centerline of the single-branch shape includes a loop, generating, by the one or more processors, a line based on the centerline of the single-branch shape, including breaking the centerline of the single-branch shape to cause the line based on the centerline to not self-intersect; generating, by the one or more processors, an indication of a first candidate label position, based on the inscribed circle; generating, by the one or more processors, an indication of a second candidate label position, based on the line; and providing, by the one or more processors, the indication of the first candidate label position and the indication of the second candidate label position to a rendering component for positioning a label for the polygon in accordance with at least one of the first candidate label position and the second candidate label position.
-
Specification