Allow SHAPE field to be used in Definition Query

832
6
12-21-2017 11:03 AM
Status: Open
Labels (1)
JamiePetersen
Occasional Contributor II

I would like to be able to use the SHAPE field of a feature class in the Definition Query dialog.

 

Example:

I have two layouts in ArcGIS Pro - one portrait and one landscape.  I want to apply a definition query to my data driven pages index that includes only shapes that are taller than they are wide and vice versa (SHAPE.extent.YMax - SHAPE.extent.Ymin > SHAPE.extent.XMax - SHAPE.extent.XMin).

Tags (2)
6 Comments
KoryKramer

Couldn't you do this by adding a YDIF field and calculating to !Shape.extent.Ymax! - !Shape.extent.Ymin! and an XDIF field calculated to !Shape.extent.Xmax! - !Shape.extent.Xmin! and run the def query on YDIF > XDIF?

ThomasColson

I voted this up...before checking...it seems like this capability exits?

KoryKramer

I don't think that is what japete02‌ is getting at.  That only exposes the non-SHAPE fields in the field picker.  So SHAPE_Area in your screenshot is an actual field, correct?  As would be SHAPE_Length.  They really want to get at the geometry field so they can pull the Xmax, Xmin, Ymax and Ymin coordinates and do some stuff.  I don't *think* that is possible.  But you can access those geometry properties in the field calculator through Python so with a little bit of pre-setup do what I proposed above.  Maybe that will work for the user? 

ThomasColson

The problem with the field calculator solution is that is a one-time, static operation. The idea behind a data driven map production is that maps, production schedules, extents, etc... can all be automated based on changes to the data. So if the OP has constantly changing data where map production is based on a query to the shape field, having to stop and do a field calculation slows things down/breaks the automation. Granted, this is an enhancement request, but a handy one. I use Shape(area) as an input to some of my production mapping scripts. 

JamiePetersen

This is still not possible. Like others mentioned, this is for automation of portrait and landscape map series layouts.  The index polygons change, so one week the map might be portrait, and the next landscape.  Not so say there aren't other methods to manually do this, but this was possible in ArcMap.

There are a lot of uses for shape definitions!

JamiePetersen