Skip to content

Commit a78bfe4

Browse files
JesperpaulsenMaxxen
authored andcommitted
fix invalid geometries in ST_AsMVTGeom
Changes GEOS_PREC_NO_TOPO to GEOS_PREC_VALID_OUTPUT in get_gridded() to ensure topological validity during grid snapping operations.
1 parent b56d9ce commit a78bfe4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/spatial/modules/geos/geos_geometry.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ inline GeosGeometry GeosGeometry::get_transformed(const double matrix[6]) const
369369
}
370370

371371
inline GeosGeometry GeosGeometry::get_gridded(double grid_size) const {
372-
return GeosGeometry(handle, GEOSGeom_setPrecision_r(handle, geom, grid_size, GEOS_PREC_NO_TOPO));
372+
return GeosGeometry(handle, GEOSGeom_setPrecision_r(handle, geom, grid_size, GEOS_PREC_VALID_OUTPUT));
373373
}
374374

375375
inline GeosGeometry GeosGeometry::get_maximum_inscribed_circle() const {

0 commit comments

Comments
 (0)