SpatiaLite-gui : it is possible to link relative path to a SHP ?

17 views
Skip to first unread message

Roberto Angeletti

unread,
Apr 24, 2016, 1:26:40 AM4/24/16
to spatiali...@googlegroups.com
Hello all,

somebody knows if it is possible to create a virtual table using a relative path ?

I tried with this:

CREATE VIRTUAL TABLE "nodi_pt"
USING VirtualShape('.\nodi_pt',
'CP1252', 4326)

but the table results empty and with "PKUID" and "geometry"  default fields.


Thank you for any info

Regards

Roberto

a.fu...@lqt.it

unread,
Apr 24, 2016, 5:11:21 AM4/24/16
to spatiali...@googlegroups.com
On Sun, 24 Apr 2016 07:26:38 +0200, Roberto Angeletti wrote:
> Hello all,
>
> somebody knows if it is possible to create a virtual table using a
> relative path ?
>
> I tried with this:
>
> CREATE VIRTUAL TABLE "nodi_pt"
> USING VirtualShape('.\nodi_pt',
> 'CP1252', 4326)
>
> but the table results empty and with "PKUID" and "geometry"  default
> fields.
>

ciao Roberto,

yes, you can successfully create a VirtualShape table even by
specifying a relative path, but some cautions should be
carefully considered.

any relative path strictly depends on the current working
directory setting: if you are using the CLI tool from a
command shell the current working directory surely is
the one passed by the shell.

but if you are using instead the GUI tool the current
working directory could eventually change depending on
previous actions (e.g. if you've imported or exported
some external file).
if you've launched the GUI tool from some command shell
the current working directory will be initially set
accordingly to the shell own setting; but when you
launch the GUI tool by clicking its desktop icon
then the current working directory will be initially
set as the directory containing the binary executable.

short conclusion: when using the GUI tool creating
a VirtualShape by specifying a relative path always is
a discouraged option, because it can easily fail
depending on the mode you've launched the application
and on previous operations.

bye Sandro
Reply all
Reply to author
Forward
0 new messages