POST
|
Is it possible to make a New Query Layer which combines multiple feature classes usin the Union command? I can get it to bring all the attributes from the layer into a table, but when I add the SHAPE field to the query I get an error. Underlying DBMS error[ORA-01405: fetched column value is NULL] I am using ArcGIS10.2 on an Oracle SDE database. The schema for all five feature classes are the same.
... View more
09-29-2015
10:12 AM
|
0
|
1
|
2089
|
POST
|
I want to do this as well. I can get the attributes pulled into one table but I can't get the Shape field to come in correctly.
... View more
09-29-2015
10:09 AM
|
0
|
1
|
255
|
POST
|
I have found a work around. PYTHON saved the day again. Something like the following. # Import Modules import arcpy, os # Set Variables mxdpath = r'FULL PATH TO MXD FILE' # string outputfolder = 'FULL PATH TO OUTPUT FOLDER' # string namefield = 'THE FIELD CONTAINING THE NAME OF THE RESULTING PDF FILE' # string queryfield = 'THE FIELD CONTAINING THE VALUE FOR THE DESIRED QUERY' # string layers = ['LIST','OF','LAYERS'] # list mxd = arcpy.mapping.MapDocument(mxdpath) # Start Loop through Data Driven Pages for pageNum in range(1, mxd.dataDrivenPages.pageCount + 1) mxd.dataDrivenPages.currentPageID = pageNum # set the current page pageName = mxd.dataDrivenPages.pageRow.getValue(field) # get the pageName pageName += '.pdf' # add '.pdf' extension for file name pdf = os.path.join(outputfolder, pageName) # add pageName to output folder to get full output path # Start Loop through all layers of mxd file for lyr in arcpy.mapping.ListLayers(mxd) # for every layer in mxd's Layer List if lyr.name in layers: # if layer name in user input list above value = mxd.DataDrivenPages.pageRow.getValue(queryfield) # get the value out of the query field if lyr.defintionQuery == True: # if a defintionQuery Exsts... query = lyr.defintionQuery + "AND QueryField = \'%s\'" % (value) # Add the new to the old else: query = "QueryField = \'$s\'" % (value) # else create a new query lyr.defintionQuery = query # set the layers defintionQuery else: print 'Next' # else print next, this isn't necassary, but its a good place holder arcpy.mapping.ExportToPDF(mxd, pdf) # export the current Page to pdf del mxd, lyr, pageName, pageNum, query, value
... View more
07-25-2011
01:02 PM
|
0
|
0
|
519
|
POST
|
This works great if the data is stored in the same database. However, that is another hurdle I must overcome. The Map Layer is in an SDE database, that I do not have adequate privledges to alter the schema as I would need it, and the Pages Layer is in a File GDB. I really wish I could just write a definition query on a layer based upon a sub query from another layer. Map Layer: GLOBALID IN (SELECT GLOBALID FROM DDP_LAYER)
... View more
07-19-2011
11:50 AM
|
0
|
0
|
519
|
POST
|
Thanks again for your prompt reply. I will look into this and let you know of the outcome.
... View more
07-19-2011
11:29 AM
|
0
|
0
|
519
|
POST
|
Thank you for your promt reply. I tried your solution and came up bust. That would work under most normal circumsances. However, the problem is that when you join the two layers the each Global_ID actually has two PageName record associated with them, so there isn't a unique match that way.
... View more
07-19-2011
07:34 AM
|
0
|
0
|
519
|
POST
|
This seems to be limited to the field used for the PageName. Is there a way to Query a layer based off of a different field in the Data Driven Pages Layer? Is there a way to make the Page Definition Query look at Field 2 but the PageName be pulled from Field 1 in the Data Driven Pages (DDP) layer? Example: DDP Layer: Field 1 (PageName), Field 2 (Global ID) Map Layer: Field 1 (Map Reference), Field 2(Global ID)
... View more
07-19-2011
05:07 AM
|
0
|
0
|
519
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|