POST
|
Instead of printing to a PDF, I recommend exporting to a PDF. It can be found under File>Export Map. You can choose the file type and output DPI there.
... View more
04-19-2017
07:53 AM
|
2
|
0
|
840
|
POST
|
According to several older threads, you cannot directly add topology layers to a map using Arcpy. https://gis.stackexchange.com/questions/116873/is-there-a-a-way-to-add-a-topology-dataset-to-an-mxd-with-arcpy https://community.esri.com/thread/93229 This begs the question though, clearly the geoprocessing operation can create a layer file of the Geoprocessing Result object of the geoprocessing operation, and that layer is clearly added to the map when you have the addOutputs to True in the environment variable. I wonder if there is a way to turn on the addOutput to True after you add the rules, features and validation, then recall the output or the result object in a way it would add it to the map. bixb0012
... View more
04-19-2017
07:46 AM
|
1
|
1
|
525
|
POST
|
Conversely, if you are working a map document you can ListLayers and create a layer object of the layer you need.
... View more
04-06-2017
01:06 PM
|
1
|
1
|
1206
|
POST
|
https://productforums.google.com/forum/#!topic/earth/FS52IeU4mtw Based on this thread and my own experience, converting to a PNG should allow you to have transparent raster values in Google Earth. Conversely instead of trying to create an overlay from your existing image, you could use the Map to KML Tool to create a georeferenced KMZ of your map. https://community.esri.com/thread/31961 http://desktop.arcgis.com/en/arcmap/10.3/tools/conversion-toolbox/map-to-kml.htm
... View more
04-06-2017
08:21 AM
|
0
|
1
|
3446
|
POST
|
You can create new directories with the os module mkdir function. I would recommend using that along with os.path.join to write the output file name for your shapefile os.mkdir() https://docs.python.org/2/library/os.html#os.mkdir os.path.join() https://docs.python.org/2/library/os.path.html#os.path.isfile
... View more
04-04-2017
01:37 PM
|
1
|
0
|
354
|
POST
|
I'm guessing you are basing this off of Richard Fairhurst's Blog Post: https://community.esri.com/blogs/richard_fairhurst/2014/11/08/turbo-charging-data-manipulation-with-python-cursors-and-dictionaries I think you have several significant issues here. First you are trying to update values for PC based on I'm assuming a related field in source FC. You never establish a related field and instead are rewriting the values every time for 'AV', 'KV', 'WV', and Value for each record in Update FC. Second you create a numpy array each and every time through and it would change each time. Third you are deleting your row and UpdateRow unnecessarily early in your script. Fourth, you are nesting cursors which is never ever a good idea, update the values in your first feature, then create a numpy array so sum the new values in the Value field, then use an new cursor to update the new values into the Update FC. I'm guessing the Total field should have the exact same value for every record in your Update FC since you are trying to sum up the entirety of the Value Field to place into it. I'm operating on alot of assumptions with what I posted above. I think the best thing you could do is give more information about what exactly you are trying to do, screenshots of your tables/fields would be useful. Right now you are asking us for help fixing your code, without ever really saying what its supposed to be doing.
... View more
04-04-2017
01:23 PM
|
0
|
0
|
687
|
POST
|
Thanks for fixing the basic formatting, but the spacing is still off. If you could fix the indentation also that would be good. I think the issue is you set all the values for your fields in PC Fields, but do not update the row prior to making your numpy array to sum up the values of the VALUE field. I would guess you would need to update the row first, then create the numpy array for the values.
... View more
04-04-2017
11:44 AM
|
0
|
1
|
687
|
POST
|
Please format the code in your post so it is easier to read. /blogs/dan_patterson/2016/08/14/script-formatting?sr=search&searchId=fa545a89-68b8-4f51-911d-1e664129de54&searchIndex=2
... View more
04-04-2017
11:11 AM
|
0
|
0
|
687
|
POST
|
You may try to find a better solution. https://community.esri.com/blogs/richard_fairhurst/2014/11/08/turbo-charging-data-manipulation-with-python-cursors-and-dictionaries
... View more
04-03-2017
01:11 PM
|
0
|
0
|
759
|
POST
|
I'd create a separate list of raster for each folder using the List Rasters function. http://pro.arcgis.com/en/pro-app/arcpy/functions/listrasters.htm I'd iterate through one list to use as the first input for the Divide function and use an index to pull the appropriate raster from the second list of rasters. import arcpy
import os
arcpy.CheckOutExtension("Spatial")
output_path = r"pathtooutputfolder"
rain_folder = r"pathtorainfolder"
weight_folder = r"pathtoweightfolder"
rain_list = arcpy.ListRasters(rainfolder)
weight_folder = arcpy.ListRasters(weight_folder)
count = 0
for ras in rainlist:
outDivide = arcpy.sa.Divide(ras, weight_list[count])
outDivide.save(os.path.join(output_path, " r_divide_m" + str(count + 1) + ".tif")
count += 1
del outDivide
... View more
03-31-2017
01:57 PM
|
1
|
0
|
478
|
POST
|
While it is possible to run a cursor within a cursor, I would never recommend it. There are far easier and faster ways to read and store data to be accessed later from one cursor and use it for operations for other cursors. I'd highly recommend looking at Richard Fairhurst's blog post /blogs/richard_fairhurst/2014/11/08/turbo-charging-data-manipulation-with-python-cursors-and-dictionaries?sr=search&searchId=ab648d35-d94c-4d97-8459-6f3ac76b04d4&searchIndex=0 for example of reading data to dictionaries to update values in different tables.
... View more
03-31-2017
01:43 PM
|
0
|
0
|
269
|
POST
|
A screenshot of how the feature is being labelled, along with your placement properties would go a long way towards helping you solve this.
... View more
03-31-2017
11:14 AM
|
1
|
0
|
895
|
POST
|
Ex. Layer.definitionQuery = ' ID = ' + str(ID) Layer Class help: http://desktop.arcgis.com/en/arcmap/10.3/analyze/arcpy-mapping/layer-class.htm Once you create a layer object for the layer in the map, you can change its definition query property. This example is using the ID field and the ID value pulled from the cursor. Obviously you would need to change to your PIN value and field and you may or may not need a more complex expression if you are planning to use your Community values in your query as well. See Joshua Bixby's post in the below thread about suggestions for python string formatting when writing SQL queries. https://community.esri.com/thread/121098
... View more
03-31-2017
06:49 AM
|
0
|
0
|
1538
|
POST
|
Good for you picking up python and arcpy. I took a class in grad school in python and arcpy and have used that same book myself before. I didn't get too comfortable with it though til I found real applications for its use where I work and its been quite the timesaver for me. Now to your questions. You are getting the base name property of the raster but not an extension(file type). Your output from Copy Raster will need a file type or it will default to a GRID file which has a 13 character limit and limits the character types that can be in the name. This is likely causing your issue. Also when joining paths and file names, I recommend using the os module and os.path.join to combine your path and name instead of concatenation. https://docs.python.org/2/library/os.path.html
... View more
03-30-2017
08:49 AM
|
0
|
0
|
1352
|
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
|