|
POST
|
I don't use DDP at all, so I feel like I'm working with one hand behind my back here. Your parameters for the export to pdf seem odd, the first parameter should be the outpdf name, yet you have a .mxd as the first parameter. Also, I would make sure you are using more parameters, namely you can select the page range and and page range. If you do not change the export parameters, it exports all page each time, not the single page.
... View more
06-08-2015
11:39 AM
|
1
|
4
|
4192
|
|
POST
|
Also, please don't double post, you can use the share function to share a single post in more than one area. Share a post with a group
... View more
06-08-2015
10:14 AM
|
1
|
1
|
4192
|
|
POST
|
have you tried deleting your cursor and rows after it set your text element in the loop? If the cursor isn't deleted, it could be using the same cursor each time instead of creating a new one maybe? Also, out of curiousity why are you using the old cursors(arcpy.SearchCursor) instead of the new one arcpy.da.SearchCursor, the new ones are significantly faster.
... View more
06-08-2015
10:10 AM
|
1
|
7
|
4192
|
|
POST
|
Hi Ryan, def listRasters(rasterTypes = "ALL"):
"""Generate a list of rasters found within a workspace."""
# keep a list of all files for all types
foundFiles = []
if rasterTypes == "ALL":
# just gather all file types
foundFiles = arcpy.ListRasters("*", rasterTypes)
else:
# arcpy will not let us specify multiple file types to search for, so
# we replicate that ability by appending the file lists for each
# specified file type.
fileTypes = rasterTypes.split(';')
for fileType in fileTypes:
foundFiles.extend(arcpy.ListRasters("*", fileType))
# return all discovered files
return foundFiles The file type is specified fairly early on, in line 1 of the code I posted, which is close to the beginning of the code you pasted in. Currently it is set to all, but it can be changed to many file types see this help. For help posting code blocks with formatting in the future see this help, Posting Code blocks in the new GeoNet Probably the easier thing to do is modify the variable foundfiles, which is a list with the file name of each raster that will be analyzed. A simple for loop checking for the extensions you are wanting to remove and taking them out of the list should fix your problem before that function closes would do the trick.
... View more
06-05-2015
10:56 AM
|
1
|
0
|
1434
|
|
POST
|
You can publish from a 10.2.2 Desktop but not administer I believe. Compatibility of ArcGIS 10.3.1 for Server with earlier versions—Documentation (10.3 and 10.3.1) | ArcGIS for Server
... View more
06-03-2015
03:48 PM
|
3
|
0
|
933
|
|
POST
|
The workspace variable is the root directory you want it to search for spatial data. So if you set it to "C:/" it would check all folders and subfolders in the C drive for spatial data and write it to a report. If you have a particular folder within a drive say "D:/ForestryData" that has folders and subfolders to be checked and used that as the workspace it would check all folders and subfolders of "D:/ForestryData" for data. I'm not sure if you can point it at a database connection or not.
... View more
06-03-2015
02:49 PM
|
0
|
2
|
1648
|
|
POST
|
Nesting cursors is generally accepted be a very slow way to manage and manipulate data between two sources. Two can be fairly slow, so 3 nested would be even worse. Richard Fairhurst has made some good blog posts for using dictionaries with cursors to speed up processes such as your. This is the original thread he addressed it in Updating the rows in one table based on values in another table or using nested cursors and his blog post regarding using dictionaries and cursors can be found Turbo Charging Data Manipulation with Python Cursors and Dictionaries. I didn't dig into your code too much, but I've noticed many times where people have mentioned nested cursors being rather slow and that if you are taking days to process the data, there must be a better way. Perhaps Richard will have some suggestions for you.
... View more
06-03-2015
01:55 PM
|
3
|
30
|
9276
|
|
POST
|
.las files can be brought in directly to ArcGIS if you have the LP 360 extension and they are added to the map through the LP 360 Toolbar. Otherwise as Xander said you have to add them to a Las Dataset before adding the Las Dataset to a map document.
... View more
06-03-2015
06:49 AM
|
0
|
0
|
1278
|
|
POST
|
I'm not sure arcpy does not have a functionality to embed images into map documents from what I've seen. It may be possible with ArcObjects, but the current arcpy methods and functions do not allow for that. Likewise, if you have a picture element that is saved as part of the document, it no longer has a name with ListLayoutElements and its source is unable to be changed. Apparently this issue came up on the old forums, but was never adequately addressed by anyone. Sources checked: Paul Zandbergen Python Scripting for ArcGIS ArcGIS Help -arcpy mapping module - Picture Elements Methods General Web Search GIS Stack Exchange
... View more
06-02-2015
12:42 PM
|
1
|
1
|
2546
|
|
POST
|
That is a workflow that I have had to set up as well. Have a few maps templates, have to loop through each record in a polygon feature class, zoom to the feature, use attribute data to control text elements on my map, then export out to chosen output type on each template.
... View more
05-29-2015
03:28 PM
|
1
|
0
|
1934
|
|
POST
|
arcpy.SelectLayerByAttribute_management(Layer, "CLEAR_SELECTION") arcpy.RefreshActiveView()
... View more
05-29-2015
03:21 PM
|
2
|
0
|
1934
|
|
POST
|
Have you tried not simplifying the polygons when converting from raster to polygon(No_Similify)? You would have a more complex geometry, but as long as you are viewing at the same scale as the raster, it should look near identical to your existing raster. Once you zoomed it would look more jagged of course, but at a farther out scale, it would work. You said your original raster looked like realistic management zones, so that might work for you. If you wanted more organic looking polygons at a zoomed in level, you could use the smooth polygon tool or smooth in the advanced editor toolbar
... View more
05-29-2015
02:56 PM
|
3
|
0
|
1696
|
|
POST
|
Guess I'll throw my hat in the ring. ArcMap 10.2.2.3552, have a gdb feature class that will not snap in layout view on two different maps, but will in data view. Guess this has been an on-going issue, didn't notice til I had two seperate maps open, one in data view and one in layout. I couldn't snap in the layout view, ended editting session switched to the other map document, then open editting in the data view map and snapping worked no problem! Closed editting session, changed that map from data view to layout view, opened a new editting session, and no snapping again. GDB feature class has ~850 polygons in it.
... View more
05-29-2015
02:17 PM
|
0
|
0
|
2484
|
|
POST
|
You need to create a Layer Object from your feature class then add that layer to your mxd. Adding shapefile as layer in ArcGIS Desktop using Python/ArcPy? - Geographic Information Systems Stack Exchange
... View more
05-29-2015
01:56 PM
|
2
|
1
|
4711
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 02-22-2017 08:58 AM | |
| 1 | 10-05-2015 05:43 AM | |
| 1 | 05-08-2015 07:03 AM | |
| 1 | 10-20-2015 02:20 PM | |
| 1 | 10-05-2015 05:46 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|