spine unity runtime simple basic use guide

2023-01-10   ES  

is used to return and modify the spatial relationship used by Filter.

ISPatialFilter is a QueryFilter containing space and attribute restrictions. Therefore, you can use SpatialFilter to limit the element set obtained from the element class. IsPatialFilter inherits the iQueryFilter interface, so you can specify a whereclause, the back of the back of the back, or the space reference of the space of the output graph.

Use Spatial Filter to perform space inquiries, and often uses it as parameters on similar methods on the similar method on iFeatureClass :: SEARCH, iFeatureClass :: SELECT or Feature Layers.

need Geometry, Geometryfield and Spatialrel attributes.

Geometry is the source graphics, and the execution space is selected according to the relationship with it. Geometryfield is the graphic field name, comparing the graphics with the source graphics. The SpatialREL attribute transmits an ESRISPatialrelenum to specify the space relationship.

Use ESriseArchorder to specify Searchorder. When the specified attribute query is specified, the attribute will be specified first to execute the query, which is only valid for the SDE data source.

SaptialRELELDEScript is a string that defines additional spatial relationships instead of the spatialrel attribute. In this case, the Spatialrel parameter must be set to ESRISPATIALRELATION.

Esrigeometry provides other ways to perform space query.


In addition to the members of IQueryFilter, they also increase their members


ispatialFilter.spatialRELDEScript attribute

This may describe the relationship between the query graphics and the returned graphics. There are 9 characters in this string, which can be ‘f’, ‘t’ t ‘or’*’; for example, TT*fft *** means containing.

SpatialRELELDESCRIPTION represents any possible spatial relationship between the two shapes.

ISpatialFilter Example


Note: Three ways to use iSpatialFilter Geometry, Geometryfield and Spatialrel.

public void ISpatialFilter_(IFeatureClass featureClass)


       //Create a point to use for the search;

       ESRI.ArcGIS.Geometry.IPoint point=new ESRI.ArcGIS.Geometry.PointClass();


       //Getting a reference;

       ISpatialFilter spatialFilter=new SpatialFilterClass();

       //Setting the Geometry,GeometryField and SpatialRel parameters;




       //Execute the spatiafilter;

       IFeatureCursor featureCursor=featureClass.Search(spatialFilter,false);



Space filter spatial relationship type Description (A is to query graphics, b is the filter condition graphics)
esriSpatialRelIntersects A intersection with B graphics
esriSpatialRelEnvelopeIntersects A’s envelope intersects with the envelope of B
esriSpatialRelIndexIntersects A and B index intersect
esriSpatialRelTouches A connected with B boundary
esriSpatialRelOverlaps A and B are superimposed
esriSpatialRelCrosses A intersection with B (two lines intersect one point, one line intersects with one side)
esriSpatialRelWithin A in B
esriSpatialRelContains A contains B
esriSpatialRelRelation A and B space association

Space relationship description:
1, ESRISPatialRELTOUCHES (adjacent)
Application range:
Except the relationship between points and points, other elements can have this relationship.
If the two elements have the same boundary, and they do not intersect, the relationship between the two elements is the relationship of adjacent

2, ESRispatialRelcrosses (Cross)
Application range:
line and surface, line and line, etc. It cannot be used for faces and face (face and face intersecting parts,), and cannot be used for faces and points (the dimension difference between the two elements 2) and the point and line.
If the intersection part of the two elements is not empty, and the dimension of the shape of the intersecting part is lower than the highest dimension of the two elements (that is, the line crossing is the line, and the line is intersection) Cross -relationship,

3, ESRISPATIALOLOVERLAPS (overlap relationship)
Application range:
line and line, between the face and the surface, the other do not have the relationship. (As long as there is a overlapping part, if the overlapping part is exactly the same as a certain element, it cannot be called the overlap relationship)
The intersecting part of the two elements of the same dimension has the same dimensions of the same dimensions as these two elements, and is not exactly the same as any element, which is said to overlap these two elements.
      4, ESRISPatialrelwithin (containing)
Application range:
All element classes have this relationship.
This relationship is a factor (known) completely located in the interior of another factor (to be queried), and they are relative relationships. If the element of the query is completely within the element of the query (that is, the value of Spatialrel is ESRISPATIALRLWITHIN), then the element of the query is returned


Application range:
All element classes have this relationship.
This relationship is a factor that completely includes another element, and they are relative relationships. If the elements of the query are completely queried, the elements include time (that is, the value of Spatialrel is ESRISPatialRelContains), and the element of query is returned.
Intersection relationship is a broad relationship, including the above four relationships. Therefore, if the value of the Spatialrel is the relationship between ESRISPatialRelintersects, as long as the query element and the query element meet any spatial relationship between the above four spatial relationships, you can return to the query element.
Application range:
All element classes have this relationship.
This relationship is the case of the range of the 2 element.


Related Posts

date and time type

Cloud computing general learning

Black Horse Programmer —— [Java Basic Article] Language Basics — Keywords, identifiers, annotations, constants and variables and operators

MCF52259 ADC module configuration

spine unity runtime simple basic use guide

Random Posts

Write a program in C language to find a 1! +2! +3! +4! … (two methods)

python module offline installation & pip for use

Unity with (6) Use Camera.setReplacementShader to achieve a simple scene killing effect

HDU 1301 (PRIM+Strings)

Eclipse CDT Introduce the C/C ++ project built by Makefile