Closed shurst-ma closed 6 years ago
I have attempted to resolve the conflicts with this PR. In general I've done this in favour of the shurst_117752997
branch, expect for references to the newer MapImageExport
which I've maintained from the master
branch.
However I think we would need to carefully check the tab order on the Export Form before we merge this into master. Or @shurst-ma you may be able to identify how to resolve the conflicts and do the merge better that I can ;-)
@shurst-ma I previously mentioned that I was getting a Exception thrown when running this - message; "System.ArgumentException: An item with the same key has already been added." Whilst writing this error report I noticed where the problem was, so I've now fixed it.
However the bbox is still reported incorrectly for non-WGS1984, geographic CRSs. At present exporting MA_A3_landscape_DD_wgs184.mxd gives:
<xmax>88.61</xmax>
<xmin>79.65</xmin>
<ymax>30.77</ymax>
<ymin>26.02</ymin>
However exporting MA_A3_landscape_web_mercator.xml gives:
<xmax>9863314.95</xmax>
<xmin>8867299.96</xmin>
<ymax>3566516.33</ymax>
<ymin>3038628.39</ymin>
There are two similar methods:
MapAction.Utilities.getMapFrameWgs84BoundingBox()
MapAction.PageLayoutProperties.getDataframeProperties()
It looks like getMapFrameWgs84BoundingBox()
does the right thing by converting the bbox into WGS1984 DD. However getDataframeProperties()
adds in a couple of extra key values pairs - scale
and page_size
It is probably possible to combine these two to create a single method that produces the right output. It ought to be possible to wrap this with a unittest, which is called with each of the MXDs mentioned above. These two MXDs should have very similar bounds.
@shurst-ma I've resolved the conflict with the Jenkinsfile. You'll need to do the other two files. Both of them now include a lot of the changes to support DDPs, so you'll need to check you're not overwriting any of that. Any questions just ask.
Check to see if these changes are present in #152
… Convert active view to WGS84 if the spatial reference type is not Geographic or the datum was not WGS 1984