Problem export result from gui to shapefile

19 views
Skip to first unread message

Mikel

unread,
May 13, 2015, 2:21:36 AM5/13/15
to spatiali...@googlegroups.com
Hello everybody,

I'm using the latest precompiled SpaiaLite gui 4.2.1-rc1 on Windows 7 64-bit.
Within the program I use the option to export the resultlist to shapefile from the context menu.
I discovered the problem, if the geometry column is in the "middle" of the result and not the last row, that values are missing in the dbf.

I.e. you have a table with ID, Name1, Name2, Geometry and the select looks like this

select Name1, Geometry, Name2, ID from table;

In the gui overview everything looks fine but the exported dbf looks like this:

Header:   Name1, Name2, ID
Values:   Name1, NULL, Name2    (the ID is missing)

So the export excludes in the header the geometry column, which is correct, but the geometry itself is as NULL value written to file.

I don't know if anyone else reported this already, but maybe it helps to know about it.
Just take care, that the geometry is the last selcted value and everything is fine.



Bye Mikel.

Duncan

unread,
May 20, 2015, 8:35:06 PM5/20/15
to spatiali...@googlegroups.com
I can confirm this
 
SELECT Road, Geometry, Road_Name FROM table 
 
returns Road, Road_Name in the shapefile but Road_Name is empty
 
Cheers
 
Duncan

a.fu...@lqt.it

unread,
May 21, 2015, 12:18:16 PM5/21/15
to spatiali...@googlegroups.com
On Wed, 20 May 2015 17:35:06 -0700 (PDT), Duncan wrote:
> I can confirm this
>
> SELECT Road, Geometry, Road_Name FROM table
>
> returns Road, Road_Name in the shapefile but Road_Name is empty
>

Hi Duncan,

you are perfectly right; there was a bug in spatialite_gui
causing an incorrect association between the columns of the
resultset and the ones in the DBF after encountering a
Geometry.
rather obviously this had no adverse consequence at all
when the Geometry was the last column of the resultset.

now fixed in the Fossil repository.

bye Sandro

Duncan

unread,
May 21, 2015, 8:28:25 PM5/21/15
to spatiali...@googlegroups.com
Thanks Sandro. I'll be careful with that until the next release.
 
Keep up the good work
 
Duncan  
Reply all
Reply to author
Forward
0 new messages