|
POST
|
Hmmm, a string inside brackets means "list of one string" in Python, but I don't work with SDE.
... View more
10-29-2018
04:24 PM
|
1
|
1
|
6844
|
|
POST
|
inFeatures = ['sewer'] Are you sure this is correct? inFeatures should be a Feature Layer, not a list. edit: you should also get in the habit of using forward slashes or raw string notation (e.g. r'path') for paths, otherwise you risk introducing unwanted escape characters.
... View more
10-29-2018
03:44 PM
|
0
|
3
|
6844
|
|
POST
|
Using Python, read your rasters in a loop into Raster objects: Raster—ArcPy classes | ArcGIS Desktop Compare the raster extent to your polygon. If they overlap, then clip.
... View more
10-29-2018
01:55 PM
|
0
|
1
|
1344
|
|
POST
|
A feature layer should not show up in your gdb. Think of it like an in memory set of display instructions (and other temporary visual things, like selections) that points to the data in your gdb. Name your feature layer something simple that would appear in the table of contents in ArcMap, not a long path. Then, make your selection against the feature layer (again, not the feature class or a full path).
... View more
10-29-2018
08:46 AM
|
1
|
0
|
1226
|
|
POST
|
Hmmm, I think the Con will return the raster or nothing. If you want a full binary raster, use: stream_raster = Con(outFlowAccum >= 150, 1, 0)
... View more
10-25-2018
08:53 AM
|
0
|
1
|
1635
|
|
POST
|
I'm not exactly sure what the non-tool equivalent is, but I default to Con, something like: stream_raster = Con(outFlowAccum >= 150, outFlowAccum) Con—Help | ArcGIS for Desktop
... View more
10-24-2018
02:06 PM
|
1
|
0
|
1635
|
|
POST
|
You do a bunch of work to get things into the dataframe within the loop, but never use it. Rather, you append to 'data' (2 columns), and then attempt to make a new dataframe from that (specifying 3 columns). I assume you should use: data.append([adt, address, mile])
... View more
10-23-2018
03:45 PM
|
1
|
1
|
2585
|
|
POST
|
You first need to read the file into a dataframe: excel = pd.read_excel('path/to/xlsx') Then, find the value: excel.iloc[row_index][column_name]
... View more
10-23-2018
03:30 PM
|
1
|
3
|
2585
|
|
POST
|
See examples here (your expression would be like "Value > 0", or InRas1 > 0): OutRas = Con(InRas1, 40, 30, "Value >= 2") Con—Help | ArcGIS for Desktop
... View more
10-23-2018
10:20 AM
|
2
|
0
|
725
|
|
POST
|
Your error says, "Parameters are not valid." So, what are the parameters? print(intFC, outputName) Next step, check the help doc and make sure the parameters are exactly the correct data type: Table To Excel—Conversion toolbox | ArcGIS Desktop edit: the line specifying your workspace is probably wrong. It should be the following, to use the variable value, not the string "outputDest": arcpy.env.workspace = outputDest To be honest, environment variables are sometimes not worth the hidden trouble they can cause if not used carefully.
... View more
10-16-2018
03:18 PM
|
1
|
0
|
3074
|
|
POST
|
Can you try specifying a completely different value for in_features and out_name? It may be trying to read/write the same file.
... View more
10-16-2018
02:09 PM
|
1
|
3
|
3074
|
|
POST
|
Presumably some of your records are truly divisible by 50?
... View more
10-16-2018
10:42 AM
|
1
|
4
|
2183
|
|
POST
|
I believe the [0] indicates the first item in the Result object returned from the tool, which happens to be the new feature class name. Using tools in Python—Geoprocessing and Python | ArcGIS Desktop
... View more
10-10-2018
04:37 PM
|
1
|
0
|
3576
|
|
POST
|
I see you've got a working solution, which is great. I'll just point out the method "os.path.splitext()", which splits out the extension, regardless how long it is. This is handy when you don't exactly know the length of the extension (e.g. dealing with both .jpg and .jpeg): >>> import os
>>> mypath = 'path/to/some/shapefile.shp'
>>> print(os.path.splitext(mypath))
('path/to/some/shapefile', '.shp')
>>> mypath = 'path/to/some/geodatabase.gdb/featureclass'
>>> print(os.path.splitext(mypath))
('path/to/some/geodatabase.gdb/featureclass', '')
... View more
10-10-2018
04:23 PM
|
1
|
7
|
2319
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 08-30-2013 02:22 PM | |
| 1 | 04-12-2011 11:19 AM | |
| 1 | 09-17-2021 09:43 AM | |
| 1 | 04-04-2012 12:05 PM | |
| 2 | 07-16-2020 11:31 AM |
| Online Status |
Offline
|
| Date Last Visited |
07-15-2023
12:11 AM
|