I have a database in SQL server 2008 R2. The database has a table with 5 columns and one column is "geometry", like :
0xE610000001042C1C00000000004033DF60C000000080 ...
I have exported it to a csv file and would like to import it to a database in Spatialite 1.2.1.
I have created a database in Spatialite 1.2.1. The database has a table with the same structure as the one on SQL server.
But, when I imported the csv file to the table, I got error:
I am new to Spatialite.
Thanks !
there is only one row in the csv file. The "geometry" field is very long, which has 65536 characters. If I replaced the long string with a very short one, no error for loading but the table is empty.
for (i = 0; i < text->max_fields; i++) {
...
else if (type == VRTTXT_TEXT) { void *ptr = (void *) value; strcpy(dummy, value); free(ptr); CleanSqlString(dummy); strcat(sql, "'"); strcat(sql, dummy); strcat(sql, "'"); }
...
}
Thanks!
But, why it still failed if I cut off 75% of the whole geometry string ?
It still failed even when I loaded a table without gepmetry data.
Example,
ID,CNTRY_NAME,POP_CNTRY,AREA_SQKM,COLOR_MAP
194,United States,258833000,9449362,5
After I loaded it, no errro poped up but no table is shown up in the GUI after refreshing.
thanks
On Saturday, January 2, 2016 at 7:29:05 PM UTC-5, usac...@gmail.com wrote:I have a database in SQL server 2008 R2. The database has a table with 5 columns and one column is "geometry", like :
0xE610000001042C1C00000000004033DF60C000000080 ...
I have exported it to a csv file and would like to import it to a database in Spatialite 1.2.1.
I have created a database in Spatialite 1.2.1. The database has a table with the same structure as the one on SQL server.
But, when I imported the csv file to the table, I got error:
I do something wrong ?I am new to Spatialite.
Thanks !
--
You received this message because you are subscribed to a topic in the Google Groups "SpatiaLite Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/spatialite-users/RDBRoECdDpE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to spatialite-use...@googlegroups.com.
To post to this group, send email to spatiali...@googlegroups.com.
Visit this group at https://groups.google.com/group/spatialite-users.
For more options, visit https://groups.google.com/d/optout.
Thanks,
I have added 'United States' to the same file but still no table shown up in GUI.
I am using spatialite-gui v1.2 (by Alesssandro Furieri - 2008).
SpatiaLite version is 2.3.0.
Thanks,
I have downloaded spatialite_gui 2.000-devel.
I can load the table :
ID,CNTRY_NAME,POP_CNTRY,AREA_SQKM,COLOR_MAP
194,United,258833000,9449362,5
But, it is empty.
Afterloading, a window poped up:
CSV/TXT loaded
0 inserted rows
ID,CNTRY_NAME,POP_CNTRY,AREA_SQKM,COLOR_MAP194,'United States',258833000,9449362,5
Thanks,
I have downloaded spatialite_gui 2.000-devel.
Thanks,
What kind of file is better for loading binary data such as "Geometry" to spatialite ?
Thanks,
About the length of the column "BOUNDARY", it is used to hold boundary data (latitude and longitude ) of administration region such as county, state or postal code in USA.
The length may be longer than 65535.
How to import the long data sequence to spatialite database ?
But, I can import the same csv file (with the long geometry data column) to SQLite 3.8.10 through SQLite studio 3.7.0, without any problems.