<div>Thanks Mark,</div>
<div>&nbsp;</div>
<div>That clarifies what I am seeing.&nbsp; </div>
<div>&nbsp;</div>
<div>GetGeometryType() only yields MgPolygon instead of MgMultiPolygon, so it is the conversion to SDF where the Shapefile geometry is lost/changed.</div>
<div>&nbsp;</div>
<div>The Repair Geometry in ArcMap was already completed and does not affect nor remedy the issue.</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>To workaround the issue (in SDF format):</div>
<div>&nbsp;</div>
<div>I have to explode the Polygon into 2 Pieces.</div>
<div>Then I have to do a spatial filter to retrieve the common ID.</div>
<div>Then requery to get both of the desired geometries.</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>I will test my application to see if utilizing the shape file without converting behaves properly with my code and the WMS.</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>Cheers and thanks,</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>Kori Maleski</div>
<div>&nbsp;</div>
<div><br><br>&nbsp;</div>
<div class="gmail_quote">On Thu, Jan 15, 2009 at 11:35 AM, Mark Pendergraft <span dir="ltr">&lt;<a href="mailto:markp@meadgilman.com">markp@meadgilman.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div lang="EN-US" vlink="purple" link="blue">
<div>
<p><span style="FONT-SIZE: 11pt; COLOR: #1f497d">I queried the feature programmatically (as a SDF) and tried to assign it to a mgMultiPolygon and it didn't fly.&nbsp; It did work as a mgPolygon though.</span></p>
<p><span style="FONT-SIZE: 11pt; COLOR: #1f497d">So, the problem seems to be that the geometry is being stored as a polygon instead of a multipolygon.&nbsp; I have features in my map that aren't connected and I'm able to select them with no problem, but they are multipolygons.&nbsp; This must have something to do with the conversion process in ArcMap or in MapGuide Studio. &nbsp;I don't have ArcMap so I can't comment on what is going on in that arena.&nbsp; Your guess is as good as mine on whether this is an ArcMap issue or a MapGuide Studio issue.</span></p>

<p><span style="FONT-SIZE: 11pt; COLOR: #1f497d">&nbsp;</span></p>
<p><span style="FONT-SIZE: 11pt; 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.&nbsp; So perhaps the solution is to just use the SHP file in your map instead of converting it to SDF.</span></p>

<p><span style="FONT-SIZE: 11pt; COLOR: #1f497d">&nbsp;</span></p>
<p><span style="FONT-SIZE: 11pt; COLOR: #1f497d">Hope that helps</span></p>
<p><span style="FONT-SIZE: 11pt; COLOR: #1f497d">-Mark Pendergraft</span></p>
<p><span style="FONT-SIZE: 11pt; COLOR: #1f497d">&nbsp;</span></p>
<div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; BORDER-LEFT: medium none; PADDING-TOP: 3pt; BORDER-BOTTOM: medium none">
<p><b><span style="FONT-SIZE: 10pt">From:</span></b><span style="FONT-SIZE: 10pt"> <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:41 AM 
<div class="Ih2E3d"><br><b>To:</b> MapGuide Users Mail List<br></div><b>Subject:</b> Re: [mapguide-users] Polygons and Intersection Problem</span> 
<p></p></p></div>
<div>
<div></div>
<div class="Wj3C7c">
<p>&nbsp;</p>
<div>
<p>In the studio preview, it fails as well.</p></div>
<div>
<p>&nbsp;</p></div>
<div>
<p>Using the select tool, clicking on one polygon will highlight/select the entirety, while clicking on the other will yield no highlight/select.</p></div>
<div>
<p>&nbsp;</p></div>
<div>
<p>&nbsp;</p></div>
<div>
<p>Cheers,</p></div>
<div>
<p>&nbsp;</p></div>
<div>
<p>Kori Maleski</p></div>
<div>
<p>&nbsp;</p></div>
<div>
<p><br><br>&nbsp;</p></div>
<div>
<p>On Thu, Jan 15, 2009 at 10:16 AM, Kori Maleski &lt;<a href="mailto:kori.maleski@gmail.com" target="_blank">kori.maleski@gmail.com</a>&gt; wrote:</p>
<div>
<p>Mark,</p></div>
<div>
<p>&nbsp;</p></div>
<div>
<p>I have attached a shapefile with one of the polygons in question.&nbsp; The spatialfilter fails on any dissolve multipolygon like this one.</p></div>
<div>
<p>&nbsp;</p></div>
<div>
<p>Again, I converted it to sdf via a load procedure.</p></div>
<div>
<p>&nbsp;</p></div>
<div>
<p>&nbsp;</p></div>
<div>
<p>Cheers,</p></div>
<div>
<p>Kori Maleski</p></div>
<div>
<p>&nbsp;</p></div>
<div>
<p><br>&nbsp;</p></div>
<div>
<div>
<div>
<p>On Thu, Jan 15, 2009 at 10:08 AM, Mark Pendergraft &lt;<a href="mailto:markp@meadgilman.com" target="_blank">markp@meadgilman.com</a>&gt; wrote:</p></div></div>
<blockquote style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 6pt; PADDING-BOTTOM: 0in; MARGIN-LEFT: 4.8pt; BORDER-LEFT: #cccccc 1pt solid; MARGIN-RIGHT: 0in; PADDING-TOP: 0in; BORDER-BOTTOM: medium none">

