POST
|
Can you restart the ArcGIS Server Service on your server?
... View more
05-12-2016
05:24 AM
|
0
|
0
|
771
|
POST
|
That's weird. What server version are you using? Does it make any difference is you change the identify layers order to be sequential and not in the order that you are specifying it? Or set the tolerance to zero? If your feature class does indeed have multiple features at the identify location, you can always "clean" your results by just taking the first result for the specified layer.
... View more
05-12-2016
04:23 AM
|
1
|
0
|
372
|
POST
|
I assume you want to do this client-side? Otherwise you could create your own server side GP service that does it for you by sending the geometries as ArcGIS JSON to the GP service and using the ArcPy tools in your GP model/script to do the convert to feature class and zip it up in a single file. That way you can "convert to shp" over and over and ensure that the data returned has projection information. You can also do all kind of other stuff with it in the GP service e.g. add additional fields, calculate geometry properties, convert to other additional formats etc.
... View more
05-12-2016
04:13 AM
|
1
|
1
|
3066
|
POST
|
It is complicated to explain - sorry if I got you confused in my comments. The core (or cors ) issue is that when I run the final GP task in a function with a polygon ring array as input parameter before any of the other non-CORS tasks, the output result URL does not contain a callback function, but when I run the final GP task after a non-CORS task, a callback function (exactly the same as in the last non-CORS task result output URL string) is added to the result output URL, but not the async messages URLs. In both cases the final GP task result does reflect the correct value for the output parameter. The services are public so I can share with you if you have time to take another look at it. The app that I'm using it in is here: http://gis.elsenburg.com/apps/cdt/ After you have created two adjacent watersheds, run the hidden "union()" function.
... View more
05-05-2016
11:26 PM
|
0
|
0
|
647
|
POST
|
I think you are on the right track. You've already calculated the aspect and sloped per subdivision and created street buffers to see which street the subdivision intersects with. I would then clip the street buffers with the subdivisions and calculate the center points for the subdivision polygon and the street buffer clip polygon. With the Generate Near Table tool (Advanced licence only: Toolbox -> Analysis -> Proximity -> Generate Near Table) you can generate a table using the two center point data sets with information about the direction from the subdivision center point to the street buffer center point. Then you can compare the subdivision slope with the point-to-point angle. This process might not work in all cases, but give I would give it a try.
... View more
05-05-2016
06:43 AM
|
1
|
0
|
1116
|
POST
|
The only (temporary) solution I have implemented is to change the final GP Service to a synchronous service and set the async parameter to false. Now there is no conflict between the callback functions in the async URLs.
... View more
05-05-2016
01:19 AM
|
0
|
2
|
647
|
POST
|
It seems like the asynchronous CORS (post) request to the GP Service is not adding the Esri Leaflet callback function parameter to the async gp task messages returned from the service. This is a screenshot of the XHR response strings when the final GP Service is run before any of the other gpservices in the app is initialised. Note there is no callback function parameter in the URL, whereas my other GP tasks that run asynchronously do return a callback function parameter in the URL. Screenshot of other GP task messages with callback function included in the URL When I run the final GP service after the Esri Leaflet callback functions have been initiated, the async messages still have no callback function in the URL, but the final output parameter URL is specifying the same callback function as the task result above.
... View more
05-05-2016
01:07 AM
|
0
|
0
|
647
|
POST
|
The Open In ArcGIS Desktop will only create Layer files with references to the Map Services used in the Web Map and not give you the option to download to Shapefile. As far as I know you cannot download an AGO Web Map. If you want the data in the Web Map, the map author needs to upload the data as a zipped Shapefile or a Map Package and share it with you to enable download.
... View more
05-04-2016
02:29 AM
|
0
|
0
|
2570
|
POST
|
I'm running a GP task through the Leaflet-Esri API which returns polygon geometries. I then union these geometries with the standard ArcGIS Server Geometry utilities through a L.esri.request process and the union result must then be used in a final Leaflet GP task process, which is asynchronous and using CORS to force a POST request. The problem is that the final GP Task call does not "detect" the task result (a URL string to a JSON file), even though I can see it being returned in the browser XHR requests and the result is in the ArcGIS Server GP jobs folder. The one issue that I've picked up is that after the Union task, the callback ID for the last GP task does not increment again and I suspect that the Leaflet API is trying to fetch some of the previous GP tasks' results. Is there a way to "reset" the callback ID for the GP task results to ensure that the API is trying to fetch the correct GP task results.
Here is the code for the final GP task call:
var gpServiceTest = L.esri.GP.service({
url: myGPserviceURL,
path: "submitJob",
async:true,
asyncInterval:5,
useCors:true
});
var gpTaskTest = gpServiceTest.createTask();
gpTaskTest.setParam("Input_Polygon_String", rings);
gpTaskTest.setOutputParam('JSON_Features');
gpTaskTest.run(function(error, response, raw) {
loadjson(response.JSON_Features.url);
});
I've found that when I take the polygon results from the Union task and run the final GP task as an isolated function with it before any of the other initial GP tasks, there is no callback function ID added to the task results request. However if I run the final GP task after the initial GP task and Union, a callback function ID, similar to a previous GP task result request callback ID, is added to the result request and that is when the response from the final GP task results give an error.
... View more
05-04-2016
01:04 AM
|
0
|
4
|
3999
|
POST
|
Thanks Robert The queryIds did the trick. In my original code I had a "extent-change" event function with a feature selection on the feature layer, but it did not work: map.on('extent-change', function(){
query = new Query()
query.spatialRelationship = Query.SPATIAL_REL_INTERSECTS;
query.geometry = map.extent;
myFeatureLayer.selectFeatures(query, FeatureLayer.SELECTION_NEW);
myFeatureTable._showSelectedRecords();
}) I then used your sample code to modify my code and it is now doing exactly what I want it to. map.on('extent-change', function(){
query = new Query()
query.spatialRelationship = Query.SPATIAL_REL_INTERSECTS;
query.geometry = map.extent;
myFeatureLayer.selectFeatures(query, FeatureLayer.SELECTION_NEW);
myFeatureLayer.queryIds(query, lang.hitch(this, function(objectIds) {
myFeatureTable.selectedRowIds = objectIds;
myFeatureTable._showSelectedRecords();
myFeatureTable._gridTitleNode.innerHTML = myFeatureLayer.name + ' (' + objectIds.length + ' Features)';
}));
})
... View more
03-16-2016
11:25 PM
|
1
|
0
|
1372
|
POST
|
I have a Feature Layer and a Feature Table in my map view. I would like the Feature Table to only show the records from the Feature Layer that are visible in the current map extent and not all the records or the selected feature records. I have tried to use the MODE_SELECTION with an update query on the Feature Layer, which then only shows the Feature Layer features which intersect with the current map extent, but the Feature Table is still showing all the records. Is it possible and how would you do it?
... View more
03-14-2016
10:57 PM
|
1
|
10
|
4939
|
POST
|
I'm working on a geoprocessing tool to export my online web application's map graphics to any other format via ArcGIS Server. I want to be able to send the geometries to the server and return a KML, Shapefile or whatever format I prefer. Since there is no standard method in the API to convert geometries to other formats, I have created my own procedure. An example of the list of geometries being sent from the web app to the server look like this with Web Mercator coordinates: [
[[2097634.02,-4008451.29],[2097514.11,-4008426.54],[2097543.19,-4008329.14],[2097671.5,-4008357.4],[2097634.02,-4008451.29]],
...
] The geometries list is built on the web app side with the following function: function exportGeometries(){
var exportGeoms = '[';
// each graphic feature geometry
for (g=0; g <= map.graphics.graphics.length - 1; g++){
exportGeoms += (g > 0 ? ',' : '');
rings = map.graphics.graphics .geometry.rings;
// each ring in the geometry
polyring = '[';
for (r=0; r <= rings.length - 1; r++){
ring = rings ;
// each point in the ring
for (pnt=0; pnt <= ring.length - 1; pnt++){
polyring += (pnt > 0 ? ',' : '');
polyring += '[' + ring[pnt][0] + ',' + ring[pnt][1] + ']';
}
}
polyring += ']';
exportGeoms += polyring;
}
exportGeoms += ']';
} The Python script tool on the server side needs to be able to read the list of geometries. Just using arcpy.GetParameter() to read the list of geometries as a list object is not sufficient, because Python receives it as a unicode object. I've found a python module (ast) that converts the unicode object to a standard list object that can be iterated in Python with a for loop to create a new feature class that can be converted: import arcpy, ast
geometries = arcpy.GetParameter(0)
geomList = ast.literal_eval(geometries)
sr = arcpy.SpatialReference(102100)
newfc = arcpy.CreateFeatureclass_management(arcpy.env.scratchWorkspace, "webgeom", "POLYGON","","","",sr)
cur = arcpy.da.InsertCursor(newfc, ("SHAPE@"))
for polyring in geometries:
array = arcpy.Array()
for p in polyring:
array.add(arcpy.Point(p[0],p[1]))
polygon = arcpy.Polygon(array,sr)
cur.insertRow([polygon])
) The new Feature Class can now be converted to any other format with the standard toolbox tools. The Python script can be integrated into the final model or script that is published as a GP service that saves the converted object on the web server and returns a URL link as output.
... View more
01-28-2016
05:25 AM
|
0
|
0
|
2140
|
POST
|
What errors do you get when publishing? It will probably be best to create an "intermediate" feature class in your scratch workspace as you are doing with outFCPersistent. If the output is part of a Web Service that you are updating dynamically with this script, then you don't need to create a permanent feature class.
... View more
11-18-2015
11:46 PM
|
0
|
4
|
479
|
POST
|
If all the rasters you want to add are in the same folder or workspace, then you can add the rasters as from Workspace and not just individual Datasets (right click on Mosaic, Add Rasters). So you can use this tool in your model (Data Management Tools -> Raster -> Mosaic Dataset -> Add Rasters to Mosaic Dataset). The tool also has options for including sub folders to browse for raster datasets as well as using an input filter in case you want to filter the rasters by name.
... View more
11-08-2015
11:01 PM
|
1
|
0
|
305
|
POST
|
Thanks John Gravois, luckily the print server I'm using supports CORS and setting the useCors parameter to true worked.
... View more
11-04-2015
09:48 PM
|
0
|
1
|
805
|
Title | Kudos | Posted |
---|---|---|
1 | 03-15-2024 11:33 AM | |
1 | 03-13-2024 11:20 PM | |
1 | 03-13-2024 11:22 PM | |
1 | 03-14-2024 03:37 AM | |
1 | 03-01-2024 04:08 AM |
Online Status |
Offline
|
Date Last Visited |
Tuesday
|