New to Spatialite question re shapefiles

34 views
Skip to first unread message

Steven Elster

unread,
Dec 26, 2016, 9:44:35 PM12/26/16
to SpatiaLite Users
Hi, If I open up a .shp file in Spatialite, then query it or otherwise modify it (so that it has fewer records), will Spatialite automatically also have adjusted the linked files such as the dbf and shp, so that I can letter load the modified shapefile into qGis?
Thanks, Steve

Brad Hards

unread,
Dec 27, 2016, 2:28:48 AM12/27/16
to spatiali...@googlegroups.com
Queries won't change the data.

Updates should be fine for those core files.

The only corner case I can think of is the possibility of special index files,
but its unlikely to cause any problems with QGIS.

Brad
> --
> You received this message because you are subscribed to the Google Groups
> "SpatiaLite Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email
> to spatialite-use...@googlegroups.com <mailto:spatialite-
> users+un...@googlegroups.com> .
> To post to this group, send email to spatiali...@googlegroups.com
> <mailto:spatiali...@googlegroups.com> .
> Visit this group at https://groups.google.com/group/spatialite-users.
> For more options, visit https://groups.google.com/d/optout.



Steven Elster

unread,
Dec 27, 2016, 9:41:54 AM12/27/16
to SpatiaLite Users
What about for arcGis?  Is it likely that it will still be able to read the modified shapefiles?  What I am trying to do is to reduce the size of a large shapefile (800k records), before sending it to qGIS or arcGIS or some other mapping program.  Because a lot of the filtering that I need to do can be done by just by looking at a table, doesn't require a map to see what to do. 
Thank you,
Steve

a.fu...@lqt.it

unread,
Dec 27, 2016, 10:31:54 AM12/27/16
to spatiali...@googlegroups.com
> What about for arcGis? Is it likely that it will still be able to
> read the modified shapefiles?
>

SpatiaLite can never modify a shapefile, it's an unsupported option.

If you wish you can eventually export one or more SpatiaLite DB Tables
as external shapefiles; obviously any exported shapefile is a "brand
new"
file and not a "modified" file.

All Shapefiles exported by SpatiaLite are always expected to be
correctly read by both QGIS and ArcGIS (and by many other GIS
tools supporting the shapefile format in a reasonably standard
way)
.

> What I am trying to do is to reduce
> the size of a large shapefile (800k records), before sending it to
> qGIS or arcGIS or some other mapping program. Because a lot of the
> filtering that I need to do can be done by just by looking at a
> table,
> doesn't require a map to see what to do.
>

you can do such a thing in three distinct steps:

1. import you shapefile(s) as Table(s) stored within a SpatiaLite DB.
2. use the appropriate SQL statements so to arrange your Spatial Data
as required.
3. and finally export out from SpatiaLite one (or more) shapefile(s)
to be passed to QGIS or whatever else.
note: if you use QGIS you can skip this final step because QGIS
has the native capability to directly access a SpatiaLite DB, so
you can radically avoid to use the obsolete shapefile format.

bye Sandro
Reply all
Reply to author
Forward
0 new messages