|
BLOG
|
hmmm except for the coordinate stuff z = np.zeros((10, 10), dtype = int)
z[::2, 1::2] = 1
z[1::2, ::2] = 1
z
array([[0, 1, 0, 1, 0, 1, 0, 1, 0, 1],
[1, 0, 1, 0, 1, 0, 1, 0, 1, 0],
[0, 1, 0, 1, 0, 1, 0, 1, 0, 1],
[1, 0, 1, 0, 1, 0, 1, 0, 1, 0],
[0, 1, 0, 1, 0, 1, 0, 1, 0, 1],
[1, 0, 1, 0, 1, 0, 1, 0, 1, 0],
[0, 1, 0, 1, 0, 1, 0, 1, 0, 1],
[1, 0, 1, 0, 1, 0, 1, 0, 1, 0],
[0, 1, 0, 1, 0, 1, 0, 1, 0, 1],
[1, 0, 1, 0, 1, 0, 1, 0, 1, 0]])
... View more
02-13-2020
03:22 PM
|
0
|
0
|
699
|
|
POST
|
Copy—Data Management toolbox | Documentation does a lot more than Copy Features—Data Management toolbox | Documentation I would start by comparing what you need to copy and whether your data has any of the conditions and properties that would require Copy to be used over Copy Features
... View more
02-13-2020
02:50 PM
|
0
|
0
|
2151
|
|
POST
|
where is this defined? OutPutLayer Also, code formatting will provide line numbers to your code /blogs/dan_patterson/2016/08/14/script-formatting
... View more
02-13-2020
11:24 AM
|
0
|
2
|
1369
|
|
POST
|
Ahhh sorry ... don't do the 'consumed' side of things
... View more
02-13-2020
08:33 AM
|
0
|
1
|
6069
|
|
POST
|
I just tried both xlsx and xls for a table and both worked, finished and tables were intact. leaving the questions locally stored data and local destination folder? all tables or just this one? shutdown and restart Pro and do it again... same old?
... View more
02-13-2020
08:30 AM
|
0
|
1
|
4628
|
|
POST
|
I added to my post, YYYY-MM-DD is universal format great for sorting. If you need to parse by month, you can split on the string's - separator
... View more
02-13-2020
08:24 AM
|
0
|
3
|
6069
|
|
POST
|
s = "2020-01-15 23:15:30" # --- universal
print(datetime.datetime(*time.strptime(s, "%Y-%m-%d %H:%M:%S")[:6]))
2020-01-15 23:15:30
t = "01-15-2020 23:15:30" # mon, day year
print(datetime.datetime(*time.strptime(t, "%m-%d-%Y %H:%M:%S")[:6]))
2020-01-15 23:15:30 YYYY-MM-DD date format is it?
... View more
02-13-2020
07:59 AM
|
0
|
5
|
6069
|
|
POST
|
like 1/distance? Euclidean Distance—Help | Documentation but it would have to be normalized to your cell size
... View more
02-13-2020
07:39 AM
|
0
|
0
|
1249
|
|
POST
|
python has lstrip, rstrip or the combined .strip : a = " a b c "
a.strip()
'a b c'
... View more
02-13-2020
07:37 AM
|
2
|
1
|
1710
|
|
POST
|
here is a toolbox with an embedded script, give a look and see if it is secure enough for you
... View more
02-13-2020
07:13 AM
|
0
|
2
|
2805
|
|
POST
|
Additional security From Comparing custom and Python toolboxes—Geoprocessing and Python | Documentation it is pretty hard to pull out the code once it is embedded into a toolbox Custom toolboxes Python toolboxes Script tools in a custom toolbox can have their source code embedded into the toolbox and secured with a password. A Python toolbox .pyt file can be encrypted in place and secured with a password.
... View more
02-13-2020
06:35 AM
|
0
|
0
|
2805
|
|
POST
|
1e2
100.0
1e2.0
File "<ipython-input-2-3dea3e3816b2>", line 1
1e2.0
^
SyntaxError: invalid syntax spot the difference?
... View more
02-13-2020
04:21 AM
|
1
|
1
|
3319
|
|
POST
|
With a conventional toolbox (aka custom tool), all the parameter descriptions are stored within the *.tbx. The xml portion doesn't contain the sometimes verbose parameter descriptions and help information
... View more
02-13-2020
04:16 AM
|
0
|
2
|
2805
|
|
POST
|
/blogs/dan_patterson/2016/08/14/script-formatting your indentation was wrong and the code block (eg lines 3-6 or 17-20 ) need to be placed in the code section and the expression (line 10 or 24) in the expression line. Make the field (!some_field!) active, python parser, put in the code in the code block and the expression in its place and run. Also don't use == None, use ... is None ... you don't need your extra else since it will bypass to line 6 if value is not None # for string field
def updateValue(value):
if value is None:
return 'no'
return "yes"
# calling expression
updateValue(!some_field!)
# ------------------------
# for numeric field
def updateValue(value):
if value is None:
return -999
return value
# calling expression
updateValue(!some_field!)
... View more
02-13-2020
03:58 AM
|
1
|
3
|
3319
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 10-03-2017 11:39 AM | |
| 1 | 08-05-2019 05:21 PM | |
| 1 | 09-02-2016 08:05 AM | |
| 1 | 01-15-2018 01:10 PM | |
| 1 | 09-17-2018 12:48 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:22 AM
|