When possible, reducing the complexity of a geometry makes geospatial computation more efficient. Some applications cannot handle geometries of complex shapes or with hundreds of vertices. For example, the Planet Platform (our applications and APIs) requires geometries to be less than 1,500 vertices for Explorer and the Orders API, and 1,500 vertices for the Subscriptions API. When using the Planet Platform, you are comparing your geometry with the catalog to find items within your area of interest. So you can ensure coverage with a reduced number of vertices to make any operation run more smoothly.
Common geometry simplification routines¶
You can view common simplification routines online at sites such as Mapshaper. There you can upload a file, select “Simplify,” choose from common algorithms, and use a percentage slider to decrease the number of lines.
Mapshaper also has a command-line tool.
You can also find simplification routines in your geospatial software. For example, QGIS has a rendering routine that simplifies geometries on-the-fly, as well as a way to simplify existing geometries in their Processing Toolbox (Vector geometries > Simplify).
These sorts of geospatial applications also have programming interfaces, for example, the Google Earth Engine simplify API.
Buffer when needed¶
Most simplification algorithms, when reducing curves or number of lines, have a tendency to reduce area in convex cases and increase it in concave cases (for example, inner bends or elbows). Polygon lines eventually need to close up and tend to have more convex bends than concave bends, which lose area during simplification. The greater percentage of simplification, the more area lost.
Convex line before simplification
Convex line after simplification
If you are interested in minimizing the loss during simplification, you can buffer slightly before simplification. For example, you could add a small buffer, then simplify by half of that buffer distance to remove extra points. Sometimes creating a buffer, itself, is enough to reduce the complexity of the geometry.
Your mileage may vary with simplified buffers and good results require care and experience. It's actually not difficult to increase the complexity of shapes by buffering. Convex hulls are more "foolproof" than simplified buffers. They always preserve area (they have extra, of course) and don't require tuning (there are no knobs to tune). Concave hull operations will be available soon and these will be qualitatively better than convex hulls and easier to use than simplified buffers.
For information on simplifying your geometries see Simplifying Your Complex Area of Interest: a Planet Developers Deep Dive.
Rate this guide: