Hi Sandro and all,
I am dealing with an issue that may be rightfully without an easy solution, but I decided to ask in hopes there is an easy solution.
In a nutshell, I am working with two separate layers (links and nodes/points), where the Point layer is an XYZ layer and the Link Layer is XY only. The issue arises when I try to do searches using the spatial index. One example for getting the node_id for a node that is in the same position of the start of the linestring when such node exists is provided below.
create trigger if not exists network_updated_link_geo after update of geo on link
begin
update link
set node_a = (
select node_id
from node
where CastToXY(node.geo) = StartPoint(new.geo) and
(node.rowid in (
select rowid from SpatialIndex where f_table_name = 'node' and
search_frame = StartPoint(new.geo)) or
node.node = new.node_a))
where link.rowid = new.rowid;
end;
The search_frame for the query (in bold) seems to be the problem, as that is on the plane and the nodes are not. I could not find any such reference in the documentation, so I wonder if there is a way to tell SpatiaLite to make a 2D search instead of 3D one.
Cheers,
Pedro
Cheers,
Pedro
Well… This is embarrassing, but the spatial index search was working perfectly, but I had issues elsewhere in the pipeline.
Thanks!
--
You received this message because you are subscribed to the Google Groups "SpatiaLite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spatialite-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/spatialite-users/be757395-a0b7-4b6d-a089-46ec8a2df4f1n%40googlegroups.com.
Well… This is embarrassing,
but the spatial index search was working perfectly, but I had issues elsewhere in the pipeline.
--
You received this message because you are subscribed to the Google Groups "SpatiaLite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spatialite-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/spatialite-users/bc9cc2ce1129573dd9ac95395e71a495%40lqt.it.