Hi all. While importing a shapefile into postgis, I see that the command contains 2 "u" that I do not understand:
['shp2pgsql', '-c', '-s', '3003', u'/home/paolo/Desktop/Dati_corso_QGIS/strade_regionali.shp', u'public.strade'] Furthermore, importing a linear vector throws an error: Something's wrong: ['Shapefile type: Arc\n', 'Postgis type: MULTILINESTRING[2]\n'] If I select "Create single-part geometries instead of multi-part", I get instead: syntax error at or near "''" RIGA 2: ...','0','0','0','0.00000','0','0',NULL,NULL,NULL,NULL,NULL'') I suspect this is due to some special character in the dbf; the same command crashes shp2pgsql from the command line: ... INSERT INTO "public"."strade" ("fnode_","tnode_","lpoly_","rpoly_","length","statali_","statali_id","codice","nome","tipo","codifica",the_geom) VALUES ('0','0','0','0','0.00000','0','0',NULL,NULL,NULL,NULL,NULL�9 ��9 '); Segmentation fault On another machine, I get a more explicit error: Something's wrong: ['Shapefile type: Arc\n', 'Postgis type: MULTILINESTRING[2]\n', '*** glibc detected *** shp2pgsql: free(): invalid pointer: 0x00007fce65fc7e60 ***\n', '======= Backtrace: =========\n', '/lib/libc.so.6[0x7fce65ce8d16]\n', '/lib/libc.so.6(cfree+0x6c)[0x7fce65ced9bc]\n', 'shp2pgsql[0x40ab82]\n', 'shp2pgsql[0x40b77e]\n', '/lib/libc.so.6(__libc_start_main+0xfd)[0x7fce65c96abd]\n', 'shp2pgsql[0x402969]\n', '======= Memory map: ========\n', '00400000-00436000 r-xp 00000000 08:01 1190782 /usr/bin/shp2pgsql\n', '00635000-00636000 rw-p 00035000 08:01 1190782 /usr/bin/shp2pgsql\n', '01767000-01788000 rw-p 00000000 00:00 0 [heap]\n', '7fce60000000-7fce60021000 rw-p 00000000 00:00 0 \n', '7fce60021000-7fce64000000 ---p 00000000 00:00 0 \n', '7fce655dd000-7fce655f3000 r-xp 00000000 08:01 1042654 /lib/libgcc_s.so.1\n', '7fce655f3000-7fce657f2000 ---p 00016000 08:01 1042654 /lib/libgcc_s.so.1\n', '7fce657f2000-7fce657f3000 rw-p 00015000 08:01 1042654 /lib/libgcc_s.so.1\n', '7fce657f3000-7fce657f5000 r-xp 00000000 08:01 100246 /usr/lib/gconv/CP1252.so\n', '7fce657f5000-7fce659f4000 ---p 00002000 08:01 100246 /usr/lib/gconv/CP1252.so\n', '7fce659f4000-7fce659f5000 r--p 00001000 08:01 100246 /usr/lib/gconv/CP1252.so\n', '7fce659f5000-7fce659f6000 rw-p 00002000 08:01 100246 /usr/lib/gconv/CP1252.so\n', '7fce659f6000-7fce65a77000 r-xp 00000000 08:01 1043745 /lib/libm-2.10.2.so\n', '7fce65a77000-7fce65c76000 ---p 00081000 08:01 1043745 /lib/libm-2.10.2.so\n', '7fce65c76000-7fce65c77000 r--p 00080000 08:01 1043745 /lib/libm-2.10.2.so\n', '7fce65c77000-7fce65c78000 rw-p 00081000 08:01 1043745 /lib/libm-2.10.2.so\n', '7fce65c78000-7fce65dc2000 r-xp 00000000 08:01 1043738 /lib/libc-2.10.2.so\n', '7fce65dc2000-7fce65fc2000 ---p 0014a000 08:01 1043738 /lib/libc-2.10.2.so\n', '7fce65fc2000-7fce65fc6000 r--p 0014a000 08:01 1043738 /lib/libc-2.10.2.so\n', '7fce65fc6000-7fce65fc7000 rw-p 0014e000 08:01 1043738 /lib/libc-2.10.2.so\n', '7fce65fc7000-7fce65fcc000 rw-p 00000000 00:00 0 \n', '7fce65fcc000-7fce65fe9000 r-xp 00000000 08:01 1043115 /lib/ld-2.10.2.so\n', '7fce661ab000-7fce661ac000 rw-p 00000000 00:00 0 \n', '7fce661ac000-7fce661b3000 r--s 00000000 08:01 98890 /usr/lib/gconv/gconv-modules.cache\n', '7fce661b3000-7fce661d5000 rw-p 00000000 00:00 0 \n', '7fce661d5000-7fce661e8000 rw-p 00000000 00:00 0 \n', '7fce661e8000-7fce661e9000 r--p 0001c000 08:01 1043115 /lib/ld-2.10.2.so\n', '7fce661e9000-7fce661ea000 rw-p 0001d000 08:01 1043115 /lib/ld-2.10.2.so\n', '7fffe2c34000-7fffe2c49000 rw-p 00000000 00:00 0 [stack]\n', '7fffe2dd7000-7fffe2dd8000 r-xp 00000000 00:00 0 [vdso]\n', 'ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]\n'] So it must be a PostGIS problem. I can make the shp available for testing if necessary. It has a wrong record. All the best. -- Paolo Cavallini: http://www.faunalia.it/pc _______________________________________________ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users