8

I know that in ArcGIS drawing order is controlled by layers, and if I want to make some features be drawn on top of other features I can use definition queries to separate them into different layers and position one on top of the other.

But I was wondering (mostly out of curiosity) what dictates the drawing order of the 1000 overlapping polygons in my feature class, and if there's a way that I can control what features are displayed on top within one layer?

Chris W
  • 15,720
  • 2
  • 29
  • 47
whatahitson
  • 1,896
  • 3
  • 23
  • 40
  • 2
    Feature draw order is out of the control of ArcGIS. It's entirely dependent on the return order of the storage format driver at the scale at which drawing occurs. You'd need to specify both format and scale (and probably the data) to get a specific answer. – Vince May 02 '14 at 11:02

1 Answers1

8

Normally, the features will be drawn in the order that they are returned from the database/file. This order is arbitrary and can change.

The only way that I know of to control the drawing order within a layer is to use symbol levels. With symbol levels, you can dictate the drawing order of individual symbol groups within a layer. You'll have to symbolize your layer either by categories or graduated symbols, but you could use the same style for everything if you want to.

More information on symbol levels: Working with symbol levels

Evil Genius
  • 6,289
  • 2
  • 27
  • 40
  • This works because each symbol is a separate query; within each symbol, you're back to arbitrary order. This is also slower (especially if there's no index on the symbolization column(s)). – Vince May 02 '14 at 15:44
  • Evil or @Vince, could either of you provide more information about return order specific to ArcGIS and file/personal geodatabases or shapefiles? My experience generally is last created = top drawn by default, but I know it can change (not sure arbitrary is the right word). All I can find is from What is Symbol Level Drawing, which says "features are drawn based on the table order—that is, the order that features are stored in the feature class table (or in the order that they are returned from the geodatabase)." – Chris W May 02 '14 at 16:03
  • 1
    @ChrisW It's really going to be specific to how the storage format works. Since shapefiles are flat files, it makes sense that features created later are going to be returned after those created previously. PGDBs are just Access databases, which are compound files, A.K.A. filesystem in a file, which means the table is stored in chucks, not necessarily in order within the file. Changing a record could change the ordering of those chunks, or it might not...it's up to the driver. – Evil Genius May 02 '14 at 16:08
  • 1
    The order that features are found in the spatial index also plays a role in draw order -- With databases, it really can be arbitrary without an ORDER BY (which hurts performance) – Vince May 02 '14 at 16:17
  • 1
    A small note on ORDER BY: The ordering must be done by ArcGIS (Source > Change query), and not for instance in a database view that ArcGIS collects the data from. – Anders Jul 20 '15 at 11:20
  • This does work but as mentioned above there is a performance hit which can be enormous depending on how many symbol classes you have. This is only suitable for cartographic applications but not for dynamic web feature services. – Jakub Sisak GeoGraphics Oct 09 '20 at 16:50
  • @JakubSisakGeoGraphics Haha, well when I wrote this answer over 6 years ago, using dynamic web feature services directly within desktop wasn't something I'd consider a common practice. Good to know, though! – Evil Genius Oct 10 '20 at 18:30
  • @EvilGenius - I am surprised there isn't a dedicated ESRI blog on symbology/web GIS/performance. We're are dealing with this more and more often. Being able to order symbology drawing without that extra penalty would be very nice. – Jakub Sisak GeoGraphics Oct 16 '20 at 16:06