[mapguide-users] Problem with SelectFeature with CurvePolygon

Luiz Marcio Viana lmarcio at pars.com.br
Fri Dec 28 13:51:12 EST 2007


The exception says:

An exception occurred in FDO component.
Unsupported spatial operation

After that I checked the Capability of Autodesk Oracle provide and It 
doesn't have support for spatial operation "Within".
Now, I'm trying "Interserct" operation wich is supported by this provider.

Thanks,
Luiz Marcio

----- Original Message ----- 
From: "Luiz Marcio Viana" <lmarcio at pars.com.br>
To: <mapguide-users at lists.osgeo.org>
Sent: Friday, December 28, 2007 2:39 PM
Subject: [mapguide-users] Problem with SelectFeature with CurvePolygon


> Hi,
>
> I'm trying to make a spatial filter using a curve polygon formed by two
> semi-arcs (circular region).
>
> But when I execute the SelectFeature method I get the following exception
>
> - MgFeatureServiceHandler.ProcessOperation line 83 file 
> c:\build_bond_area\bond_nightly\build_41.3\ent\os\server\src\services\feature\FeatureServiceHandler.cpp
> - MgOpSelectFeatures.Execute line 112 file 
> c:\build_bond_area\bond_nightly\build_41.3\ent\os\server\src\services\feature\OpSelectFeatures.cpp
> - MgServerSelectFeatures.SelectFeatures line 243 file 
> c:\build_bond_area\bond_nightly\build_41.3\ent\os\server\src\services\feature\ServerSelectFeatures.cpp
>
> and I don't know if the problem is with the polygon, spatial operation or 
> comand execution.
>
> The query is executing over an Oracle feature source using the Autodesk 
> Oracle Provider (3.2.2).
> I'm send the piece of code wich is generating the exception, the exception 
> are occouring at SelectFeature function.
>
> If anyone has any idea about what's wrong here I'm accepting sugestions.
>
> MgGeometryFactory geomFactory = new MgGeometryFactory();
> MgCurveSegmentCollection segments = new MgCurveSegmentCollection();
>
> MgCoordinate start =
>  geomFactory.CreateCoordinateXY(xcenter - radius, ycenter);
> MgCoordinate control =
>  geomFactory.CreateCoordinateXY(xcenter, ycenter + radius);
> MgCoordinate end =
>  geomFactory.CreateCoordinateXY(xcenter + radius, ycenter);
> segments.Add(geomFactory.CreateArcSegment(start, end, control));
>
> start = geomFactory.CreateCoordinateXY(xcenter + radius, ycenter);
> control = geomFactory.CreateCoordinateXY(xcenter, ycenter - radius);
> end = geomFactory.CreateCoordinateXY(xcenter - radius, ycenter);
> segments.Add(geomFactory.CreateArcSegment(start, end, control));
>
> MgCurveRing exteriorCurveRing = geomFactory.CreateCurveRing(segments);
> MgCurveRingCollection curveRingCollection = new MgCurveRingCollection();
> MgGeometry geom =
>  geomFactory.CreateCurvePolygon(exteriorCurveRing, curveRingCollection);
>
> MgFeatureQueryOptions query = new MgFeatureQueryOptions();
> query.SetSpatialFilter("Geometry", geom, 
> MgFeatureSpatialOperations.Within);
>
> MgResourceIdentifier resId = new
> MgResourceIdentifier("Library://Samples/ORACLEDB.FeatureSource");
> MgFeatureReader featureReader =
>    featureService.SelectFeatures(resId, "My_Schema:My_ClassName", query);
>
> Thanks,
> Luiz Marcio
>
>
> _______________________________________________
> 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