I've set up data driven pages to create a series of maps, but I'm running into a problem which seems like it would be quite common!
I've made some tables (as graphics) using ArcPy and the technique described an Answer to another Question: Adding Table to Layout View using ArcPy?.
However, with a series of maps, sometimes these graphics will cover my points layer.
Does anybody know how to (at least) flag when a point is hidden by my tables?
-
Does your layout have room outside the map window so you could put your table there?Fezter– Fezter2014年06月17日 01:02:13 +00:00Commented Jun 17, 2014 at 1:02
-
@Fezter I want to put the tables on top of the map.user3697700– user36977002014年06月17日 02:06:30 +00:00Commented Jun 17, 2014 at 2:06
-
@PolyGeo Yes, your answer is the technique I've used. I'm using ArcGIS10.1user3697700– user36977002014年06月17日 02:11:33 +00:00Commented Jun 17, 2014 at 2:11
1 Answer 1
The way I would approach this is:
- Get the corners of your table graphic in page units (perhaps call them tXmin,tYmin,tXmax,tYmax) - you should be able to get these from your script that adds your table as a graphic either straightaway or with a slight enhancement to it.
- Get the locations of any point features that you want to avoid in map units - perhaps use arcpy.da.SearchCursor to do this
- Use the technique from another Q&A (Convert point XY to page units XY using arcpy?) to convert these points in map units to page units.
- Test each point in page units to see whether it is within the corners of your table graphic rectangle (tXmin,tYmin,tXmax,tYmax)
-
@user3697700 Excellent! Be sure to upvote the asker and answerer of gis.stackexchange.com/questions/21514/… if you found that code useful2014年06月17日 05:01:12 +00:00Commented Jun 17, 2014 at 5:01
-
I will do when I get 15 reputation!!user3697700– user36977002014年06月17日 05:30:27 +00:00Commented Jun 17, 2014 at 5:30
Explore related questions
See similar questions with these tags.