[mapguide-users] Polygons and Intersection Problem

Mark Pendergraft markp at Meadgilman.com
Thu Jan 15 12:08:39 EST 2009


Could you upload your SDF file with the 2 polygons?

-Mark P.

 

From: mapguide-users-bounces at lists.osgeo.org
[mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Kori
Maleski
Sent: Thursday, January 15, 2009 9:03 AM
To: MapGuide Users Mail List
Subject: [mapguide-users] Polygons and Intersection Problem

 

 

Hi All,

 

Intersection problem:

 

I have an application performs a query on a polygon layer with a point -
using intersection with the spatialfilter.

 

The problem is this:

 

The polygon originated from a shapefile - loaded as SDF via studio.

The single polygon feature originally was 2 distinct polygons dissolved
together via ArcMap.

 

The intersection works only on one of the polygons, and fails to return
a feature reader at all when within the other polygon.

 

This fails in both code execution and as a GeFeatureInfo WMS request in
the same manner.

 

Has anyone encountered this?

Has anyone worked around?

 

Is it better to explode the feature?  I require the geometery from each
part to do a highlight.

 

Is there an issue with how a shapefile multipolygon is converted to SDF?

Or is this an isse with the SelectFeatures functionality?

 

 

 

Cheers,

 

 

Kori Maleski

 

 

 

 

$geometryFactory = new MgGeometryFactory();
   
    // create a coordinate
    $coordinate = $geometryFactory->CreateCoordinateXY($x,$y);
   
    // create a point
    $point = $geometryFactory->CreatePoint($coordinate);
 
 $queryOptions = new MgFeatureQueryOptions();
 
$queryOptions->SetSpatialFilter('Geometry',$point,MgFeatureSpatialOperat
ions::Intersects);
 
 
 $layerResource = new MgResourceIdentifier($layerdefinition); 
 $layer = new MgLayer($layerResource, $resourceService);
 
 
 $layerClassName = $layer->GetFeatureClassName();
 
 $layerFeatureId = $layer->GetFeatureSourceId(); 
    $layerFeatureResource = new MgResourceIdentifier($layerFeatureId); 
    $layerId = $layer->GetObjectId(); 
 
 $featureReader =
$featureService->SelectFeatures($layerFeatureResource,$layerClassName,$q
ueryOptions); 

 

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20090115/460d4722/attachment.html


More information about the mapguide-users mailing list