|
POST
|
ok. thanks. I didn't know that buffer in Arcmap (ArcObjects) and JS API are not the same. Do you know do i get the SR error?
... View more
09-04-2018
11:42 AM
|
0
|
4
|
2254
|
|
POST
|
Robert, the intersect_area if the result of another gE process and it uses the map spatialreference. intersect_geom= geometryEngine.intersects(firstgraphics[j], secondgraphics[i], this.map.spatialReference) The buffer should be based on the same SR since it is created from the intersect_area var buffer = geometryEngine.geodesicBuffer(intersect_geom, thebufferdistance, "miles") What it puzzles me is why the buffer area includes the polygon area as well? That is not what a buffer is.
... View more
09-04-2018
11:36 AM
|
0
|
6
|
2254
|
|
POST
|
I used the gE to buffer a polygon but it seems that it ovelaps the whole polygon instead of only the buffer area. Measurement of the buffer area verifies that the area of the polygon itself is included in the buffer area calculation. How the buffer graphic can include only the buffer outside the polygon? I also tried the geometryEngine.difference to substract the polygon from the buffer polygon but I get spatialreference errors. Ideas? var polySym = new SimpleFillSymbol(SimpleFillSymbol.STYLE_DIAGONAL_CROSS,
new SimpleLineSymbol(SimpleLineSymbol.STYLE_DASHDOT,
new Color([255,0,0]), 2),new Color([255,255,0,0.25]));
var buffer = geometryEngine.geodesicBuffer(intersect_geom, thebufferdistance, "miles");
// added to see if difference could result to the buffer area
// var newbuffer = geometryEngine.difference(buffer.geometry,intersect_area)
var buffergraphic = new esri.Graphic(buffer, polySym);
bufferfeatures.push(buffergraphic)
all(bufferfeatures).then(function (results) {
for(j=0;j<results.length;j++){
console.log(results[j])
bufferGraphicsLayer.add(results[j]);
}
})
------
------
this.map.addLayer(bufferGraphicsLayer);
... View more
09-04-2018
11:06 AM
|
0
|
8
|
2539
|
|
DOC
|
For future reference, Tried hard reset to clear your browser cache. Chrome and Firefox are notorious to resist clearing cache. These are the steps for Chrome. Press F12. An extra window will open with chrome tools. Just ignore it for now, but do not close it. On the refresh of the browser right next to address bar, right-click on it and select the option shown below. It will refresh your browser. close the extra window that opened in step 1.
... View more
09-04-2018
08:36 AM
|
2
|
0
|
15344
|
|
POST
|
I run the intersect tool (analysis) in ArcMap and the geometryEngine.geodesicArea on the WAB for the same pair of polygons. It seems to be a significant difference in the calculated area. I already converted both outputs to Acres. Are there any known issues on the calculation of areas, or which way is provides the accurate results? Thanks. Update: The difference is due to the fact that ArcMap uses the planarArea to calculate areas. For small sized area it won't make a difference. However, the calculation of areas with long length, Arcmap results are not accurate.
... View more
08-24-2018
09:45 AM
|
1
|
2
|
8890
|
|
POST
|
Got it. Your response: "The QueryTask will just return the full features that intersects the other feature." should be included in ESRI docs. One more question. Do you know what the Arcmap analysis tools/overlay/intersect tool is running on? I am trying to create a tool to use in wab where you don't specify a source layer. Thanks.
... View more
08-01-2018
09:05 AM
|
0
|
2
|
1440
|
|
POST
|
I want to replicate the behavior of Arcmap analysis tools/overlay/intersect tool by using SPATIAL_REL_INTERSECTS. In that tool, when you specified two polygon classes, it doesn't matter the order, the area of intersection is the same. I want the users to be able to use any two polygon classes to run the intersect tool to get the intersected area. I am using the script below. If I switch the first layer with the second the results are different. Why? The intersected area should be the same regardless which layer is specified as first or second. Thanks. var firstgraphics = [];
var features = [];
array.forEach(firstlayer.graphics, function (feature) {
firstgraphics.push(feature.geometry)
})
var secondgraphics = [];
array.forEach(secondlayer.graphics, function (feature1) {
secondgraphics.push(feature1.geometry)
})
var queryTask = new esri.tasks.QueryTask(firstlayer.url);
queryTask.on("error", this.queryTaskErrorHandler);
for (j = 0; j < secondgraphics.length; j++) {
query = new esri.tasks.Query();
query.geometry = secondgraphics[j];
query.returnGeometry = true;
query.where = "1=1";
query.maxAllowableOffset=0;
query.distance=0;
query.outFields = ["*"];
query.outSpatialReference = this.map.spatialReference;
query.spatialRelationship = esri.tasks.Query.SPATIAL_REL_INTERSECTS;
queryTask.execute(query, function (results) {
for (i = 0; i < results.features.length; i++) {
console.log(results.features[i].attributes);
// thefeatureSet = results.results;
var graphic = new esri.Graphic(results.features[i].geometry, inter_symbol);
bufferGraphicsLayer.add(graphic);
}
})
}
this.map.addLayer(bufferGraphicsLayer);
},
... View more
07-31-2018
02:40 PM
|
0
|
4
|
1667
|
|
POST
|
I realized that when I run the script from the developer wab on my workstation is very slow to get the results of the intersects but when it's done it displays the intersects correctly. However when I run the script from the website on the server, is very fast but the display is like the autogeneralize is off! There are only 58 features to intersect. Will the geometryservice have a better performance that geometryengine?
... View more
07-30-2018
09:06 AM
|
0
|
1
|
3945
|
|
POST
|
Thank you for the suggestion. I added the maxAlowableOffset property, but it didn't seem to do anything. firstlayer = new FeatureLayer("http://xxxx/MapServer/3");
firstlayer.maxAllowableOffset=0
secondlayer = new FeatureLayer("http://xxx/0")
secondlayer.maxAllowableOffset=0
... View more
07-30-2018
08:02 AM
|
0
|
4
|
3945
|
|
POST
|
I have two feature layers with multiple polygon features each. So, I ran each graphic geom from one layer against each graphic geom from the other layer, if it s true that there is intersection, then I store the geom and display it when it's done. How do I define the offset? var features = [];
var instersect_geom=[];
array.forEach(firstlayer.graphics, function (feature) {
firstgraphics.push(feature.geometry)
})
var secondgraphics = [];
array.forEach(secondlayer.graphics, function (feature1) {
secondgraphics.push(feature1.geometry)
})
console.log(secondgraphics.length);
for (j = 0; j < firstgraphics.length; j++) {
for (i = 0; i < secondgraphics.length; i++) {
if (geometryEngine.intersects(firstgraphics[j], secondgraphics[i], this.map.spatialReference)) {
intersect_geom.push(geometryEngine.intersect(firstgraphics[j], secondgraphics[i], this.map.spatialReference))
count++;
console.log("true")
}
}
}
console.log(count + " " + intersect_geom.length);
for(k=0;k<intersect_geom.length;k++){
var graphic = new esri.Graphic(intersect_geom[k], inter_symbol);
console.log(graphic)
// gra_inter.push(graphic);
theGraphicsLayer.add(graphic);
}
this.map.addLayer(theGraphicsLayer);
},
... View more
07-30-2018
07:31 AM
|
0
|
6
|
3945
|
|
POST
|
I tested the geometryEngine.intersect with two polygons. One has the purple boundary and the other one has the blue fill. So, when you run the intersect the red line shows the results. If the intersect was working properly, since the blue fill polygon is inside the purple polygon, the intersect (red line) should run along the the contour of the blue fill. It seems that it follows some vertices. This is an issue since the area of the intersect will be miscalculated. Ideas? Thanks.
... View more
07-29-2018
11:32 PM
|
0
|
8
|
4488
|
|
POST
|
THank you Robert. THe restart didn't help. I have a strange behaviour. Basically I am trying a polygon layer on another polygon layer, both layers with multiple features. So I run this loop to capture all intersections. for(i=0;i<secondgraphics.length;i++){ geometryService.intersect(firstgraphics, secondgraphics, this.theoutput); } the graphics geom come from this: var firstgraphics=[];
array.forEach(firstlayer.graphics, function (feature) {
firstgraphics.push(feature.geometry)
})
var secondgraphics=[];
array.forEach(secondlayer.graphics, function (feature1) {
secondgraphics.push(feature1.geometry)
}) I noticed that when when I use geometryService.intersect(firstgraphics, secondgraphics, this.theoutput); it works. but when I use geometryService.intersect(secondgraphics, firstgraphics, this.theoutput); then I get the 500 error! Is it possible that the error is due to the # of features in the secondlayer?
... View more
07-25-2018
10:21 AM
|
0
|
1
|
987
|
|
POST
|
I have the geometry service in the proxy.config <serverUrl url="http://xxxxxxx/rest/services/Utilities/Geometry/GeometryServer/" matchAll="true"/> I have the proxy setup in the config.json of the app: "wabVersion": "2.8", "isTemplateApp": true, "isWebTier": false, "httpProxy": { "useProxy": true, "alwaysUseProxy": false, "url": "http://xxxxxx/DotNet/proxy.ashx", "rules": [] }, However the geometryservice gives me the 500 error geometryService.intersect(firstgraphics, secondgraphics[0], this.theoutput); Error: http://xxxx/DotNet/proxy.ashx?http://xxxx/rest/services/Utilities/Geometry/GeometryServer/intersect 500 (Internal Server Error) What is left to be done? THanks.
... View more
07-25-2018
08:46 AM
|
0
|
3
|
1083
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 06-09-2026 12:44 PM | |
| 1 | 06-08-2026 12:12 PM | |
| 1 | 06-19-2025 10:13 PM | |
| 3 | 02-06-2026 10:44 AM | |
| 1 | 01-08-2026 12:50 PM |
| Online Status |
Offline
|
| Date Last Visited |
2 weeks ago
|