Skip to main content
U.S. flag

An official website of the United States government

Official websites use .gov
A .gov website belongs to an official government organization in the United States.

Secure .gov websites use HTTPS
A lock ( ) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

Map Polygon Schema

Map Polygon Schema (object name: mapPolygon)

Describes a shape outlining an area of interest on a map

Table for the PSCR IoT Data Foundations Project - system map polygon schema

Notes:

Polygons are areas enclosed by a set of closed loop line segments. Polylines are a set of line segments that are typically not closed and as such do not have to enclose an area (but they may encompass an area). An example of a polygon might be a fire district or other response district. An example of a polyline might be a line on a map showing the route of a utility line. A boundary for an area, such as the outline of a county, could be represented with either a polygon or a polyline, the key constraint being that it is a closed loop.

HTML5, Google Maps and Open Layers all support polygons and polylines. The name of this object is “polyImage.”

This schema is presented differently from the above sections, because it is not a typical IoT schema.  It is presented here as an example of a schema for a server-side data resource.

Additional Perspective

Following the principle that software should be liberal in what it accepts, and rigid in what it provides, it is strongly suggested that for closed loops (polygons) any software should be able to deal with two cases of closed loop data: the first case of data where the last point is the same as the first point, creating the closed loop; and the second case of data where the last point is not the same as the first and therefore the first point must be reused as the final point to draw the closed polygon.

Many software systems will have a concept of being able to determine whether a point (latitude/longitude) is inside of a polygon or not. Any software utilizing this object should have the same flexibility.

Created April 21, 2021