[mapguide-users] Re: Feature join in SQL Server 2008

GordonL gordon.luckett at arrowgeomatics.com
Mon Jun 6 17:06:58 EDT 2011


Hi Jon,
I you have a table in SQL Server that contains your Geography/Geometry
column, you can join it to another table using a "VIEW".  A query is a saved
Query (like in Microsoft Access) that you can use. 

You can use SQL to connect the KEY in your table (i.e. PARCEL_ID or GIS_ID)
to the KEY in the other table.  

For Example, I have two tables:
1. TEMPEST_LAND
2. GIS_PARCEL

TEMPEST_LAND has all my address info and it has a key column called GIS_LINK
GIS_PARCEL has all my graphics (GEOG) and it has a key column called GIS_ID

Create a new VIEW called vwLANDPARCEL

SELECT     dbo.TEMPEST_LAND.ADDRESS, dbo.GIS_PARCEL.GEOM,
dbo.GIS_PARCEL.GIS_ID
FROM         dbo.TEMPEST_LAND INNER JOIN
                      dbo.GIS_PARCEL ON dbo.TEMPEST_LAND.GIS_LINK =
dbo.GIS_PARCEL.GIS_ID

This would give your only the parcels that match in the TEMPEST_LAND table.  

You can then point MapGuide to this new view called vwLANDPARCEL

Now if you want to make the parcels selectable, you will have to check out
Jackie's FDO Schema Overrides
http://themapguyde.blogspot.com/2010/08/using-fdo-schema-overrides.html

Too bad joins within mapguide are too pokey.

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Feature-join-in-SQL-Server-2008-tp6446417p6447010.html
Sent from the MapGuide Users mailing list archive at Nabble.com.


More information about the mapguide-users mailing list