1

I am self taught in GIS, so I apologize ahead of time for my noobness.

In ArcGIS you have two options to associate data in a table to spatial data. Based upon my understanding, the first is Join which allows the join of 1:1 or many:1. Then there is Relate which allows 1:many.

I downloaded soils data from Web Soils Survey. In this data there is a spatial data, a shape file named soilmu_a_ny071.shp. And there is tabular data named component in soildb_US_2003.mdb.

I need to relate the spatial data to many attributes in the tabular data based upon the common field MUKEY. Is there a way to Relate in QGIS 2.0? I also have Postgresql and PostGIS installed, so is there a way to do it through there?

1

Here is a tutorial for doing the join in QGIS.

To do this in PostGIS, you would create a query or view that does the join between the two tables:

Select table_a.column, table_b.column  
from table_a   
join table_b   
on (table_a.MUKEY = table_b.MUKEY)

(...or something very similar...)

More info here

2
  • 1
    I think the second table is non-spatial. That would only be a normal join, not a spatial one in PostGIS. – underdark Nov 26 '13 at 20:13
  • Ah! Good point! – DPSSpatial_BoycottingGISSE Nov 26 '13 at 20:16
1

Based upon the few answers I have gotten, I assume that this would be a View rather than a join. I am looking at this in order to guide the SQL Query.

CREATE VIEW [Soils Extended Data] AS
SELECT *
FROM soilmu_a_ny071
JOIN Component
ON soilmu_a_ny071.MUKEY=Component.mukey;

soilmu_a_ny071 = the shape file imported into PostGIS to create the spatial table and Component = the non-spatial table.

1
  • @underdark: Does this sound correct? – LandArch Dec 10 '13 at 15:46
0

I need to relate the spatial data to many attributes in the tabular data based upon the common field MUKEY.

From this description it is not clear whether the tabular data contains multiple records that need to be associated with one spatial feature. If there is only one record in the tabular data for each spatial feature, you can simply use the join in Layer Properties.

If you need to join multiple tabular records to one geographic feature, that is easier to do in PostGIS. You can create a view which joins both tables on the common key. The result will be multiple same geometries with different attributes from the join.

1
  • 1
    You are correct. I need to join multiple records in the tabular data to each spatial feature that has a similar MUKEY. Any chance you know of a good tutorial? I assume I need to add the table in some way the .mdb to PostGIS? – LandArch Nov 26 '13 at 20:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.