[Qgis-user] Merging shapefiles

Simon Cropper simoncropper at fossworkflowguides.com
Sun Mar 15 15:27:39 PDT 2015


On 16/03/15 08:59, Pat Brown wrote:
> I have a number of shapefiles showing the distribution of various
> plants. The distribution data are in the form of polygons as they are
> recorded by quarter-degree square (QDS). I want to find out how many
> species are present in each QDS. What is the best way to do this? Should
> I first merge the shapefiles? is there a way to do this without merging?
> What would be the advantages of merging? There are about 200 shapefiles.
> Many thanks
>
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
>

Hi Pat,

One would presume that each QDS has a unique code. If not, create a 
field and populate with unique label based on the top left lat/long value.

Shapefiles are not a single file. If you look in your directories you 
will note they consist of a SHP, SHX and DBF file. The DBF file is a 
standard database file that can easily be imported into Excel, Access or 
similar product. This DBF file contains your attribute data.

These DBF files can be safely read by external packages (Excel, Access, 
LibreOffice Calc). Don't update or change them however as it will cause 
problems with the SHP and SHX files.

Say you are using Excel. Import each DBF into a sheet. Since each record 
is tagged with a unique QDS code you can then sort and summarize all you 
want. If you set the DBF files up as a database source then as you 
update your Shapefiles in QGIS the changes will appear in Excel.


-- 
Cheers Simon

    Simon Cropper - Open Content Creator

    Free and Open Source Software Workflow Guides
    ------------------------------------------------------------
    Introduction               http://www.fossworkflowguides.com
    GIS Packages           http://www.fossworkflowguides.com/gis
    bash / Python    http://www.fossworkflowguides.com/scripting



More information about the Qgis-user mailing list