SmartRoadSense CSV

13 views
Skip to first unread message

Roberto Angeletti

unread,
Apr 27, 2015, 4:04:20 AM4/27/15
to spatiali...@googlegroups.com
Hello,


I am trying to load SmartRoadSense CSV open data in SpatiaLlite:
I would like to load them as "Virtual CSV", but SpatiaLite returns an error.

Instead, it is loaded correctly, using the standard CSV loader.


Somebody can help me to understand where I wrong ?


Thank you

Roberto

a.fu...@lqt.it

unread,
Apr 27, 2015, 7:07:30 AM4/27/15
to spatiali...@googlegroups.com
On Mon, 27 Apr 2015 10:04:19 +0200, Roberto Angeletti wrote:
> Hello,
>
> I am trying to load SmartRoadSense CSV open data in SpatiaLlite:
>
> http://smartroadsense.it/data/srs_data.zip [1]
>
> I would like to load them as "Virtual CSV", but SpatiaLite returns an
> error.
>
> Instead, it is loaded correctly, using the standard CSV loader.
>
> Somebody can help me to understand where I wrong ?
>

Hi Robero,

you are probably passing some wrong/inappropriate argument
while creating the VirtualText table.
I was able to create a perfectly working VirtualText
table following this approach:

after a quick visual inspection of the CSV file I've
verified that:
- it contains column names into the very first row;
and these names are enclosed within double quotes (")
- comma is used as the separator between values (,)
- the decimal separator is point (.)

using the GUI tool this layout matches the settings you
can see in the attached figure.
if you wish better to manually create the VirtualText
table this one is the appropriate SQL statement:

CREATE VIRTUAL TABLE srs_data USING VirtualText(
'srs_data.csv', 'CP1252', 1, POINT, DOUBLEQUOTE, ',');

bye Sandro
sample.png
Reply all
Reply to author
Forward
0 new messages