[fdo-users] Spatial operations

popovictamara popovictamara91 at hotmail.com
Thu Dec 20 03:03:22 PST 2018


Sorry for my delayed replay.

This is a part of the code where I need to examine spatial position of my
geometry:
…
           while (reader.ReadNext())
                            {
                                string guidCheck = reader.GetString("GUID");
                                if (!guids.Contains(guidCheck))
                                {
                                    //1. check for spatial condition
                                    var geometryByte =
reader.GetGeometry("Geometry");
                                    var geometryFeature =
geomFactory.CreateGeometryFromFgf(geometryByte);
                                    bool spatialMet = false;
                                   
                                    
                                    if (spatialCondition ==
ProjectManager.SpatialCondition.Inside)
                                    {
                                        
                                        spatialMet =
SpatialUtility.Evaluate(geometryFeature,
SpatialOperations.SpatialOperations_Inside, conditionGeometry);
                                    }
                                    else
                                    {
                                        spatialMet =
SpatialUtility.Evaluate(geometryFeature,
SpatialOperations.SpatialOperations_Intersects, conditionGeometry);
                                    }
                                    }
}

Here is the example of what I need: 
I have Municipality boundary and I need to return all of the Cadastral Units
within that Municipality using spatial condition. But I can't figure out how
to achive this.




--
Sent from: http://osgeo-org.1560.x6.nabble.com/FDO-Users-f3898664.html


More information about the fdo-users mailing list