3

Let's say that I have a large set of latitude, longitude pairs which are accurate to 5 meters. I want to reduce their accuracy to 100 meters so that they render quicker and consume less storage space. Is there a name for this sort of lossy compression of coordinate data?

For instance, the three yellow points in the image below are part of a larger polyline. The red line represents the polyline at 5 meter accuracy. The thick blue line represents what the polyline would look like at 100 meter accuracy and the thin blue line represents the margin of error on that thick blue line (+/- 100 meters). Because the middle point falls within that margin of error, it can be eliminated entirely, thus reducing the storage size of the polyline.

enter image description here

6

The process of reducing the number of vertices that form a polyline or polygon is known as Generalization or Simplification.

Most algorithms that perform this sort of functionality take the geometry and an offset value or tolerance as inputs and output a geometry with fewer vertices. An example of this is the Ramer-Douglas-Peucker algorithm.

The Generalize tool in ArcGIS is one example of this. You can also use the Simplify Geometries tool in QGIS, as references by this GIS SE question. PostGIS has ST_Simplify.

  • 1
    OGR also has a "-simplify" option available through the "ogr2ogr" function - gdal.org/ogr2ogr.html. You can use it like this (ajust the "-simplify" paramter as needed) : ogr2ogr outfile.shp infile.shp -simplify 0.1 – Brent Edwards Jan 5 '17 at 18:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.