Snap to a linestring

588 Views Asked by At

Hello I'm trying to create a line snapping tool in my android app where I'm using the spatialite-android lib. I'm using the function ST_Snap where i want to snap a linestring with another linestring on the point where a line string is touching another one. here is the preview

enter image description here

Here is my gis query

SELECT ST_AsText(ST_Snap(line, input, ST_Distance(input,line)*10.0)) FROM (SELECT ST_GeomFromText('LINESTRING(88.4656805545 22.6896467287,88.4632558376 22.6896841575,88.4614285827 22.6882649519)',4326) As input, ST_GeomFromText('LINESTRING(88.4654606134 22.690117835,88.4655571729 22.6896761149)',4326) As line);

But the above query snapping the line to the end. I'm guessing the query is not appropriate.

This is what happening

enter image description here

0

There are 0 best solutions below