2

I have a feature class with multiple overlapping polygons. It's a highways fc and contains underpasses, overpasses and at grade roads & intersections. The problem I have encountered is that the items are not returned in the order I desire. Is there a way to correct this? From what I've read, it is related to the object ids so the only solution I can see would be to write some python code to loop through each feature based on a 'level' attribute and write those with the smallest value (say -1) to a new fc first, followed by levels 0 and 1. I'm using ArcGIS 10.0

enter image description here

  • 2
  • This is not a duplicate! - I don't care about symbology - I want to know if I can change the physical order of the polylines and how would I do that. That previous question does not provide the answers I'm looking for. – wunderkind Jun 5 '16 at 3:53
  • How about this one? gis.stackexchange.com/questions/94781/… – PhilippNagel Jun 6 '16 at 13:11
  • When I draw features in a certain order, ArcGIS does not arbitrarily return those features every time I add the feature class to a new ArcGIS instance. It redraws them in the order I did - by object id. If the features are subsequently edited, their object ids change and therefore the order in which they are drawn. The question you quote suggests some random process which is not the case for file gdbs. – wunderkind Jun 7 '16 at 8:37
1

Instead of continuing in the comments, I will summarize here. I think your answer is twofold. For the first way of dealing with this, see @Maksim 's answer above. Symbol Level Drawing is the way to go if you want items to be ordered on the map in a certain way.

If you are looking to process data in a certain order, you will need to use an ORDER BY clause in your select statement, or some other way of ordering the data after you retrieve it from the DB.

To elaborate on your concern that the process is not arbitrary: You are right, arbitrary is not strictly correct. However, there are two things to keep in mind:

  1. The default order depends on the DB type you are using, and the underlying DBMS.
  2. All RDBMS have statements that allow you the order in which data are returned, and this is for a good reason. The DBMS inherently has no way of always returning data in the same way. See these answers for examples of MySQL and SQL Server

Another point I want to get across is that Object IDs do not change, that is their whole point. I just tried this (with File GDB) editing features does not change their OID. Splitting features will keep one feature with the original OID and create a new one with the next available. OID's are managed by the Geodatabase, in order to not allow you to ever create a duplicate OID.

There is a Sort tool available in ArcGIS, which allows you to reorder the records in the GDB, but it will not re-order them in the existing table, but rather create a new one. It is meant mostly for spatial sorting. This goes to show that you can't influence the order of records in an existing table, as they are managed by the DBMS. This tool simply creates a new table and inserts the records in the desired order.

6

Look into Symbol Level Drawing. From the accompanying screenshots, it looks to be the solution to your issue.

Accessible via the Advanced button, within the Symbology section of Layer Properties.

  • I want to be able to change the draw order within the fc - not using symbology levels. I'm not convinced the draw order is return randomly. I'm sure it has something to do this object ids. – wunderkind Jun 5 '16 at 3:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.