Ask A Cartographer

How does ArcGIS determine the order it draws features in one shapefile?

September 04 2007 | 0 comments
Categories: ArcGIS Methods, Symbology

I have a shapefile of polygons. There are several large polygons covering up smaller polygons.
Is there a way to change the order in which the polygons are draw within a layer so that the
smaller polygons show on top?

How does ArcGIS determine the order it draws features in one shapefile?

Is there an easy way to get ArcGIS to reorder the table, so the small polygons draw on
top of large polygons?

Mapping Center Answer:

First, drawing order depends on the DBMS your features are stored in. Most industrial strength DBMSs, like Oracle or SQL Server adhere to random access, so when ArcMap asks for some features to draw, a query is run and the features returned in a cursor in a random order. dBase tables, which are the basis for Shapefiles draw in the record order of storage.

It is possible to use Symbol Level drawing to effect control over drawing order, however, if you need refined control, the result will be a layer with a symbol for every feature, which is hardly user friendly, and doesn’t allow for any kind symbology beyond single symbol (accomplished using unique values on your area field).

It is also possible to create a Python script that writes a new shapefile by:

Reading records from the old shapefile, sorting the OIDs based on Shape area.
Then for each OID in the sorted OID list, query the original data and select that record and write it to the new shapefile.

That would do what you want and allow you to symbolize the data; I checked on ArcScripts and did not find such a script already out there.

If you would like to post a comment, please login.

Contact Us | Legal | Privacy |