I want to use the binary version of GDAL to avoid programming in C or Java here. So I have created a SQL file and I want to run it using the following command :
ogrinfo.exe empty.gpkg -sql @my_sql_file.txt
I am about to populate some features in a sample table, lets name it "road".
Here is my question :
Do I have to create a BLOB out of a set of coordinates to be able to insert a polyline in my road table? If yes how should I do this?
I couldn't find any relevant document neither in GDAL nor in OGC website.
Here it is what I have got so far :
CREATE TABLE road (id int NOT NULL,name text(50),geom BLOB,PRIMARY KEY (id)); INSERT INTO gpkg_contents (table_name, identifier, data_type, srs_id) VALUES ( 'road', 'my_view', 'features', 4326); INSERT INTO gpkg_geometry_columns (table_name, column_name, geometry_type_name, srs_id, z, m) values ('road', 'geom', 'POLYLINE', 4326, 0, 0);