|
POST
|
If you are using the ESRI JS API then check out the PrintTask. There are also a few PrintTask samples available - Samples | ArcGIS API for JavaScript.
... View more
03-23-2015
03:21 PM
|
0
|
1
|
1927
|
|
POST
|
It appears like you have the letter 'o' and not the number 0 in your array index value. This line: allInputs .set("checked",false);//error Should be: allInputs[0].set("checked",false);//error
... View more
03-20-2015
06:50 PM
|
0
|
0
|
542
|
|
POST
|
I think the issue is that when ArcGIS attempts to determine the field type it only looks at the first value and assumes the field should be an integer (Long). If you change your first value in the column from 0 to 0.0, ArcGIS will assume the field is a double value:
... View more
03-19-2015
03:08 PM
|
1
|
0
|
1381
|
|
POST
|
I have found function decorators a useful way to do this kind of thing. A good starting guide on function decorators is available at simeonfranklin.com - Understanding Python Decorators in 12 Easy Steps! Basically, you wrap your processing function inside a timer function. This can be done ad-hoc by pre-pending the function definition with a decorator name and the @ symbol: import time
import inspect
def recordPerformance(func):
def wrapper(*arg):
t1 = time.clock()
res = func(*arg)
t2 = time.clock()
print '%s, %0.2f' % (func.func_name, (t2-t1))
return res
return wrapper
def mainProcess():
subProcess1()
subProcess2()
subProcess3()
@recordPerformance
def subProcess1():
time.sleep(2)
@recordPerformance
def subProcess2():
time.sleep(1)
@recordPerformance
def subProcess3():
time.sleep(3)
mainProcess() When you run this the result is: subProcess1, 1.99
subProcess2, 1.01
subProcess3, 3.00 EDIT - fixed function names in output results. This approach provides a lot of flexibility and is great for logging and performance timing.
... View more
03-18-2015
07:26 PM
|
1
|
1
|
910
|
|
POST
|
Good to hear it is working. It can be hard to locate typos or missing quotes within the init.js file.
... View more
03-18-2015
06:05 PM
|
0
|
0
|
2125
|
|
POST
|
You may have missed this important step outlined in install.htm (in the API download): Install the Normal or Compact Build ArcGIS JSAPI 3.12 contains two builds--a normal build and a compact build. The compact build removes the Dojo Dijit dependancy and minimizes the non-essential ArcGIS JSAPI classes. Please see the documentation for more details. Your directions may differ depending on your server configuration or Web server, but the process is the same. Configuration options for normal build: Open C:\Inetpub\wwwroot\arcgis_js_api\library\3.12\3.12\init.js in a text editor and search for the text '[HOSTNAME_AND_PATH_TO_JSAPI]' , and replace this text with "<myserver>/arcgis_js_api/library/3.12/3.12/" Open C:\Inetpub\wwwroot\arcgis_js_api\library\3.12\3.12\dojo\dojo.js in a text editor and search for the text '[HOSTNAME_AND_PATH_TO_JSAPI]' , and replace this text with "<myserver>/arcgis_js_api/library/3.12/3.12/" Configuration options for compact build: Open C:\Inetpub\wwwroot\arcgis_js_api\library\3.12\3.12compact\init.js in a text editor and search for the text '[HOSTNAME_AND_PATH_TO_JSAPI]' , and replace each instance of this text with "<myserver>/arcgis_js_api/library/3.12/3.12compact/" Open C:\Inetpub\wwwroot\arcgis_js_api\library\3.12\3.12compact\dojo.js in a text editor and search for the text '[HOSTNAME_AND_PATH_TO_JSAPI]' , and replace this text with "<myserver>/arcgis_js_api/library/3.12/3.12compact/"
... View more
03-17-2015
06:48 PM
|
0
|
3
|
2125
|
|
POST
|
Check out the Spatial Join tool. It should be exactly what you are after.
... View more
03-17-2015
06:02 PM
|
0
|
1
|
1085
|
|
POST
|
As a test I applied a multiple ring buffer on about 20,000 features using 3 distance values and the tool is still running after 3 hours. I will let you know how long it takes when the process completes. As far as computer specs go - ArcGIS is a single threaded application and will only use a single core for a process. So raw processor speed is better than more cores. There is a good article here that goes into detail - Choose Right Hardware for Faster ArcGIS - GeoHardware - Geographic Information Science Forum
... View more
03-17-2015
12:06 AM
|
0
|
0
|
787
|
|
POST
|
Do you want to just show the point on the map or pass it to ArcGIS Server to create a new feature using REST or a geoprocessing service? To add a point to the map using the JavaScript API you can use the GraphicsLayer.
... View more
03-16-2015
09:31 PM
|
0
|
0
|
470
|
|
POST
|
It seems a bit odd that the process is taking so long. How many features are you processing and how many buffer distances? What dissolve option are you using with the tool? I would also try Checking and Repairing Geometry to see if there are any issues in the data.
... View more
03-16-2015
09:03 PM
|
0
|
0
|
787
|
|
POST
|
If this is the result of a QueryTask then you need to handle adding the results to the map. Check out this sample - specifically how the addPointsToMap function is used to add the results to the map.
... View more
03-15-2015
03:49 PM
|
1
|
0
|
547
|
|
POST
|
The issue with your script is that it keeps processing after an error condition. The sock object is invoked as soon as your create your FTP object (see the __init__ function in the ftplib.py file). This means that the sock object is not a NoneType at this point. However, as Dan mentions, the sock object is a NoneType when you attempt to execute the f.retrbinary() function. This is because the previous code block has an error condition and you call the f.quit() function. The issue is that the FTP directory does not exist. The error is the f.quit() function explicitly sets the sock object to None, then your code attempts to use it in the next block. You should modify your code to exit if an error occurs or place conditional statements around code blocks to ensure that any pre-conditions are met. Also, there are a few missing else statements that will when messages are printed, for example: try:
f.cwd(DIRN)
except ftplib.error_perm:
print 'ERROR: cannot CD to "%s"' % DIRN
f.quit()
else: # <-- missing
print '*** Changed to "%s" folder' % DIRN
... View more
03-15-2015
02:49 PM
|
1
|
2
|
3110
|
|
POST
|
Also, is there a way to use code tags in this forum? Click on the link to Use advanced editor, then: highlight the code to format, click on the >> (insert) button select Syntax Highlighting > then pick a language
... View more
03-12-2015
05:26 PM
|
0
|
0
|
1110
|
|
POST
|
Cast your elevation value to a float and it should work: def FindLabel ( [ELEVATION] , [NOTES] ):
el = [ELEVATION]
nt = [NOTES]
if el > 0:
if (float(el)%0.5)==0:
return el
else:
return nt
... View more
03-08-2015
09:18 PM
|
0
|
1
|
884
|
|
POST
|
This is good news - the client side Geometry Engine looks great too: ArcGIS API for JavaScript version 3.13 | ArcGIS Blog
... View more
03-08-2015
01:55 PM
|
0
|
1
|
1982
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 10-07-2014 06:13 PM | |
| 1 | 08-25-2015 02:04 AM | |
| 1 | 10-07-2014 03:54 PM | |
| 1 | 08-07-2014 09:19 PM | |
| 1 | 03-04-2015 02:02 PM |
| Online Status |
Offline
|
| Date Last Visited |
07-21-2021
06:32 PM
|