[Qgis-user] How to join shapefile tables via their FIDs?

Brad Nesom gisbradokla at live.com
Mon Dec 3 07:21:14 PST 2012


+1
dedicated primary key field
each time an object is edited (split/delete/merge) the fid is thrown away
and renewed. This is at the base level.
It has to be that way to keep the relationship between the diffent files
"in" the shapefile related. (i.e. dbf, shx, shp). As haubourg suggests -
create a new field and calculate the fid into it.
However there is another fallacy with what you propose. The FID between two
shape files cannot be relate-able (the same record to record) unless they
are exact duplicates of each other. (There seems to be no logical reason
for creating that type of join).
In order to accomplish joining two spatially relate-able feature classes
(point/polygon).
You should first decide what you want to know.
1. how many points are in each polygon?
2. which points are in which polygon?
http://qgis.spatialthoughts.com/2012/02/tutorial-spatial-
analysis-points-in.html
1. you can also do a spatial join using table manager (after the create
field step above in the point file). and then relate the newly created
table back to the . The opposite one will depend on the direction of your
spatial join and what you are trying to accomplish.
http://gis.stackexchange.com/questions/29756/how-to-
install-ftools-and-table-manager
qgis join
http://docs.qgis.org/html/en/docs/user_manual/working_with_
vector/vector_properties.html#index-28


On Mon, Dec 3, 2012 at 4:51 AM, haubourg <
regis.haubourg at eau-adour-garonne.fr> wrote:

> Hi,
> FID must be considered as internal identifiers , that can be unstable. I
> guess this is the reason why it is not exposed by gdal drivers and others.
> You should create a dedicated primary key field, this is a better pratice,
> less risky if data changes.
> RĂ©gis
>
>
>
> --
> View this message in context:
> http://osgeo-org.1560.n6.nabble.com/How-to-join-shapefile-tables-via-their-FIDs-tp5020215p5020305.html
> Sent from the Quantum GIS - User mailing list archive at Nabble.com.
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20121203/f09fe090/attachment.html>


More information about the Qgis-user mailing list