Open Justin-Q opened 4 years ago
There are three issues you raised, I think all can be fixed quickly. The final line of the script is below, you need to change a couple arguments in it in order to fix the issues
createMapFromMXD_loop(mxd,
outputImage,
focal_layer,
feature_name,
labelFields,
totalEA=3, #Set this number to be very high (3000) in order to process everything
saveMap=False) #Set this to True in order to save a mxd of each EA
Corrections noted, we will try it and check out the results as soon as possible.
On Wed, Dec 4, 2019 at 3:23 PM Benjamin P. Stewart notifications@github.com wrote:
There are three issues you raised, I think all can be fixed quickly. The final line of the script is below, you need to change a couple arguments in it in order to fix the issues
createMapFromMXD_loop(mxd, outputImage, focal_layer, feature_name, labelFields, totalEA=3, #Set this number to be very high (3000) in order to process everything saveMap=False) #Set this to True in order to save a mxd of each EA
- Not all EAs were processed: set the totalEA = 3000
- Need to save a map each time: set saveMap = True
- Process only the type 2 EAs: this is a little more complicated. I think the easiest way would be to create a new shapefile of the Type 2 EAs using the Geoprocessing Select Analysis tool. Use that new layer as the input layer
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/worldbank/GSS_Census_Tools/issues/3?email_source=notifications&email_token=ANYXTGFKDZJZWERM4EMWSSTQW7DORA5CNFSM4JUZDIQ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEF5MGSY#issuecomment-561693515, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANYXTGGGTEQ5Z6TJNGR7EMLQW7DORANCNFSM4JUZDIQQ .
The code we modified worked halfway for the sampled districts we tried it on, it did not complete the whole set of EA's in the district. Also, it did not give any errors or reasons for the uncompletion However, we decided to automate only type two maps. and to work on type threes maps manually. We would be glad if you could modify the code to produce just type two maps and to make map documents which is very important to us for corrections sake.
Find the cde we implemented below. ''' class mappingDistrict(object): """ DEBUGGINGE districtFolder = r'C:\Users\WB411133\OneDrive - WBG\AAA_BPS\GOST\Projects\Ghana_Census_Support\Data\GSS_Data\EDITED_DISTRICTS\2020 GUSHIEGU\TYPE 2' t2Map = r'C:\Users\WB411133\OneDrive - WBG\AAA_BPS\GOST\Projects\Ghana_Census_Support\Data\GSS_Data\t2Map.mxd' t3Map = r'C:\Users\WB411133\OneDrive - WBG\AAA_BPS\GOST\Projects\Ghana_Census_Support\Data\GSS_Data\t3Map.mxd' saMap = r'C:\Users\WB411133\OneDrive - WBG\AAA_BPS\GOST\Projects\Ghana_Census_Support\Data\GSS_Data\saMap.mxd' """ def init (self, districtFolder, t2Map, t3Map, saMap): """ Generate properly formatted mapping
'''