<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I queried the feature programmatically (as a SDF) and tried to
assign it to a mgMultiPolygon and it didn’t fly. It did work as a
mgPolygon though.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>So, the problem seems to be that the geometry is being stored as
a polygon instead of a multipolygon. I have features in my map that aren’t
connected and I’m able to select them with no problem, but they are
multipolygons. This must have something to do with the conversion process
in ArcMap or in MapGuide Studio. I don’t have ArcMap so I can’t
comment on what is going on in that arena. Your guess is as good as mine
on whether this is an ArcMap issue or a MapGuide Studio issue.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>However, if you load the data as a SHP file (uncheck “convert
to SDF” in MapGuide Studio) and then view the layer in Studio, you can
select either side. So perhaps the solution is to just use the SHP file
in your map instead of converting it to SDF.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Hope that helps<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>-Mark Pendergraft<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>
<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
mapguide-users-bounces@lists.osgeo.org
[mailto:mapguide-users-bounces@lists.osgeo.org] <b>On Behalf Of </b>Kori Maleski<br>
<b>Sent:</b> Thursday, January 15, 2009 9:41 AM<br>
<b>To:</b> MapGuide Users Mail List<br>
<b>Subject:</b> Re: [mapguide-users] Polygons and Intersection Problem<o:p></o:p></span></p>
</div>
<p class=MsoNormal><o:p> </o:p></p>
<div>
<p class=MsoNormal>In the studio preview, it fails as well.<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal>Using the select tool, clicking on one polygon will
highlight/select the entirety, while clicking on the other will yield no highlight/select.<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal>Cheers,<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal>Kori Maleski<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><br>
<br>
<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal>On Thu, Jan 15, 2009 at 10:16 AM, Kori Maleski <<a
href="mailto:kori.maleski@gmail.com">kori.maleski@gmail.com</a>> wrote:<o:p></o:p></p>
<div>
<p class=MsoNormal>Mark,<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal>I have attached a shapefile with one of the polygons in
question. The spatialfilter fails on any dissolve multipolygon like this
one.<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal>Again, I converted it to sdf via a load procedure.<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal>Cheers,<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal>Kori Maleski<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><br>
<o:p></o:p></p>
</div>
<div>
<div>
<div>
<p class=MsoNormal>On Thu, Jan 15, 2009 at 10:08 AM, Mark Pendergraft <<a
href="mailto:markp@meadgilman.com" target="_blank">markp@meadgilman.com</a>>
wrote:<o:p></o:p></p>
</div>
</div>
<blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;
margin-left:4.8pt;margin-right:0in'>
<div>
<div>
<div>
<div>
<p><span style='font-size:11.0pt;color:#1F497D'>Could you upload your SDF file
with the 2 polygons?</span><o:p></o:p></p>
<p><span style='font-size:11.0pt;color:#1F497D'>-Mark P.</span><o:p></o:p></p>
<p><span style='font-size:11.0pt;color:#1F497D'> </span><o:p></o:p></p>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>
<p><b><span style='font-size:10.0pt'>From:</span></b><span style='font-size:
10.0pt'> <a href="mailto:mapguide-users-bounces@lists.osgeo.org" target="_blank">mapguide-users-bounces@lists.osgeo.org</a>
[mailto:<a href="mailto:mapguide-users-bounces@lists.osgeo.org" target="_blank">mapguide-users-bounces@lists.osgeo.org</a>]
<b>On Behalf Of </b>Kori Maleski<br>
<b>Sent:</b> Thursday, January 15, 2009 9:03 AM<br>
<b>To:</b> MapGuide Users Mail List<br>
<b>Subject:</b> [mapguide-users] Polygons and Intersection Problem</span><o:p></o:p></p>
</div>
<div>
<div>
<p> <o:p></o:p></p>
<div>
<p> <o:p></o:p></p>
</div>
<div>
<p>Hi All,<o:p></o:p></p>
</div>
<div>
<p> <o:p></o:p></p>
</div>
<div>
<p>Intersection problem:<o:p></o:p></p>
</div>
<div>
<p> <o:p></o:p></p>
</div>
<div>
<p>I have an application performs a query on a polygon layer with a point -
using intersection with the spatialfilter.<o:p></o:p></p>
</div>
<div>
<p> <o:p></o:p></p>
</div>
<div>
<p>The problem is this:<o:p></o:p></p>
</div>
<div>
<p> <o:p></o:p></p>
</div>
<div>
<p>The polygon originated from a shapefile - loaded as SDF via studio.<o:p></o:p></p>
</div>
<div>
<p>The single polygon feature originally was 2 distinct polygons dissolved
together via ArcMap.<o:p></o:p></p>
</div>
<div>
<p> <o:p></o:p></p>
</div>
<div>
<p>The intersection works only on one of the polygons, and fails to return a
feature reader at all when within the other polygon.<o:p></o:p></p>
</div>
<div>
<p> <o:p></o:p></p>
</div>
<div>
<p>This fails in both code execution and as a GeFeatureInfo WMS request in the
same manner.<o:p></o:p></p>
</div>
<div>
<p> <o:p></o:p></p>
</div>
<div>
<p>Has anyone encountered this?<o:p></o:p></p>
</div>
<div>
<p>Has anyone worked around?<o:p></o:p></p>
</div>
<div>
<p> <o:p></o:p></p>
</div>
<div>
<p>Is it better to explode the feature? I require the geometery from each
part to do a highlight.<o:p></o:p></p>
</div>
<div>
<p> <o:p></o:p></p>
</div>
<div>
<p>Is there an issue with how a shapefile multipolygon is converted to SDF?<o:p></o:p></p>
</div>
<div>
<p>Or is this an isse with the SelectFeatures functionality?<o:p></o:p></p>
</div>
<div>
<p> <o:p></o:p></p>
</div>
<div>
<p> <o:p></o:p></p>
</div>
<div>
<p> <o:p></o:p></p>
</div>
<div>
<p>Cheers,<o:p></o:p></p>
</div>
<div>
<p> <o:p></o:p></p>
</div>
<div>
<p> <o:p></o:p></p>
</div>
<div>
<p>Kori Maleski<o:p></o:p></p>
</div>
<div>
<p> <o:p></o:p></p>
</div>
<div>
<p> <o:p></o:p></p>
</div>
<div>
<p> <o:p></o:p></p>
</div>
<div>
<p> <o:p></o:p></p>
</div>
<div>
<p>$geometryFactory = new MgGeometryFactory();<br>
<br>
// create a coordinate<br>
$coordinate =
$geometryFactory->CreateCoordinateXY($x,$y);<br>
<br>
// create a point<br>
$point = $geometryFactory->CreatePoint($coordinate);<br>
<br>
$queryOptions = new MgFeatureQueryOptions();<br>
$queryOptions->SetSpatialFilter('Geometry',$point,MgFeatureSpatialOperations::Intersects);<br>
<br>
<br>
$layerResource = new MgResourceIdentifier($layerdefinition); <br>
$layer = new MgLayer($layerResource, $resourceService);<br>
<br>
<br>
$layerClassName = $layer->GetFeatureClassName();<br>
<br>
$layerFeatureId = $layer->GetFeatureSourceId(); <br>
$layerFeatureResource = new
MgResourceIdentifier($layerFeatureId); <br>
$layerId = $layer->GetObjectId(); <br>
<br>
$featureReader =
$featureService->SelectFeatures($layerFeatureResource,$layerClassName,$queryOptions);
<o:p></o:p></p>
</div>
<div>
<p> <o:p></o:p></p>
</div>
<div>
<p> <o:p></o:p></p>
</div>
<div>
<p> <o:p></o:p></p>
</div>
<div>
<p> <o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
</div>
<p class=MsoNormal style='margin-bottom:12.0pt'>_______________________________________________<br>
mapguide-users mailing list<br>
<a href="mailto:mapguide-users@lists.osgeo.org" target="_blank">mapguide-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapguide-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a><o:p></o:p></p>
</blockquote>
</div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
</body>
</html>