<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<STYLE type=text/css>DIV {
        MARGIN: 0px
}
</STYLE>
<META content="MSHTML 6.00.2900.3199" name=GENERATOR></HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>I think is possible to put a spatial query in
the <Filter> tag of the layer definition, but this is high dependent
of the database. </FONT></DIV>
<DIV><FONT face=Arial size=2>And I don't know if the time to process</FONT><FONT
face=Arial size=2> this query is more complex than filter using
the ids of the parcels.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>But to solve this problem, you can make a spatial
query using SelectFeatures and get the ids of parcels and follow make
the filter using the ids.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Regards,</FONT></DIV>
<DIV><FONT face=Arial size=2>Luiz Marcio</FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=ary.sucaya@yahoo.com href="mailto:ary.sucaya@yahoo.com">ary
sucaya</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A
title=mapguide-users@lists.osgeo.org
href="mailto:mapguide-users@lists.osgeo.org">MapGuide Users Mail List</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Wednesday, January 02, 2008 6:41
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [mapguide-users] Sql For
Data Filter</DIV>
<DIV><BR></DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">I got
it, as Kenneth said:</DIV>
<DIV
style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"> </DIV>
<DIV
style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">$node->nodeValue
= the_geom intersects(GEOMFROMTEXT('POLYGON((x1 y1,x2 y1,x2 y2,x1 y1,x1
y1))')";)</DIV>
<DIV
style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"> </DIV>
<DIV
style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">Regards,</DIV>
<DIV
style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"> </DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">Ary
Sucaya<BR><BR></DIV>
<DIV
style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">-----
Original Message ----<BR>From: ary sucaya <<A
href="mailto:ary.sucaya@yahoo.com">ary.sucaya@yahoo.com</A>><BR>To:
MapGuide Users Mail List <<A
href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</A>><BR>Sent:
Wednesday, January 2, 2008 9:51:21 PM<BR>Subject: Re: [mapguide-users] Sql For
Data Filter<BR><BR>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">
<DIV
style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">Luiz,</DIV>
<DIV
style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"> </DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">Maybe
you're right Luiz. But still i found difficulties to apply a spatial filter
for those parcels. Here is how i made a filter to select parcels owned by
SCH*:</DIV>
<DIV
style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"> </DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">$xpath
= new DOMXPath($domDocument); <BR>$query = '//VectorLayerDefinition/Filter';
<BR>$nodes = $xpath->query($query); <BR></DIV>
<DIV
style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">foreach
($nodes as $node ) <BR>{ <BR> $node->nodeValue = "NAME LIKE
'SCH%'"; <BR>}</DIV>
<DIV
style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"> </DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">My
question is how to apply spatial filter into this node value?</DIV>
<DIV
style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"> </DIV>
<DIV
style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"> </DIV>
<DIV
style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">Regards,</DIV>
<DIV
style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"> </DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">Ary
Sucaya</DIV>
<DIV
style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"> </DIV>
<DIV
style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"><BR><BR> </DIV>
<DIV
style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">-----
Original Message ----<BR>From: Luiz Marcio Viana
<lmarcio@pars.com.br><BR>To: MapGuide Users Mail List
<mapguide-users@lists.osgeo.org><BR>Sent: Wednesday, January 2, 2008
4:33:30 PM<BR>Subject: Re: [mapguide-users] Sql For Data Filter<BR><BR>
<STYLE type=text/css>DIV {
MARGIN:0px;}
</STYLE>
<DIV><FONT face=Arial size=2>Ary Sucaya,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I don't know, how is the spatial capability
provided by the FDO Provider for PostGIS (I think is the GDAL
provider, isn't it?), but you can apply a spatial filter using the geometry of
the district layer as a filter to select the parcels.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>This is a simple solution wich works
almost independently of the provider.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Regards,</FONT></DIV>
<DIV><FONT face=Arial size=2>Luiz Marcio</FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV style="BACKGROUND: #e4e4e4; FONT: 10pt arial"><B>From:</B> <A
title=ary.sucaya@yahoo.com href="mailto:ary.sucaya@yahoo.com" target=_blank
rel=nofollow ymailto="mailto:ary.sucaya@yahoo.com">ary sucaya</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A
title=mapguide-users@lists.osgeo.org
href="mailto:mapguide-users@lists.osgeo.org" target=_blank rel=nofollow
ymailto="mailto:mapguide-users@lists.osgeo.org">MapGuide Users Mail List</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Wednesday, January 02, 2008 6:32
AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [mapguide-users] Sql For
Data Filter</DIV>
<DIV><BR></DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">
<DIV
style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">Thanks
Kenneth,</DIV>
<DIV
style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"> </DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">I'm
looking for sample code of making data filter programmatically and save in
into current session.</DIV>
<DIV
style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"> </DIV>
<DIV
style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"> </DIV>
<DIV
style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"> </DIV>
<DIV
style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">Regards,</DIV>
<DIV
style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"> </DIV>
<DIV
style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"> </DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">Ary
Sucaya<BR><BR></DIV>
<DIV
style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">-----
Original Message ----<BR>From: "Kenneth, GEOGRAF A/S" <<A
href="mailto:ks@geograf.dk" target=_blank rel=nofollow
ymailto="mailto:ks@geograf.dk">ks@geograf.dk</A>><BR>To: MapGuide Users
Mail List <<A href="mailto:mapguide-users@lists.osgeo.org" target=_blank
rel=nofollow
ymailto="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</A>><BR>Sent:
Wednesday, January 2, 2008 10:08:48 AM<BR>Subject: Re: [mapguide-users] Sql
For Data Filter<BR><BR>I think the "Query" part of the "Generic Tasks" is
close to what you want:<BR><A class=moz-txt-link-freetext
href="http://data.mapguide.com/mapguide/gt/index.php" target=_blank
rel=nofollow>http://data.mapguide.com/mapguide/gt/index.php</A><BR><BR>More
samples:<BR><A class=moz-txt-link-freetext
href="http://mapguide.osgeo.org/livegallery.html" target=_blank
rel=nofollow>http://mapguide.osgeo.org/livegallery.html</A><BR><PRE class=moz-signature>Regards, Kenneth, GEOGRAF A/S
</PRE><BR><BR>ary sucaya skrev:
<BLOCKQUOTE type="cite">
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">
<DIV
style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">Great!,
I will try</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">I
was wondering if there is a sample code for it..<BR>Thank v much..</DIV>
<DIV
style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"> </DIV>
<DIV
style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">regards,</DIV>
<DIV
style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"> </DIV>
<DIV
style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">Ary
Sucaya</DIV>
<DIV
style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"><BR> </DIV>
<DIV
style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">-----
Original Message ----<BR>From: "Kenneth, GEOGRAF A/S" <A
class=moz-txt-link-rfc2396E href="mailto:ks@geograf.dk" target=_blank
rel=nofollow
ymailto="mailto:ks@geograf.dk"><ks@geograf.dk></A><BR>To: MapGuide
Users Mail List <A class=moz-txt-link-rfc2396E
href="mailto:mapguide-users@lists.osgeo.org" target=_blank rel=nofollow
ymailto="mailto:mapguide-users@lists.osgeo.org"><mapguide-users@lists.osgeo.org></A><BR>Sent:
Wednesday, January 2, 2008 8:46:05 AM<BR>Subject: Re: [mapguide-users] Sql
For Data Filter<BR><BR>I don't have a list of what the different providers
support.<BR>I have used the OGR provider, and it supports PostGIS and
limited SQL.<BR><BR>My approach to your problem would be to start out with
the layer hidden.<BR>When you want to display the correct district, you
read out the WKT of the feature (district) you want to perform the
intersection test with.<BR>Then you update the filter on the layer to
reflect this:<BR>GeoColumn Intersects GEOMFROMTEXT('....wkt....')<BR>Then
show the layer.<BR><BR>You should copy the layer into the session
repository before altering it.<BR>If you want to theme it, you can create
multiple copies of the layer and apply theming to the individual
layers.<BR><PRE class=moz-signature>Regards, Kenneth, GEOGRAF A/S
</PRE><BR><BR>ary sucaya skrev:
<BLOCKQUOTE type="cite">
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">
<DIV
style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">Thank
for your reply,</DIV>
<DIV
style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"> </DIV>
<DIV
style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">Can
you pls inform me what provider support full sql syntax? I use postgis
and it seem to be not support full sql syntax.</DIV>
<DIV
style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">In my
case, i can't use join tables because i need spatial relationship
between 2 tables. For examples in Mapguide sample there are 11
districts. At first time, i want to hide parcels. Then i want to
make a query to show parcels in particular distric and i want maps
show parcels which are in that query result. In this case, join between
two tables may not help me. I make use spatial relationship such as
intersects or within in this case.<BR></DIV>
<DIV
style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">Regards,</DIV>
<DIV
style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"> </DIV>
<DIV
style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">Ary
Sucaya</DIV>
<DIV
style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"><BR> </DIV>
<DIV
style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">-----
Original Message ----<BR>From: "Kenneth, GEOGRAF A/S" <A
class=moz-txt-link-rfc2396E href="mailto:ks@geograf.dk" target=_blank
rel=nofollow
ymailto="mailto:ks@geograf.dk"><ks@geograf.dk></A><BR>To: MapGuide
Users Mail List <A class=moz-txt-link-rfc2396E
href="mailto:mapguide-users@lists.osgeo.org" target=_blank rel=nofollow
ymailto="mailto:mapguide-users@lists.osgeo.org"><mapguide-users@lists.osgeo.org></A><BR>Sent:
Tuesday, January 1, 2008 5:25:05 PM<BR>Subject: Re: [mapguide-users] Sql
For Data Filter<BR><BR>That depends on the provider. Some providers
supports full SQL syntax.<BR><BR>I can't see how you can join tables
with a filter, as that is the equvalent of the SQL WHERE
construct.<BR>You can try to setup a Join on the featuresource, but I
have had limited success with joins.<BR><PRE class=moz-signature>Regards, Kenneth, GEOGRAF A/S
</PRE><BR><BR>ary sucaya skrev:
<BLOCKQUOTE type="cite">
<DIV
style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">
<DIV>Hello,</DIV>
<DIV> </DIV>
<DIV>I was wondering if i can put a complex sql statement at 'Filter
applied to data' textbox on Layer Editor. I need to show some data
from my postgis table and sql to select this data involving 2 or more
table.</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>Regs,</DIV>
<DIV> </DIV>
<DIV>ary sucaya</DIV></DIV><BR>
<HR SIZE=1>
Never miss a thing. <A
href="http://us.rd.yahoo.com/evt=51438/*http://www.yahoo.com/r/hs"
target=_blank rel=nofollow>Make Yahoo your homepage.</A> <PRE><HR width="90%" SIZE=4>
_______________________________________________
mapguide-users mailing list
<A class=moz-txt-link-abbreviated href="mailto:mapguide-users@lists.osgeo.org" target=_blank rel=nofollow ymailto="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</A>
<A class=moz-txt-link-freetext href="http://lists.osgeo.org/mailman/listinfo/mapguide-users" target=_blank rel=nofollow>http://lists.osgeo.org/mailman/listinfo/mapguide-users</A>
</PRE></BLOCKQUOTE></DIV>
<DIV
style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"><BR></DIV></DIV><BR>
<HR SIZE=1>
Looking for last minute shopping deals? <A
href="http://us.rd.yahoo.com/evt=51734/*http://tools.search.yahoo.com/newsearch/category.php?category=shopping"
target=_blank rel=nofollow>Find them fast with Yahoo! Search.</A> <PRE><HR width="90%" SIZE=4>
_______________________________________________
mapguide-users mailing list
<A class=moz-txt-link-abbreviated href="mailto:mapguide-users@lists.osgeo.org" target=_blank rel=nofollow ymailto="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</A>
<A class=moz-txt-link-freetext href="http://lists.osgeo.org/mailman/listinfo/mapguide-users" target=_blank rel=nofollow>http://lists.osgeo.org/mailman/listinfo/mapguide-users</A>
</PRE></BLOCKQUOTE></DIV>
<DIV
style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"><BR></DIV></DIV><BR>
<HR SIZE=1>
Be a better friend, newshound, and know-it-all with Yahoo! Mobile. <A
href="http://us.rd.yahoo.com/evt=51733/*http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ%20"
target=_blank rel=nofollow>Try it now.</A> <PRE><HR width="90%" SIZE=4>
_______________________________________________
mapguide-users mailing list
<A class=moz-txt-link-abbreviated href="mailto:mapguide-users@lists.osgeo.org" target=_blank rel=nofollow ymailto="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</A>
<A class=moz-txt-link-freetext href="http://lists.osgeo.org/mailman/listinfo/mapguide-users" target=_blank rel=nofollow>http://lists.osgeo.org/mailman/listinfo/mapguide-users</A>
</PRE></BLOCKQUOTE></DIV>
<DIV
style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"><BR></DIV></DIV><BR>
<HR SIZE=1>
Never miss a thing. <A
href="http://us.rd.yahoo.com/evt=51438/*http://www.yahoo.com/r/hs"
target=_blank rel=nofollow>Make Yahoo your homepage.</A>
<P><SPAN
style="BORDER-TOP: rgb(128,128,128) 1px solid; MARGIN: 8px 0px; OVERFLOW: hidden; WIDTH: 100%; BORDER-BOTTOM: rgb(212,208,200) 1px solid; HEIGHT: 2px; BACKGROUND-COLOR: black"></SPAN>
<P></P>_______________________________________________<BR>mapguide-users
mailing list<BR>mapguide-users@lists.osgeo.org<BR><A
href="http://lists.osgeo.org/mailman/listinfo/mapguide-users" target=_blank
rel=nofollow>http://lists.osgeo.org/mailman/listinfo/mapguide-users</A><BR></BLOCKQUOTE></DIV>
<DIV
style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"><BR></DIV></DIV><BR>
<HR SIZE=1>
Be a better friend, newshound, and know-it-all with Yahoo! Mobile. <A
href="http://us.rd.yahoo.com/evt=51733/*http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ"
target=_blank rel=nofollow>Try it now.</A></DIV>
<DIV
style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"><BR></DIV></DIV><BR>
<HR SIZE=1>
Never miss a thing. <A
href="http://us.rd.yahoo.com/evt=51438/*http://www.yahoo.com/r/hs">Make Yahoo
your homepage.</A>
<P>
<HR>
<P></P>_______________________________________________<BR>mapguide-users
mailing
list<BR>mapguide-users@lists.osgeo.org<BR>http://lists.osgeo.org/mailman/listinfo/mapguide-users<BR></BLOCKQUOTE></BODY></HTML>