Riverscapes / RaveAddIn

RAVE AddIn for ArcGIS
http://rave.riverscapes.xyz/
GNU General Public License v3.0
1 stars 3 forks source link

Implement Definition Queries #172

Closed philipbaileynar closed 2 years ago

philipbaileynar commented 2 years ago

Once we have definition queries in business logic. Need to implement them in ArcRAVE to filter features.

Related Issues

philipbaileynar commented 2 years ago

@joewheaton, @lauren-herbine @shelbysawyer

You can test definition queries by adding a filter attribute to any GISNode in business logic. See the end of this line for an example:

<Node label="Peren Capacity" xpath="Geopackage/Layers/Vector[@id='BRAT_RESULTS']" type="line" symbology="oCC_EX" id="ex_capacity" filter="&quot;IsPeren&quot;=1"/>

The syntax you are shooting for is described here, but because XML uses quotes, you need to "escape" quotes in your query definitions. The word "escape" means to tell the software that's interpreting the string to ignore the character. The best way to do this is to use the term &quot; in place of double quotes, as shown in the example above. Single quotes do not need to be escaped.

I recommend developing your definition queries in either QGIS or ArcGIS using the query builder interface in either software. Both have a "verify" feature for testing your query strings. Then cut and paste into business logic, remembering to escape any double quotes.

NOTE THAT definition queries are not yet allowed in the official RiverscapesXML business logic. So you are currently limited to testing this locally. i.e. copy a business logic file into a riverscapes project folder and edit it there.