|
POST
|
I think this is actually a bug. Here's a distinct query on a 10.5.1 service that returns 881 records with count but 534 without count. A similar query on a 10.6.1 service returns the same number of distinct records with and without count. Doesn't seem to matter if I do executeForCount or resultRecordCount.
... View more
10-02-2018
09:33 AM
|
0
|
2
|
2500
|
|
POST
|
Interesting approach, thanks. My feature layer (hosted at 10.5.1) doesn't have a maxRecordCount property. It doesn't even have a capabilities property. Any thoughts on that? After posting I got something that I think works. Besides the fact it doesn't work with returnDistinctValues (as I mentioned before), I'm not sure how I feel about it. var maxRecordCount = 1000;
var queryTask = new QueryTask();
queryTask.url = 'http://server/arcgis/rest/services/ServiceName/MapServer/0';
var queryParams = new Query({
returnGeometry: false,
outFields: ['someFieldName'],
where: 'someFieldName is not null',
});
queryTask.executeForCount(queryParams)
.then(function(queryRecordCount) {
var pageCount = Math.ceil(queryRecordCount / maxRecordCount);
var resultPages = [];
for (var i = 0; i < pageCount; i++) {
resultPages.push(i * maxRecordCount);
}
return Promise.all(resultPages.map(function(resultPageStart){
queryParams.start = resultPageStart;
queryParams.num = maxRecordCount - 1;
return queryTask.execute(queryParams);
}))
})
.then(function(featureSets) {
// collect features from each FeatureSet
var features = [];
featureSets.forEach(function(featureSet) {
features = features.concat(featureSet.features);
})
// do something with array of features
})
.catch(function(err) {
console.error(err);
});
... View more
10-01-2018
02:58 PM
|
0
|
1
|
1694
|
|
POST
|
I tried searching but was surprised to not find any good results. Does anyone have a coding pattern to handle "paging" through a large query that exceeds the service's maxRecordCount property? I'd like to find a way to query the record count first, then build a bunch of query tasks with varying start and num properties to retrieve all the results. Promise.all() seems like it'd be what's needed but I can't quite wrap my head around how to make it all work. Here's my related question regarding distinct values that started this.
... View more
10-01-2018
11:46 AM
|
0
|
3
|
2173
|
|
POST
|
My goal is to query the resultRecordCount with returnDistinctValues = true with one output field. Reason is because the result is sometimes more than 1000 and I need to paginate the queries and I can't do that without knowing the total number of distinct results. However, it seems that resultRecordCount is ignoring the returnDistinctValues parameter and counting everything. Is there another way I can count distinct records? Maybe with some trickery using outStatistics or groupByFieldsForStatistics? I'm on ArcGIS Enterprise 10.5.1 calling REST MapServer through ArcGIS API for JavaScript 4.7.
... View more
09-27-2018
04:53 PM
|
0
|
4
|
2935
|
|
IDEA
|
It would be nice to be able to set the primary display field of a feature class or table at the geodatabase level so all sources automatically pick it up. From ArcMap and ArcGIS Pro to ArcGIS Enterprise Server and ArcGIS Online. Similar to field or alias names or domains.
... View more
07-27-2018
08:25 AM
|
23
|
7
|
3660
|
|
POST
|
The Esri support tech I spoke with did not show me this technical article. This looks like a better solution, thank you for posting. EDIT: I just tested the isNotSpatialView() function for Oracle and it isn't reliable. At least in our 10.5.1 enterprise geodatabase on 12c. Almost none of our spatial views are actually registered with the database in the user_views table so it doesn't validates correctly.
... View more
07-12-2018
08:32 AM
|
1
|
0
|
8598
|
|
POST
|
The limit for Oracle is 1000. I think SQL Server is in the tens of thousands (less than 60,000). I did see an interesting workaround by just splitting it up into two IN clauses: Where Col IN (123,1234,222,....)
or Col IN (456,878,888,....) If you have thousands of values, you might consider just making a table for comparison. Where Col IN (Select val_col from values_table)
... View more
06-26-2018
01:24 PM
|
1
|
0
|
2068
|
|
POST
|
You posted in the GeoNet Resource Hub. Tagging Analysis and Geoprocessing for better visibility.
... View more
06-26-2018
11:01 AM
|
0
|
0
|
2314
|
|
POST
|
You could either set up Web Adaptor and configure with integrated Windows authentication or get a token with user name and password in Python: #A function to generate a token given username, password and the adminURL.
def getToken(username, password, serverName, serverPort):
# Token URL is typically http://server[:port]/arcgis/admin/generateToken
tokenURL = "/arcgis/admin/generateToken"
# URL-encode the token parameters
params = urllib.urlencode({'username': username, 'password': password, 'client': 'requestip', 'f': 'json'})
headers = {"Content-type": "application/x-www-form-urlencoded", "Accept": "text/plain"}
# Connect to URL and post parameters
httpConn = httplib.HTTPConnection(serverName, serverPort)
httpConn.request("POST", tokenURL, params, headers)
# Read response
response = httpConn.getresponse()
if (response.status != 200):
httpConn.close()
print "Error while fetching tokens from admin URL. Please check the URL and try again."
return
else:
data = response.read()
httpConn.close()
# Check that data returned is not an error object
if not assertJsonSuccess(data):
return
# Extract the token from it
token = json.loads(data)
return token['token']
#A function that checks that the input JSON object
# is not an error object.
def assertJsonSuccess(data):
obj = json.loads(data)
if 'status' in obj and obj['status'] == "error":
print "Error: JSON object returns an error. " + str(obj)
return False
else:
return True
... View more
06-25-2018
05:40 PM
|
0
|
0
|
2889
|
|
POST
|
Thank you all for sharing your thoughts and providing the helpful links. I will take some time to review all the content and discuss with our organization.
... View more
06-25-2018
05:24 PM
|
0
|
0
|
2006
|
|
POST
|
Our organization is a city in a large metropolitan area. We get aerial imagery flown every year that is 3 or 4 inch spatial resolution. This imagery is used by ArcMap users and web applications served from ArcGIS Enterprise 10.5.1. If anyone else is in a similar situation, I'd like to know your methodology for storage, oragnization, and access of the imagery. Currently, we store everything on a network drive, make mosaic datasets from the TIF tiles, then serve the mosaic datasets as image services for end users and web apps. Imagery and Remote Sensing
... View more
06-22-2018
03:08 PM
|
0
|
5
|
2137
|
|
POST
|
Looks I made a small mistake in putting the svc_lyr_response assignment inside the try/except. Try swapping lines 10 and 11, hopefully that reveals what's actually happening. ...
# Test availability of service
svc_lyr_response = urllib.urlopen(svc_lyr_url)
try:
... EDIT: Looks like I also made the same mistake with lines 20 and 21.
... View more
06-22-2018
08:44 AM
|
0
|
2
|
2889
|
|
POST
|
Example: Stop or start all services in a folder—ArcGIS Server Administration (Windows) | ArcGIS Enterprise You'll make a Python script to stop/start the services you want and then schedule that Python script to run at your desired time with Windows Task Scheduler.
... View more
06-18-2018
10:13 AM
|
2
|
3
|
4407
|
|
POST
|
Both of those SSDs you listed are "PCIe NVMe Class 50" so they're going to be about the same (top of the line for Dell). Not sure what we're supposed to be comparing here. For CPU, you should still consider clock speed as an important factor. The multithreaded nature of ArcGIS Pro makes multiple cores relevant, but it's only part of the story. If you're not doing 3D stuff, you're probably wasting your money on dual graphics cards. You can always add a second one later! Finally, 3TB seems absurd for memory. I didn't even know you could get a computer with that much memory! An your storage drive is "only" 1TB...
... View more
06-18-2018
09:22 AM
|
0
|
2
|
1260
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | a month 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 |