# Tests for insertPointsFrom function
# Format: base_geometry|source_geometry|tolerance|expected_result

# Test with empty base geometry
POINT EMPTY|POINT(1 1)|0.1|POINT EMPTY
LINESTRING EMPTY|POINT(1 1)|0.1|LINESTRING EMPTY
POLYGON EMPTY|LINESTRING(0 0, 1 1)|0.1|POLYGON EMPTY

# Test with empty source geometry
POLYGON((0 0, 2 0, 2 2, 0 2, 0 0))|POINT EMPTY|0.1|POLYGON((0 0, 2 0, 2 2, 0 2, 0 0))

# Test with simple line and point on line
LINESTRING(0 0, 2 2)|POINT(1 1)|0.1|LINESTRING(0 0, 1 1, 2 2)

# Test with simple line and point slightly off line (within tolerance)
LINESTRING(0 0, 2 0)|POINT(1 0.05)|0.1|LINESTRING(0 0, 1 0.05, 2 0)

# Test with simple line and point off line (beyond tolerance)
LINESTRING(0 0, 2 0)|POINT(1 0.2)|0.1|LINESTRING(0 0, 2 0)

# Test with multiple points to insert
LINESTRING(0 0, 4 0)|MULTIPOINT(1 0, 2 0, 3 0)|0.1|LINESTRING(0 0, 1 0, 2 0, 3 0, 4 0)

# Test with polygon and point inside (should not change polygon)
POLYGON((0 0, 2 0, 2 2, 0 2, 0 0))|POINT(1 1)|0.1|POLYGON((0 0, 2 0, 2 2, 0 2, 0 0))

# Test with polygon and point on edge (within tolerance)
POLYGON((0 0, 2 0, 2 2, 0 2, 0 0))|POINT(1 0)|0.1|POLYGON((0 0, 1 0, 2 0, 2 2, 0 2, 0 0))

# Additional test cases
LINESTRING(0 0, 10 0)|LINESTRING(5 -0.05, 5 0.05)|0.1|LINESTRING(0 0, 5 -0.05, 5 0.05, 10 0)
LINESTRING(0 0, 10 0)|LINESTRING(5 -0.2, 5 0.2)|0.1|LINESTRING(0 0, 10 0)
