How to importing Geospatial data

Comments

7 comments

  • Avatar
    Candido Dessanti

    Hi @misill_zhu,

    Welcome to the community.

    Could you share the article you are referring to and your use case with us?

    Are we talking about this one? https://docs.heavy.ai/loading-and-exporting-data/supported-data-sources/import-geo

    Regards, Candido

    0
    Comment actions Permalink
  • Avatar
    misill

    (post deleted by author)

    0
    Comment actions Permalink
  • Avatar
    misill zhu

    Hi @candido.dessanti I've come to this step. Screenshot from 2022-04-04 21-10-23|690x68 But something went wrong "Session not valid" Regards, Misill

    0
    Comment actions Permalink
  • Avatar
    Candido Dessanti

    Hi,

    the "session not valid" error comes out when the session is disconnected for whatever reason or when you never connected to the database(for example when you typed the wrong password at login, or in the case of EE/FREE edition when the license is expired/not entered).

    Could please be sure that you can connect freely to the database and run other queries without any errors?

    I tried the example of our docs and it worked flawlessly.

    omnisql> create table test_geo (p point, l linestring,po polygon);
    omnisql> insert into test_geo values('POINT(20 20)', 'LINESTRING(40 0, 40 40)', 
    ..> 'POLYGON(( 0 0, 40 0, 40 40, 0 40, 0 0 ))');
    omnisql> select * from test_geo;
    p|l|po
    POINT (20 20)|LINESTRING (40 0,40 40)|POLYGON ((0 0,40 0,40 40,0 40,0 0))
    

    Regards, Candido

    0
    Comment actions Permalink
  • Avatar
    misill zhu

    Hi, @candido.dessanti I reconnected the database and it's OK, but the next step went wrong again. Screenshot from 2022-04-05 09-39-56|690x134 Regards, Misill

    0
    Comment actions Permalink
  • Avatar
    Candido Dessanti

    Hi,

    That command has to be run from the shell and not from the omnisql, but it looks that something got mixed up into the docs and it looks confusing.

    The omnisql is used to to run sql statement in the database and other commands like copy.

    So to follow the example you should create a file like the geo.csv using a unix shell, and then ingest data into the database using omnisql and the copy command.

    Anyway that's only an example to explain how to load a delmited file that contains geometries; you can use alternate methods depending on where your data is.

    Candido

    0
    Comment actions Permalink
  • Avatar
    misill zhu

    (post deleted by author)

    0
    Comment actions Permalink

Please sign in to leave a comment.