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

Jonathan Rizzo jrizzo at Langan.com
Tue Jun 7 09:27:45 EDT 2011


Thanks, Gordon.  I think I hacked my way around in SQL enough to "make
it work" but I will try following Jackie's blog post.  It looks like it
describes the correct way of doing what I am trying to do.  

Jon

-----Original Message-----
From: mapguide-users-bounces at lists.osgeo.org
[mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of GordonL
Sent: Monday, June 06, 2011 5:07 PM
To: mapguide-users at lists.osgeo.org
Subject: [mapguide-users] Re: Feature join in SQL Server 2008

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-t
p6446417p6447010.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
_______________________________________________
mapguide-users mailing list
mapguide-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users


More information about the mapguide-users mailing list