Group Definition Query

539
9
04-27-2012 06:00 PM
Status: Open
Labels (1)
AlexZhuk
Regular Contributor

Imagine you have similar groups of layers, where Group First is for Summer, and Group Second is for Winter. Now you have to enter "PERIOD" = 'Summer/Winter' in every layer. Can a group definition query be implemented in such a case? So you enter Summer only once, and Winter only once too.

0EM30000000D0mC

9 Comments
DuncanHornby
Good idea but you've simplified the problem. A group layer can have ANY type of layer or very similar layers with different attributes. So how do you define a definition at the group layer when you have more than 1 layer in it with differing combinations of fields and field types?

I like the idea of apply a definition query for all layers in the group layer but I can't see how you would implement it when one can add or drag 'n' drop layers into it which can have a very different set of fields.
ChrisMathers
A pretty simple script tool could be written which would take a feature class and a list of definition queries and turn that into a group layer. For each DQ the layer would be added to the map again with that query and then moved to the group layer.
AlexZhuk
Hornbydd, I thought of this (very real) possibility too. Of course, the group DQ can only work in case where  the same DQ can be safely applied all internal layers, otherwise it should skip the "wrong" layers.
RobertBorchert

I would like to see a group definition query available.

Meaning:  If you have 2 or more features in a group, you can create a definition query that will effect all the features in that group. Provided they all have the same Attribute from which to define.

Example.  I work in Electric GIS for Distribution and Transmission.  Every feature attached to a given substation if populated with Substation and Feeder.   Some times it would be very handy to write a defintion query in a group  [SubstationName} = 'Sub1' and [FeederNum] = 4

Write the Defintion Query 1 time.  In that groupl are Primary OH, UG, Secondary OH, UG, servcie points, transfomers, sectionalizing devices etc...Some 10 to 15 total features. The way it is now we have to define each feature individually.

IngmarAlbinson

Note that you can build a query without using ArcGIS tools. Example för a Microsoft sde geodatabase:

SubstationName IN ('Sub1', 'Sub7', 'Sub8') AND FeederNum IN (1, 4, 8, 9)

 

 

RobertBorchert
Where do you do that?
IngmarAlbinson

ArcGIS Query Builder does not support all SQL statements that are allowed therefor you have to write it yourself.

 

0EME0000000HanU

AllisonErickson

Adding Queries on a grouplayer would be great functionality to add to #arcgispro!  There are two ways that I could see it being done.  First as an easy way to turn layers On/Off (despite their attributes) and second as a way to link and query features that have similar fields (ie. same domains, primary/foreign keys). Overall a functionality like this would make using mapseries very powerful!!! For example...

Say you used cad drawings and #annotation classes that are specific to each floor in a building. If you were able to place these drawings under a Group Layer, add a pagequery to the Group Layer, and then implement a Map Series - the Map Series would be able to easily toggle On/Off the different Group Layers/drawings based on those queries.

Another example...

Say you have some standard landscaping site plans your organization uses to collaborate planting efforts throughout the year as the season change. In addition to having CAD drawings for these site plans you also have a plant datasets you like to use to help your team understand which plants are planted where. As long as all these datasets use the same SEASON field (Spring, Summer, Fall, Winter) it would be awesome if you could place them under a Group Layer that would allow you to field match/map these layers so a single Page Query could be applied the the entire group (or maybe just the things that are field mapped) so you can generate a Map Series that can easily filter out which plant datasets to display.

Adding this functionality would allow us to set up one map (with a few Page Queries) that can be used in a number of different Layouts (ie. Portrait, Landscape, different sizes, etc.) in which a Map Series can generate layouts for each building (or landscaping site) and all that needs to be adjusted are a few, easy queries each time you need to generate a new Map Book!

JoeyDaniel

I wish you could select features with the select tool in the map and automatically assign them to a definition query.