|
POST
|
We are testing out hosting a couple of our base maps on ArcGIS Online as hosted tile layers and I have a few questions I was hoping others could answer based on their experience... 1) How do we update hosted tile layers if we re-build the tile cache? I have kept the tile packages on AGOL that were used to create the tile layers, do I update those and then re-publish?...will that overwrite the tiles and keep the rest URL the same? 2) Do I need to keep the tile packages on ArcGIS Online after the tile layers have been created?
... View more
11-19-2015
11:41 AM
|
1
|
1
|
4500
|
|
POST
|
Bruce Harold, Those tools are definitely nice to know about! As I'm far from a python expert, below is what I have and seems to work...without any domain translating... import arcpy
import csv
fc = r'...path to input fc...'
fields = ['field1', 'field2', 'field3']
outCsv = r'...path to output csv...'
with open(outCsv, 'wb') as ouputCsv:
writer = csv.writer(outputCsv)
writer.writerow(fields) # writes header containing list of fields
rows = arcpy.da.SearchCursor(fc, field_names=fields)
for row in rows:
writer.writerow(row) # writes fc contents to output csv
del rows
... View more
10-23-2015
08:43 AM
|
1
|
0
|
4916
|
|
POST
|
I'm looking to export an attribute table to a .csv file using the csv module within python. I'm wondering what is the best way to do this with multiple fields...? Do you use a search cursor to iterate over the rows? How can you include field names...? I realize I could use the Table to Excel function or the Table to ASCII, but I believe for large datasets this would be faster and create a smaller output.
... View more
10-23-2015
07:43 AM
|
0
|
4
|
15035
|
|
POST
|
I appreciate your help! Sorry for all the questions, first time I've really worked with GetParameter and python script tools. Now that I understand what it's used for and how to test it properly, this makes sense I can then use the Parameters toolbar to index the parameters, is that right?
... View more
10-19-2015
12:30 PM
|
0
|
1
|
1177
|
|
POST
|
Luke, Maybe I'm not understanding the GetParameterAsText method, I'm assuming it's just a user-entered value? If I use your code snippet, I get the error shown below. Your code makes sense to me...enter a layer name, enter an output feature class, check to see if the layer has a set of OBJECTIDs, if not raise an error, if so, copy to output. Not sure why I'm getting this error...
... View more
10-19-2015
12:13 PM
|
0
|
2
|
3404
|
|
POST
|
Again...from the reply above, this is just the first step in a longer process.
... View more
10-19-2015
11:41 AM
|
0
|
0
|
3404
|
|
POST
|
This is the initial step of the script. I have several other geoprocessing functions to run after I get the selection set exported to a working feature class (ex: Near, Join, etc...) I'm just looking to get started on the best way to have a script export out a selected set of features from a map doc.
... View more
10-19-2015
11:35 AM
|
0
|
0
|
3404
|
|
POST
|
I'm trying to create a python script that will export selected features from a layer within ArcMap. The general workflow would be the following: 1) User opens ArcMap 2) User manually selects features from layer 3) User runs script that exports ONLY selected features from layer This seems pretty straight-forward but I'm not used to dealing with interactive selections. I'm also wondering if it's necessary to add in some logic for variances in layer names since users may alter the layer name...? Can this be made as a parameter of the script? I'm also wondering if it would be best to have users run this as a python tool from a toolbox or if a python add-in is possible so it's a button click...?
... View more
10-19-2015
11:18 AM
|
0
|
13
|
10119
|
|
POST
|
Jake Skinner, When I try your method, I get an error: 'global name 'date' is not defined'.
... View more
09-30-2015
09:17 AM
|
0
|
2
|
4164
|
|
POST
|
James, If I try finding the difference between today's date and the date in my field, I get an error: unsupported operand type(s) for: 'datetime.date' and 'unicode'. Is there a way to format the date field to something other than unicode? Below is the function I have now. The field I'm passing in for 'bday' is a Date field within a file gdb. import datetime
def calcAge(bday):
today = datetime.date.today()
diff = today - bday
return diff
... View more
09-30-2015
09:09 AM
|
0
|
1
|
4164
|
|
POST
|
Does anyone have a python code block that calculates age based on a date field within a table? I have tried a few different things but to no success. Was wondering if someone has successfully done this? Thanks!
... View more
09-30-2015
08:43 AM
|
0
|
8
|
9790
|
|
POST
|
...if I use the geocode service within ArcMap, it returns accurately located parcel numbers, so I'm not really sure where the issue is...something with how ArcGIS Online processes the search...?...the search widget itself...? The geocode service can be found here, and can be used to search the above within ArcMap and returns correct results.
... View more
09-29-2015
11:52 AM
|
0
|
0
|
1370
|
|
POST
|
...I get the same results when doing a search within ArcGIS Online and using one of our locators. If I search for a parcel number, it zooms me to the US/Mexico border (...our data is located in Iowa...).
... View more
09-29-2015
11:39 AM
|
0
|
1
|
1370
|
|
POST
|
Chris, You may have gotten the app when I was republishing one of the locators. I don't see any errors when doing a search now...
... View more
09-29-2015
11:16 AM
|
0
|
2
|
1370
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 02-03-2026 09:59 AM | |
| 1 | 03-02-2026 11:02 AM | |
| 6 | 02-18-2026 04:58 PM | |
| 2 | 02-18-2026 05:01 PM | |
| 1 | 12-09-2025 07:06 AM |
| Online Status |
Offline
|
| Date Last Visited |
3 weeks ago
|