<div>
<div>
<div>
<div>
<p><span style="FONT-SIZE: 11pt; COLOR: #1f497d">Could you upload your SDF file with the 2 polygons?</span></p>
<p><span style="FONT-SIZE: 11pt; COLOR: #1f497d">-Mark P.</span></p>
<p><span style="FONT-SIZE: 11pt; COLOR: #1f497d">&nbsp;</span></p>
<div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; BORDER-LEFT: medium none; PADDING-TOP: 3pt; BORDER-BOTTOM: medium none">
<p><b><span style="FONT-SIZE: 10pt">From:</span></b><span style="FONT-SIZE: 10pt"> <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></p></div>
<div>
<div>
<p>&nbsp;</p>
<div>
<p>&nbsp;</p></div>
<div>
<p>Hi All,</p></div>
<div>
<p>&nbsp;</p></div>
<div>
<p>Intersection problem:</p></div>
<div>
<p>&nbsp;</p></div>
<div>
<p>I have an application performs a query on a polygon layer with a point - using intersection with the spatialfilter.</p></div>
<div>
<p>&nbsp;</p></div>
<div>
<p>The problem is&nbsp;this:</p></div>
<div>
<p>&nbsp;</p></div>
<div>
<p>The polygon originated from a shapefile - loaded as SDF via studio.</p></div>
<div>
<p>The single polygon feature originally was 2 distinct polygons dissolved together via ArcMap.</p></div>
<div>
<p>&nbsp;</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.</p></div>
<div>
<p>&nbsp;</p></div>
<div>
<p>This fails in both code execution and as a GeFeatureInfo WMS request in the same manner.</p></div>
<div>
<p>&nbsp;</p></div>
<div>
<p>Has anyone encountered this?</p></div>
<div>
<p>Has anyone worked around?</p></div>
<div>
<p>&nbsp;</p></div>
<div>
<p>Is it better to explode the feature?&nbsp; I require the geometery from each part to do a highlight.</p></div>
<div>
<p>&nbsp;</p></div>
<div>
<p>Is there an issue with how a shapefile multipolygon is converted to SDF?</p></div>
<div>
<p>Or is this an isse with the SelectFeatures functionality?</p></div>
<div>
<p>&nbsp;</p></div>
<div>
<p>&nbsp;</p></div>
<div>
<p>&nbsp;</p></div>
<div>
<p>Cheers,</p></div>
<div>
<p>&nbsp;</p></div>
<div>
<p>&nbsp;</p></div>
<div>
<p>Kori Maleski</p></div>
<div>
<p>&nbsp;</p></div>
<div>
<p>&nbsp;</p></div>
<div>
<p>&nbsp;</p></div>
<div>
<p>&nbsp;</p></div>
<div>
<p>$geometryFactory = new MgGeometryFactory();<br>&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; // create a coordinate<br>&nbsp;&nbsp;&nbsp; $coordinate = $geometryFactory-&gt;CreateCoordinateXY($x,$y);<br>&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; // create a point<br>&nbsp;&nbsp;&nbsp; $point = $geometryFactory-&gt;CreatePoint($coordinate);<br>
&nbsp;<br>&nbsp;$queryOptions = new MgFeatureQueryOptions();<br>&nbsp;$queryOptions-&gt;SetSpatialFilter(&#39;Geometry&#39;,$point,MgFeatureSpatialOperations::Intersects);<br>&nbsp;<br>&nbsp;<br>&nbsp;$layerResource = new MgResourceIdentifier($layerdefinition); <br>
&nbsp;$layer = new MgLayer($layerResource, $resourceService);<br>&nbsp;<br>&nbsp;<br>&nbsp;$layerClassName = $layer-&gt;GetFeatureClassName();<br>&nbsp;<br>&nbsp;$layerFeatureId = $layer-&gt;GetFeatureSourceId(); <br>&nbsp;&nbsp;&nbsp; $layerFeatureResource = new MgResourceIdentifier($layerFeatureId); <br>
&nbsp;&nbsp;&nbsp; $layerId = $layer-&gt;GetObjectId(); <br>&nbsp;<br>&nbsp;$featureReader = $featureService-&gt;SelectFeatures($layerFeatureResource,$layerClassName,$queryOptions); </p></div>
<div>
<p>&nbsp;</p></div>
<div>
<p>&nbsp;</p></div>
<div>
<p>&nbsp;</p></div>
<div>
<p>&nbsp;</p></div></div></div></div></div>
<p>&nbsp;</p></div></div>
<p style="MARGIN-BOTTOM: 12pt">_______________________________________________<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></p>
</blockquote></div>
<p>&nbsp;</p></div>
<p>&nbsp;</p></div></div></div></div><br>_______________________________________________<br>mapguide-users mailing list<br><a href="mailto:mapguide-users@lists.osgeo.org">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><br>
<br></blockquote></div><br>