Skip to content

Instantly share code, notes, and snippets.

@jlstanus
Last active June 16, 2020 07:25
Show Gist options
  • Save jlstanus/cc662de2215705ee5635c9d1af7edec4 to your computer and use it in GitHub Desktop.
Save jlstanus/cc662de2215705ee5635c9d1af7edec4 to your computer and use it in GitHub Desktop.
# Create a line to show the distance between points
# http://www.gaia-gis.it/gaia-sins/spatialite-sql-4.2.0.html
# 'select EnableGpkgAmphibiousMode()' to enable sql query on geopackage
select
cNewg.address,
MakeLine(cNewg.geometry, cOldg.geometry) as geometry
from
(select Newg.rue_txt || Newg.numero as address, Newg.geometry
from Newg
) as cNewg
join
(select Oldg.rue_txt || Oldg.numero as address, Oldg.geometry from Oldg
) as cOldg on cOldg.address = cNewg.address
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment