# Select - Geometry: Search

The Search template appears in the template list when a geometry field of type geom, geommfd, or geomwkb, has been picked in the Select pane.   The template selects based on geometry values and characteristics.

 Search Select by making comparisons against the desired extraction from the geometry field specified in the Use parameter, using the given Condition,  compared to the given value or values,  which can be values from a field, a specified value, or the result of an expression that evaluates to a data type corresponding to the specified Use parameter.   Units of measure are the usual choice of Arc Minute, Arc Second, Degree, and Radian for angular units, and any of the very long list of linear units for linear or square units.   The combination of thirteen different Use options with seven different Condition options results in over 90 different Select operations.   Measurements can be auto for automatic use of geodetic measurements (over the surface of the ellipsoid) for coordinate systems using angular degrees and projected coordinate system (Euclidean) otherwise, or geodetic to force use of geodetic measurements always.   Use options:   area - Use the areal size of a polygonal area object in the specified square units of measure. bearing - Use the bearing direction from the first coordinate of the object to the last coordinate of the object in the specified angular units of measure. length - Use the length of the object in the specified units of measure. number of branches - Use the number of branches in the object. number of coordinates - Use the number or coordinates in the object. number of curves - Use the number of curvilinear segments in the object. type - Use the type of the object compared to values of area, line, or point, with condition options of equal or not equal. x max - Use the largest x coordinate value in the object. x min - Use the smallest x coordinate value in the object. y max - Use the largest y coordinate value in the object. y min - Use the smallest y coordinate value in the object. z max - Use the largest z coordinate value in the object. z min - Use the smallest z coordinate value in the object.     Condition options:   between - Select records with values between the At least and At most values, inclusive. equal (=) - Select records with values equal to the given value. greater (>) - Select records with values greater than the given value. greater or equal (>=) - Select records with values greater than or equal to the given value. less (<) - Select records with values less than the given value. less or equal (<=) - Select records with values less than or equal to the given value. not equal (<>) - Select records with values not equal to the given value.   If we would like to select records that are NOT variations of the above, for example not between, select on the basis of one of the above and press Ctrl-I or Edit - Select Inverse to invert the selection.   Selecting using between and then pressing Ctrl-I is the equivalent of "not between" the given values.   Launch the template by choosing a geometry field in the Select pane and then double-clicking the Search template.  When the template launches we can specify options. Search : area Use the areal size of a polygonal area object in the specified square units of measure. Search : bearing Use the bearing direction from the first coordinate of the object to the last coordinate of the object in the specified angular units of measure. Search : length Use the length of the object in the specified units of measure.   We begin with an example drawing that shows three areas, two lines and two points.  To get an impression of the scale, we measure the lower line, which is approximately 250 meters in length.     With the focus on the drawing window, in the Select pane we choose the Geom field and then we double-click the Search template to launch it.     In the Search template we choose length as the Use option.       For Condition, we choose less (<), and for the Value we enter 240.   The Measure box allows a choice of auto or geodetic to specify how the computation should be done.  The auto choice uses planar, that is, Euclidean, computations for all projections using linear units of measure and it uses geodetic computations for all projections, like Latitude / Longitude, that use angular units of measure where a planar computation would be a poor choice.   The geodetic choice always uses geodetic computations, which calculate area over the surface of the projection's ellipsoid using high precision Vincenty formulae.   For the Unit, we choose Meter. The  Unit pull down box has a very long list of units of measure we can use, all linear units regardless of whether the drawing is in a projection that uses angular or linear units as native units of measure.   For the Action, we use the default replace selection option.   Press Select.       Two objects, the line in the center of the display and the small area in the upper right of the display, are selected.   Opening the drawing's table, we can see why.     To create the illustration above we added a Length field using the Transform pane's Copy template, as shown in the Copy : length example.  That shows the length of each object in meters.   The only two objects that have a length less than 240 meters have been selected.   The "length" of the area object is the length of the boundary that defines the area. Search : number of branches Use the number of branches in the object. Search : number of coordinates Use the number or coordinates in the object. Search : number of curves Use the number of curvilinear segments in the object.  Points do not have curved segments, so only areas and lines can be selected.   We begin with an example drawing that shows three areas, two lines and two points.   One of the lines, the line in the center of the view, has a curvilinear segment.  No other object has any curvilinear segments.     With the focus on the drawing window, in the Select pane we choose the Geom field and then we double-click the Search template to launch it.     In the Search template, we choose number of curves as the Use option.   For Condition, we choose greater (>), and for the Value we enter 0.   For Action, we use the default replace selection.   Press Select.       The one object, the line in the center of the display, is selected, since that is the only object that has more than zero curvilinear segments in it.     The drawing's table also shows the selected record.   In the example above, we entered a literal number into the Value box.   We could have, however, chosen another field or written an SQL expression for the Value, as shown in the following example.   We begin with an example drawing that shows four lines.  All of the lines have curvilinear segments in them, with two of the lines having only curvilinear segments in them.    Suppose the lines represent roads or portions of pipelines that can have some curves, but not too many, in them.     We open the drawing's table.     The drawing's table has a field called Max Curves, which has a number for each object giving the maximum number of curves allowed for that object.    The object with a Max Curves value of 4 is the complicated, curvy object at the right of the display.  All of the other objects have Max Curves values of either 2 or 3.   To see which objects have more than the maximum number of curves allowed, we can use the number of curves transform.   With the focus on the Curves drawing (or, if we prefer, on the Curves Table), in the Select pane we choose the Geom field and then we double-click on the Search template to launch it.     In the Search template, we choose number of curves as the Use option.   For Condition, we choose greater (>), and for the Value we choose the Max Curves field from the pull down menu.   For Action, we use the default replace selection.   Press Select.       The template selects objects that contain more curved segments than the Max Curves number for that record.   At first glance, it may seem that the line in the lower left of the view has more than two or three curved segments, and should have been selected.     We can Alt-click that object to pick it for editing, so that coordinate handles appear at vertices of segments as well as at control points for curvilinear segments.   Doing so, we can see that the line consists of (from left to right) a straight line segment, followed by a spline segment, followed by another straight line segment, followed by a circle segment.   What appeared at first glance to be three curved segments at the left of the line instead resolve to be a single spline segment.     We can also confirm our visual assessment by using the Transform pane's Copy template for geometry, using the number of curves operation to add a field to the table, called Number of Curves, that reports the number of curvilinear segments in each object.   We can see that the line at lower left in the display, the first row in the table, has only two curves in it.   The selected object has five curves. Search : type Use the type of the object compared to values of area, line, or point, with condition options of equal or not equal.   We begin with an example drawing that shows three areas, two lines and two points.     With the focus on the drawing window, in the Select pane we choose the Geom field and then we double-click the Search template to launch it.     In the Search template, we choose type as the Use option.   For Condition, we choose equal (=), and for the Value we choose area.   For Action, we use the default replace selection.   Press Select.       Right away, the area objects are selected.     The drawing's table shows the same selection.   We could have run this Select pane operation with the focus either on the drawing or on the table.   With the focus on the table, we choose the Geom field, and double-click the Search template.     In the Search template, we choose type as the Use option.   For Condition, we choose equal (=), and for the Value we choose line.   For Action, we use the default replace selection.   Press Select.       Records with line objects in the Geom field are selected.       The same selection also appears in the drawing.   We re-run the transform again, with the focus still on the table window.     All the settings are remembered, so we simply change the Value to point and then press Select.     Records for point objects are selected in the table.     The same selection also appears in the drawing. Search : x max Use the largest x coordinate value in the object. Search : x min Use the smallest x coordinate value in the object. Search : y max Use the largest y coordinate value in the object. Search : y min Use the smallest y coordinate value in the object. Search : z max Use the largest z coordinate value in the object. Search : z min Use the smallest z coordinate value in the object.

Select - Geometry

Select - Geometry: Expression

Select - Geometry: Null

Select - Geometry: Spatial

Select Reference

Select - Expression