[GIS] How Does Ogr2Ogr Simplify Work

gdalogr2ogrqgissimplify

Can someone explain how the ogr2ogr simplify works?

I am trying to use raster data which has a spectral resolution of 30m. The vector file that I am trying to import into Google Fusion is large in size and so I was recommended to use ogr2ogr with tolerance of 0.00001.

Can someone explain the unit of the tolerance?

I assumed that it would be decimal degrees but the resulting KML still has around 10 decimal points.

Best Answer

You may still have 10dp numbers reported, but count the number of nodes in the modified file, and it should be far fewer that the original.

The tolerance unit is whatever the unit of your map data uses. 0.000001° would keep destination paths no more than 0.000001° (a metre 10 cm or so) from their original location. It would be far too small if your data were in metric UTM format.

Clarification: My original estimate was off by an order of magnitude. It would have been 0.00001° that would have been around a metre. I say around, as fractions of a degree vary by location, and aren't always equal. For example, where I live, 0.000001° N↔S is roughly 11 cm, but 0.000001° E↔W is only about 8 cm.

OGR only simplifies on fractions/multiples of the layer's unit. If your layer is EPSG 4326, you're going to have to live with fractions of a degree, and perhaps slight variations in tolerance over large objects. If you wish the unit to stay constant, convert to a projection such as UTM, and then the unit you use will be fractions/multiples of metres/feet/US survey feet, etc.

Related Question