|
POST
|
Below provides some food for thought, please consult the appropriate help topics for other options.
>>> import numpy as np
>>> unique = np.arange(100)
>>> unique = unique.reshape(10,10)
>>> unique
array([[ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
[10, 11, 12, 13, 14, 15, 16, 17, 18, 19],
[20, 21, 22, 23, 24, 25, 26, 27, 28, 29],
[30, 31, 32, 33, 34, 35, 36, 37, 38, 39],
[40, 41, 42, 43, 44, 45, 46, 47, 48, 49],
[50, 51, 52, 53, 54, 55, 56, 57, 58, 59],
[60, 61, 62, 63, 64, 65, 66, 67, 68, 69],
[70, 71, 72, 73, 74, 75, 76, 77, 78, 79],
[80, 81, 82, 83, 84, 85, 86, 87, 88, 89],
[90, 91, 92, 93, 94, 95, 96, 97, 98, 99]])
>>> import arcpy
>>> out_raster = arcpy.NumPyArrayToRaster(unique)
>>> out_raster.save("c:/temp/testRaster")
>>>
... View more
10-25-2011
09:03 AM
|
0
|
0
|
3079
|
|
POST
|
I have never seen that behaviour before, nor have I seen it reported. Does it occur in other files?
... View more
10-24-2011
09:18 AM
|
0
|
0
|
1832
|
|
POST
|
I would actually click on the Clear Selected Features button to ensure that you have no selected records, don't rely on visuals
... View more
10-24-2011
04:07 AM
|
0
|
0
|
1832
|
|
POST
|
You might have bigger problems ... 1/2 isn't 0.2 But I suspect you did 1/5, in any event, you performed integer division if one or both of your values weren't floating point ie, in Python
>>> print 1/5
0
>>> print 1/5.0
0.2
>>>
... View more
10-24-2011
02:26 AM
|
0
|
0
|
1832
|
|
POST
|
references to literature would help... some issues... creating the convex hull (CH) (aka convex polygon) and removing the hull points and re-doing the analysis will fail in almost all cases ... as will buffering negatively by 5% of the area not fairly represent your analysis, so in short could you provide some visuals or some description which would account for the general situations ie your clustering consists of 4 points, 5 points with one outlier etc etc. it may be the clustering algorithm that you are interested in rather than the CH
... View more
10-22-2011
12:32 PM
|
0
|
0
|
10924
|
|
POST
|
you can use similar methods if you have the spatial Analyst extension, alternately look at open source software
... View more
10-20-2011
08:04 AM
|
0
|
0
|
1072
|
|
POST
|
Jason could you throw your code within the code blocks in the HTML editor (ie # symbol after selecting your code)
... View more
10-18-2011
01:01 PM
|
0
|
0
|
1376
|
|
POST
|
pi() is the problem, see below
>>> import math
>>> print math.pi
3.14159265359
>>> print math.pi()
Traceback (most recent call last):
File "<interactive input>", line 1, in <module>
TypeError: 'float' object is not callable
... View more
10-17-2011
03:21 AM
|
0
|
0
|
1952
|
|
POST
|
If your field contains string/text data, there is no need for the len method in Python since string data is an "iterable". For example >>> a = "abcdefghijklmnop"
>>> b = a[:-4]
>>> b
'abcdefghijkl'
>>>
... View more
10-16-2011
08:59 AM
|
2
|
0
|
10226
|
|
POST
|
try capitalizing the x (ie X), if memory serves the properties within python are case-sensitive (also check the shape syntax/capitalization
... View more
10-11-2011
02:21 PM
|
0
|
0
|
2189
|
|
POST
|
did you try this for your replace? filename.replace("\\", "/")
... View more
10-10-2011
05:42 AM
|
0
|
0
|
607
|
|
POST
|
Is suspect that your latter fails since you are passing an array and not an array of point objects to the polygon class. follow the example in the help file http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Polygon/000v000000n1000000/ and in the previous discussion on creating polygons with donuts in them http://forums.arcgis.com/threads/18985-Bug-Creating-polygons-with-holes-using-Arcpy?p=61005&posted=1#post61005
... View more
10-07-2011
11:01 AM
|
0
|
0
|
1082
|
|
POST
|
>>> import numpy as np
>>> a = [[1,2,3],[4,5,6],[7,8,9]]
>>> b = np.array(a)
>>> b
array([[1, 2, 3],
[4, 5, 6],
[7, 8, 9]])
>>> b.shape
(3, 3)
>>> the array's shape will give you the number of rows and columns, but not its coordinates nor its cell size.
... View more
10-05-2011
01:52 AM
|
0
|
0
|
3078
|
|
POST
|
As a suggestion, which probably doesn't apply to beta, I never use the built-in help but the online help since it separates ArcMap from the help and it is uptodate...for future consideration...in fact esri should consider online help as the first goto, then if no web access, then the online help
... View more
10-03-2011
02:01 PM
|
0
|
0
|
2681
|
|
POST
|
this line near_pts - 1 is wrong this line row.setValue("Cnt") will set everthing in that row to the text value this line del rowCursor will delete the cursor on the first pass Edit additionally, the indentation after the if statement is incorrect
... View more
10-02-2011
01:56 AM
|
0
|
0
|
781
|
| 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
|