1

I have several hundred (potentially more) old MXD files which were made to show grass areas to be cut along city roads. The employee before me opted to do these one by one and rather than create actual data, used the ArcMap drawing tool to draw the shapes over ortho imagery in the ArcMap layout view.

I have a current request to provide this data on City-wide maps to management and am entirely baffled as to a solution being possible beyond having to manually redraw these and loading each file to do so.

How can I tackle this problem?

Vince
  • 20,017
  • 15
  • 45
  • 64
Chris Medyna
  • 307
  • 1
  • 2
  • 9
  • You can tackle this like any problem, by working to solve it. Unfortunately, you'll need to start with learning enough Python to understand the basic samples present in the documentation. Extracting graphics is among the least GIS-ish of tasks, and is least likely to have participated in Python conversion (not all of ArcObjects was exposed to Python). It's possible that you'll need to start this project over, correctly collecting geodata in a feature class for future use. – Vince May 09 '21 at 16:32
  • 1
    @Vince Unfortunately, a time crunch at present is preventing me from choosing this option. Thus is the joy of having management that is completely unfamiliar with GIS work. – Chris Medyna May 10 '21 at 11:15
  • Maybe it is worth hiring an ESRI consultant for this – BERA May 11 '21 at 07:19
  • https://gis.stackexchange.com/questions/162947/converting-map-coordinates-to-layout-coordinates-in-rotated-dataframe – FelixIP Jul 14 '21 at 19:53

1 Answers1

3

At the risk of causing offence your predecessor has shown a remarkable lack of understanding and dropped you Royally in it! You need to make sure your line manager fully understands the situation they have left you in.

If they had drawn the graphics in the map view (as opposed to layout view) you could right click on the data frame in the TOC and choose convert graphics to features and export them, so no need to redraw them, as shown below:

Convert Graphics to Features

But as you have indicated they have drawn them as graphics in the layout view, this means they are in page units, the 2 pink polygons are graphics in layout and you can see by their properties they are in cm.

Layout graphics

The GraphicElement class exposed by arcpy does not expose the geometry itself, so its easy to script to grab a hold of the graphics from layout but you cannot actually get to the polygon drawn by it. I suspect even if you could the units of the graphic are in page units so don't plot in any sensible location if you could store them away as polygons in a featureclass.

I've not tried it but using ArcObjects you can access the elements on a page layout through IGraphicsContainer and from that access the geometry, but you would need to work out how to transform the graphics to real world coordinates and that bit I'm unsure of and would undoubtedly require considerable coding.

I have no idea but have you tried importing the MXD into ArcGIS Pro, may be that exposes tools for saving out graphics as geometries with spatial coordinates in a featureclass?

Vince
  • 20,017
  • 15
  • 45
  • 64
Hornbydd
  • 43,380
  • 5
  • 41
  • 81