|
POST
|
It's related to some preprocessing work they are trying to do for a JS app. Count Points in Polygon and symbolize on number of... - Esri Community
... View more
05-21-2021
12:59 PM
|
0
|
0
|
2316
|
|
POST
|
your expressionValue needs to put quotes around the species to be a valid SQL statement expressionValue = "common_name = '{}'".format(species)
... View more
05-21-2021
10:42 AM
|
1
|
5
|
6055
|
|
POST
|
I have to ask, why wouldn't you edit a feature service instead of trying to use Editor?
... View more
05-21-2021
10:00 AM
|
0
|
1
|
3383
|
|
POST
|
There appears to be a potential issue with the relationships between the fields you mentioned in the three tables. One NUTS318CD value can have many LAD16CD (county) values. Because of this, you'll be putting multiple different participation values together for each NUTS3 code. Do you intend to sum or average the participation values? Alternatively, you would need to create multiple NUTS3 code features, each with a different participation value.
... View more
05-21-2021
09:54 AM
|
0
|
1
|
2278
|
|
POST
|
If using Python, I would use Dissolve. You can specify a Statistics Field with count, to count the number of dissolved points for each species (by name or id or whatever key field you have). Note that If theInput Featuresgeometry type is either point or multipoint andCreate multipart featuresis checked (MULTI_PARTin Python), the output will be a multipoint feature class. Otherwise, ifCreate multipart featuresis unchecked (SINGLE_PARTin Python), the output will be a point feature class. So this would give you a new output feature class with a count field you can symbolize on.
... View more
05-21-2021
09:41 AM
|
0
|
7
|
6062
|
|
POST
|
Why not just count the number of results (points) you get when querying the specific species before you create the polygon? Then you can add it as an attribute on the polygon graphic when you create it and symbolize with that.
... View more
05-21-2021
07:44 AM
|
0
|
10
|
6068
|
|
POST
|
It would be arcpy.env.workspace = r"\\[servername]\connections\dbconnection.sde" If you really are going to a database connected saved on a different server, you'll have to include a drive letter like arcpy.env.workspace = r"\\[servername]\c$\connections\dbconnection.sde"
... View more
05-21-2021
07:33 AM
|
0
|
1
|
3387
|
|
POST
|
This is what I did with 10.5.1 services. There's probably a better way now but I haven't revisited it. The undefined queryObject variable is your original query object. // Set record limit to match the service being queried
const maxRecordCount = 1000;
// Ensure only one value for outFields (changed at 10.6.1)
// When returnCountOnly and returnDistinctValues are true,
// more than one field specified in outFields is not supported.
let queryForCount = queryObject.clone();
if (queryForCount.outFields && queryForCount.outFields.length > 1) {
queryForCount.outFields = [queryForCount.outFields[0]];
}
let queryTask = new QueryTask({url: "urlForMyLayer"});
queryTask.executeForCount(queryForCount)
.then(function(queryRecordCount) {
if (queryRecordCount) {
// Build array of page steps and use to query the service
// as many times as necessary to retrieve all records.
const pageCount = Math.ceil(queryRecordCount / maxRecordCount);
let resultPages = [];
for (let i = 0; i < pageCount; i++) {
resultPages.push(i * maxRecordCount);
}
return Promise.all(resultPages.map(function(resultPageStart) {
queryObject.start = resultPageStart;
queryObject.num = maxRecordCount;
return queryTask.execute(queryObject);
}));
} else {
// No records to query; send back an Array with one empty FeatureSet
// to mimic the return from Promise.all()
console.log('No records to query');
return Promise.resolve([new FeatureSet()]);
}
})
.then(function(featureSets) {
// Combine all features into the first FeatureSet for return.
let returnFeatureSet = featureSets.pop();
featureSets.forEach(function(featureSet) {
Array.prototype.push.apply(returnFeatureSet.features, featureSet.features);
});
resolve(returnFeatureSet);
})
.catch(function(err) {
reject(err);
});
... View more
05-17-2021
08:32 AM
|
1
|
0
|
3946
|
|
POST
|
Using the ArcGIS API for JavaScript, it doesn't look like there's a filter method like the sample you linked to, but you could query the GeoJSON layer and display the query results. Alternatively, you could use plain JS to filter the GeoJSON object. let filteredFeatures = myFeatureCollection.features.filter(function (feature) {
return feature.properties.category == "Volcanoes";
});
... View more
05-17-2021
08:14 AM
|
0
|
0
|
5709
|
|
POST
|
You're not dynamically creating outpudata so it's trying to overwrite the same thing over and over. If that's not what you want, then you should be creating outpudata similarly to how you do in the loop before. Additionally, Outdir should not have that trailing underscore character when it's defined at the top unless you actually have a folder named "_". Where you're adding the rasters to the conversion list, try just adding a string as a file path to the raster instead of an arcpy raster object.
... View more
05-13-2021
10:29 AM
|
1
|
0
|
1830
|
|
POST
|
Again, ignore WAB for any custom JS apps. You don't need it running, you don't put the JS app in the WAB folder, and you don't call it with a WAB url. As @JeffreyWilkerson mentioned, you'll need to host this on a web server. The same server you have WAB on probably also has IIS (the thing you need to make your server a web server). Copy the folder with your JS app files (html, js, etc) into ..\inetpub\wwwroot Then you get your your app at https://myDomain.com/myAppFolder
... View more
05-12-2021
07:23 AM
|
1
|
0
|
5557
|
|
POST
|
It's going to be very troublesome to try and use custom JavaScript in Web AppBuilder. WAB is meant to build apps that don't need intense knowledge of the JS API. Depending on the thing, you might be able to make a custom widget. If you want to reproduce an app from a sample using pure JavaScript, you'll need to create that outside of WAB. Get started | ArcGIS API for JavaScript For that sanfrancisco-buildings app, you should be able to download all those source files, change any necessary service urls and API keys, and host it on your own web server. Again, WAB would not be needed.
... View more
05-11-2021
07:26 AM
|
1
|
1
|
5586
|
|
POST
|
Try logging the query results before you start looping so you can verify if there are actually any features where MICROFILM != "UNKNOWN"
... View more
05-10-2021
02:54 PM
|
0
|
0
|
5513
|
|
POST
|
You could probably benefit from cleaning up your indentation to keep track of your scopes. It looks like the return statement for getMicroFilms() is inside the forEach() loop; meaning it will kick out after checking the first feature in the FeatureSet. This is probably what you want the function to look like. function getMicroFilms () {
view.map.layers.forEach((layer) => {
if (layer.visible === true && layer.type != "graphics") {
const query = {
geometry: queryGeometry,
outFields: ["*"]
};
layer.queryFeatures(query).then((results) => {
results.features.forEach((feature) => {
if (feature.attributes.MICROFILM != "UNKNOWN") {
microFilms.push(feature.attributes.MICROFILM);
}
});
console.log(microFilms.filter(onlyUnique));
});
}
});
return microFilms;
}
... View more
05-10-2021
01:22 PM
|
0
|
2
|
5524
|
|
POST
|
It would show up in the yellow warning icon next to the input. You could also print it out with arcpy.AddMessage() but you have to comment out enough code to get it to run so you can see the message in the geoprocessing results.
... View more
05-04-2021
02:19 PM
|
0
|
0
|
3884
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 4 weeks ago | |
| 1 | 10-23-2025 03:53 PM | |
| 1 | 04-28-2026 07:25 AM | |
| 1 | 03-19-2026 08:59 AM | |
| 1 | 02-12-2026 01:37 PM |