POST
|
Robert - Thanks for the response. I had previously come across that post. The problem is that the GeometryEngine was not available until v3.13 of the Esri Javascript API and I am stuck using v3.9. Thanks for looking - Peter
... View more
01-12-2017
04:56 PM
|
0
|
3
|
1033
|
POST
|
Hello, In my client, I have two polylines. I need to find the point where both lines intersect. I thought that I had found a way to find that out by using the esri.geometry.getLineIntersection(pt, pt, pt, pt), which takes the starting and ending points of each lines. That does in fact return a single point at the intersection, but the problem is that the function calculates all of the intersections as if both lines would continue forever. Since one of the polylines will have multiple line segments going in various directions, the getLineIntersection returns multiple points, even though both lines only crossed once. The function does not take into consideration the length of the line in order to determine if an intersection takes place. Does anyone know there another way to do this so that I only get the one single intersection point? My specs: The solution needs to be client-based (JavaScript API) using the Esri JavaScript v3.9 API (I know it is an older API but I cannot upgrade). If it can't be done with my specs, then that is fine. At least I would know. Thanks for any thoughts - Peter
... View more
01-12-2017
12:05 PM
|
0
|
5
|
3637
|
POST
|
Hello, I am using the QueryTask.execute call to do some queries against some map service layers. The response to the callback function is a feature set. Currently, I am making my QueryTask calls in a synchronous fashion is that I wait until a QueryTask request is completed before making another request to the next map layer. I was doing this so that I could keep track of which feature set went with which layer. I want to be able to run the QueryTask requests asynchronously, however, so that all the results come back much faster. In that case, I am just in a loop for each layer I want to query and submit a QueryTask. The loop has completed before any of the features sets are returned. The problem is that when I am in the callback function with the feature set response, I can't tell which layer the feature set results are for. I can't set any local variables because those variable values will change before they can be appropriately used. I tried looking at the various feature set properties but could not find anything that would tell me which layer was queried. Does anyone have insight into whether I can obtain the layer name / url that was used in the QueryTask withi the callback function once the Query Task has completed? Thanks - Peter
... View more
09-09-2015
07:23 AM
|
0
|
2
|
2384
|
POST
|
Hello, We are using ArcGIS 10.0 with Python 2.6. We have a Python tool script in which we need to call a Java class. Is there a mechanism in Python to call a java class without any external Python libraries, meaning with just what comes with Python 2.6. I know that an alternative would be to build a Java ArcObjects tool but I want to avoid that for now. Any thoughts? Thanks - Peter
... View more
08-05-2015
11:21 AM
|
0
|
0
|
1768
|
POST
|
Hello, We are using ArcGIS 10.2 with Python 2.7. I am trying to add a coded value domain to a field in my mosaic dataset. I used arcpy to create the domain in my file GDB and then to add the values to that domain. I then tried to use the AssignDomainToField_management tool to add the domain to a field in my mosaic dataset but it failed. As I looked closer at the help, the input must either be a table or feature class. I know that mosaic datasets use coded value domains because there is a Category field that was created in my mosaic dataset which points to a domain located in the file GDB. Does anyone know what I need to do to assign an existing domain to a field in a mosaic dataset? Thanks for any thoughts - Peter
... View more
06-11-2015
07:33 AM
|
0
|
0
|
3096
|
POST
|
Hello, We are using ArcGIS 10.0 with Python 2.6.5. This is not a ArcGIS-related Python question, but just a Python question. Hopefully that is okay and someone will still know this. In our application, once the user has selected an AOI and we do a spatial search on our file geo-database, we get some URLs for files that we want to download. We used to use urllib.urlretrieve but now the target site has been SSL-enabled and requires a certificate. Our requests are coming from the server and we have a signed server cert along with the private key file. The key file has an associated PEM pass phrase and I am trying to figure out how to include the pass phrase in the connection. As a note, I can bypass the pass phrase thing by creating a new private key PEM file with no pass phrase and then using.... httplib.HTTPSConnection(host, key_file="privatekey.pem", cert_file="public.pem") and all works fine. If, however, the key file contains a PEM pass phrase, I am prompted for it on the command line. I am trying to find a way to include the pass phrase in the connection (or elsewhere). I have read about the newer SSLContext objects, specifically the load_cert_chain method that allows for a password parameter, but that is not available in Python 2.6.5. Does anyone know if what I am looking for is possible using our version of Python? Thanks - Peter
... View more
06-10-2015
10:58 AM
|
0
|
0
|
3684
|
POST
|
Hello, We are using ArcGIS 10.2.2. I ran into an odd problem. I have a Python script which I am using as the script tool for a Geoprocessing service. In the script, I want to set the scratchWorkspace. It might look something like: arcpy.env.scratchWorkspace = r"C:\tmp\scratch.gdb" When I run the tool via the ArcToolbox, all is well in that the script recognizes where the new scratchWorkspace is located. When I call the tool via the GPServer process from a web client, however, I get the error: Tool or environment <scratchWorkspace> not found The error is thrown the first time I try to access the arcpy.env.scratchWorkspace after it was set. I ran a test where I printed each environment variable from arcpy. If I didn't set the scratchWorkspace, the GPServer would not throw an error and would list the scratchWorkspace in the current arcgisjobs area. If I set the scratchWorkspace and then list all of the environment variables and their values, it would list the environment variable "scratchWorkspace" but would throw the error when I tried to retrieve the value. Again, the error was only thrown if I had set the scratchWorkspace to some value. I tried to see if the same thing would happen when setting the "workspace" variable but no error was thrown with that one. Just with the scratchWorkspace. This seems very odd. Any clues as to why? Thanks - Peter
... View more
04-23-2015
10:32 AM
|
0
|
0
|
2318
|
POST
|
Gabriel - Thanks for the update. You seem to be everywhere So based on your response it sounds like the arcpy.gp syntax is needed for tools running in a Model because it requires the location for the output. Otherwise, the end result of the Model would be nothing since it wasn't saved. The arcpy.sa syntax, on the otherhand, is mroe flexible and allows you to work with the result without having to find a permanent home for it until you need to have a home. Since it is optimized, that would be the one to use even though both versions appear to run just fine in my Python script. I hope my description is a fair assessment of your reply. Thanks again - Peter
... View more
04-16-2015
11:53 AM
|
0
|
1
|
2459
|
POST
|
Hello - We are using ArcGIS v10.2. I have been playing with the spatial analyst Visibility tool. I am writing my own Python script tool and so wanted to see how ArcGIS would list the Visibility tool call so I built a model where I dragged the Visibility (spatial analysis) tool to my model and then added all of the tool's parameters. It all ran fine and si I exported it to a Python file. The python file listed the tool as: arcpy.gp.Visibility_sa() which took 18 arguments. When I looked at the help file for this tool, the python code example looked like: ret = arcpy.sa.Visbility() which took 17 arguments. The definition above included an output raster as the 3rd argument and is why it took 1 more argument than this version. This version, does not take a raster output option, but instead returns a raster type. Both seem to create the same output but I am confused as to why there are two different versions. I could not find anything on an arcpy.gp module so am unsure of where the arcpy.gp is being read from. The odd thing is that in my ArcMap's Search window, when I find my Visibility (spatial analysis) entry, the help link shows an example of the second type (arcpy.sa.Visibility) but the link that points me to the tool int he toolbox, which I dragged to my model, and which I exported as a Python script, lists the first type (arcpy.gp.Visibility_sa). Any thoughts? Thanks - Peter
... View more
04-16-2015
11:11 AM
|
0
|
6
|
7106
|
POST
|
Gabriel - Thanks for the response. Yes, that works like a champ. I must not have seen that. So in the end, doing a Viewshed for a specified distance was a 3-step process (BUFFER tool to create a specified buffer around the observation point, VIEWSHED tool to get the full viewshed for the elevation raster, and then the CLIP tool to clip the viewshed based on the buffer. Is that the accepted way to do what I need or is there a more straightforward approach? For example, I just found the Visibility tool that looks almost identical to the Viewshed tool but can take an OUTPUT RADIUS value, although it doesn't seem to define how you can declare different linear units (3 feet or 3 miles, for example). In any case, if this 3-step process is a valid one, I will go with that. Thanks - Peter
... View more
04-15-2015
10:42 AM
|
0
|
1
|
344
|
POST
|
Hello, I am using ArcGIS 10.2. I have a need to run the Viewshed toolbox tool on an elevation raster based on a single observation point AND only have the viewshed for the specified distance (ex: 2 kilometers from the observation point). I initially though that the Viewshed tool would have a distance parameter but it doesn't. I saythat because I initially came across an Esri Viewshed example at Geoprocessing - Viewshed | ArcGIS API for JavaScript. This is the client side that calls a GP Service. It sends a distance down to be used by the tool that the GP Service calls. After finding that the Viewshed tool itself does not take such a parameter, I figured that there must be some workflow to accomplish the task which would combine the Viewshed tool with something like buffer/clip operations . In my tests, I was able to do the following: 1) Create 2 kilometer BUFFER using my observation point as input 2) Create a Viewshed raster by using the elevation raster and my observation point 3) Use the Data Management Clip tool to use the output from #2 with the buffer from #1 That got me most of the way but the Data Management Clip only seems to clip based on a rectangle, so it created the smallest rectangle off of my circular buffer. I could not use the Analysis Clip tool because that did not accept a raster input. So, my question is.... what is the proper workflow to do a Viewshed that is based on a designated distance?? My process above got me only so far because my clipped result was not a circular clip like I wanted. The rectangle clip I got included some areas outside of the distance of the buffer because it had to create a rectangular clip. Any thoughts? Thanks - Peter
... View more
04-15-2015
09:21 AM
|
0
|
3
|
3594
|
POST
|
Michael - Good news. The AGSSOM downloaded as a ZIP file. Within the ZIP file were versions for 9.3.1, 10.0, and 10.1. Each version contained the source code (a single C# source code file). I was then able to write my own Java ArcObjects version for the part I was interested in and all seems to run fine. Thanks - Peter
... View more
04-08-2015
10:39 AM
|
0
|
0
|
822
|
POST
|
Michael - It looks like that AGSSOM.exe is not installed by arcGIS by default. I have no such file on the OS where the ArcGIS Server was installed. I did find the page http://www.arcgis.com/home/item.html?id=b06bf5c446af401e9203f89993318040 which indicated that it is a downloadable utility. so it looks like it probably would help us if I could download it and add it to the designated server. That may be a problem for us but I will see. Thanks for the heads up on it - Peter
... View more
04-08-2015
07:33 AM
|
0
|
2
|
822
|
POST
|
Mudit - Thanks for the response. After looking at the .Net code from the link, it looks to be very similar to the reference that Freddie gave, except it used .Net. The URL to call, I believe, is basically the same thing though. I tried calling URLs using the /stop and /start, but there just isn't a 10.0 services URL that recognize it so I am not sure if it is only a 10.1+ thing (there is a 10.1 reference in a comment within the .Net code). I will look at it a bit more though. Thanks - Peter
... View more
04-07-2015
04:27 PM
|
0
|
0
|
108
|
POST
|
Michael - Thanks for the reply. While there has been talk of moving to 10.2, it will be a glacial process so unfortunately, I must try to find a 10.0 solution.
... View more
04-07-2015
04:14 PM
|
0
|
4
|
822
|
Title | Kudos | Posted |
---|---|---|
1 | 08-02-2014 01:40 PM | |
1 | 03-19-2018 09:32 AM | |
1 | 02-18-2020 11:56 AM | |
1 | 08-26-2014 02:51 PM |
Online Status |
Offline
|
Date Last Visited |
10-22-2023
10:59 PM
|