View by status   

Reference grids/graticules should be accessible to ArcPy.Mapping

  • 340
    Points

  • I would like to be able to change the interval on a graticule (Data Frame Properties | Grids tab) using Python but there appears to be no access to that via the data frame properties.

    If it is not possible to open up the reference system (grid/graticule) properties to ArcPy, would it be possible to provde a way to make a grid/graticule not draw or remove it from the data frame properties programmatically instead?
    Tags :
     arcpy,python,graticule,interval,reference grid
    Posted by   graeme  to ArcGIS Desktop Apr 5, 2011

Share this idea Report Abuse

Comments (16)


Please log in to post a comment.






gfeperez 
Oct 21, 2014
Indispensável para automatização de mapas no padrão ABNT...
De acordo com o item 5.23.1 da NBR 13133/1994 o tamanho do grid (quadricula) tem que ser de 10cm na impressão... e para isto o tamanho do grid tem que ser 10% da escala...


 
yaron148 
Oct 6, 2014
I also need this option very much


 
cwhyte 
Jun 3, 2014
The one thing keeping us from completely automating a number of mapping tasks.


 
Start to think of moving to OSS - for example QGIS to start with.


 
samfranklinUK 
Jun 7, 2013

Surprised there's no arcpy support for this property.

Also, this would be useful to include an option for setting the min or max number of intervals for grid and graticule when you have a varying scale between pages in data driven pages.



 
samfranklinUK 
Jun 7, 2013

Surprised there's no arcpy support for this property.

Also, this would be useful to include an option for setting the min or max number of intervals for grid and graticule when you have a varying scale between pages in data driven pages.



 
cesarpiovanetti 
May 16, 2013
Por Favor!!


 
g3martin 
Apr 17, 2013
I need to convert my custom overlay grid to graphics and then make sure it does not conflict with other text elements along the neat line. 10.2?


 
Klindem 
Mar 6, 2013
This functionality is sorely needed.


 
juq 
Nov 14, 2012
I need this today! I have a plan map that has varies in scale from 1:15000 to 1:1000 plus a cross section that has scales from 1:7500 to 1:500 and different verical exaggerations.


 
corea 
Sep 28, 2012
This is essential functionality and I to don't understand why there aren't more votes for this functionality. See http://gis.stackexchange.com/questions/23472/dynamically-change-zoom-level-of-overview-map-to-fit-with-current-extent-in-ddp where there are workarounds but the ideal solution will be on the lines of what Graeme has added here.


 
robertwjones 
Sep 10, 2012
This would be useful.


 
ajh22 
Mar 21, 2012
This Functionality would be fantastic for Data Driven pages.


 
kwgis 
Feb 24, 2012
It also would be great to be able to define the graticule intervals for Data Driven Pages from fields in the index layer. Then you would be able to automatically change the grid intervals for each page, just as easily as you can currently change the scale.


 
lee.tily 
Dec 19, 2011
i really need this functionality


 
graeme 
Sep 15, 2011
I'm surprised that this Idea has not attracted more votes because it has been discussed in a couple of Forum threads:

http://forums.arcgis.com/threads/31851-multiple-measured-grids

http://forums.arcgis.com/threads/4066-How-to-change-the-grid-interval-proportionally-as-the-scale-of-the-map-changes?highlight=data+driven+pages+arcpy+graticule

To not be able to programmatically change the graticule/grid interval as maps are centred and scaled based on polygons of vastly different sizes would seem to limit wider adoption of Map Books (Data Driven Pages) based on desirable feature types like Countries, States, Local Goverment Areas, National Parks, Parcels, etc

The issue can only be worked around in quite a messy fashion - I do it by cloning MXDs and setting different intervals on the graticule of each so that once I have determined the extent of the feature which is the focus of the next on demand map (or map book page) I can choose the MXD with a suitable graticule interval to use to display it.

idealInterval4ThisScale = "30 Seconds"                                         # determined by preceding code
I would far rather use code something like:
mxd = arcpy.mapping.MapDocument(mapFile)
df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0]
refgrid = arcpy.mapping.ListReferenceGrids(df,"Graticule")[0]       # suggestion for future version
refgrid.interval = idealInterval4ThisScale                                         # suggestion for future version




 

 

Terms and Conditions   |    Feedback   |   FAQs
Previous MonthNext Month
SunMonTueWedThuFriSat