|
POST
|
Yes. I think geocode services are configured like normal with the sources property.
... View more
01-13-2021
06:16 AM
|
1
|
0
|
2905
|
|
POST
|
You could still do the same thing using a feature layer and selection, omitting the where_clause parameter in FeatureClassToFeatureClass_conversion(). However, it's not needed in my example because the "selection" expression is taken care of with the where_clause parameter. Also, note the change in the except block. I included the actual error message so you can troubleshoot errors rather than getting the same generic message each time.
... View more
01-11-2021
08:50 AM
|
1
|
1
|
3574
|
|
POST
|
As @DanPatterson mentioned, your query looks off. You should be able to use the where_clause parameter of FeatureClassToFeatureClass_conversion(). That way you don't have to make a selection. Also, try using string format instead of the + operator. It's more reliable because it will convert data types on the fly as needed (in case your variable is a number instead of a string). import arcpy
arcpy.env.overwriteOutput = True
arcpy.env.workspace = "C:/Users/....."
try:
counties =["LAKE", "COOK", "DUPAGE", "KANE", "MCHENRY", "WILL"]
for k in counties:
arcpy.FeatureClassToFeatureClass_conversion(
in_features="lyr",
out_path="C:/Users/.....",
out_name="{}02.shp".format(k),
where_clause="COUNTY_NAM = '{}'".format(k)
)
except Exception as e:
print "An error occurred during creation\n{}".format(e)
... View more
01-11-2021
06:54 AM
|
1
|
3
|
3586
|
|
POST
|
Oh, you want field values, not field names? You'll have to query the FeatureLayer and then do something with the result. In your case, if you only want to display a single value from the first feature returned. Something like this maybe? And you don't need the layerview-create event listener for query. HINLayer.queryFeatures({
start: 0,
num: 1,
returnGeometry: false,
outFields: ["NLFID"],
})
.then(function(featureSet) {
let listContent;
if(featureSet.features.length > 0) {
listContent = featureSet.features[0].attributes.NLFID;
} else {
listContent = "There are no records in HINLayer";
}
document.getElementById("List").textContent = listContent;
});
... View more
01-08-2021
03:17 PM
|
2
|
0
|
5447
|
|
POST
|
The fields property of FeatureLayer will return an array of field objects, each having a field's properties. I found this only to be available once the FeatureLayer's layerview-create event has fired. featureLayer.on("layerview-create", function(event){
console.log(featureLayer.fields);
console.log(featureLayer.getField("NLFID"));
});
... View more
01-08-2021
11:45 AM
|
1
|
0
|
5457
|
|
POST
|
You can automate this process by iterating over each polygon with a search cursor.
... View more
01-07-2021
02:40 PM
|
1
|
0
|
4676
|
|
POST
|
I see you do have an extra indent in the two lines under print(fc)
... View more
01-07-2021
01:49 PM
|
1
|
1
|
12319
|
|
POST
|
Try setting the output location for project to a known folder location that exists on the server instead of script_path
... View more
01-07-2021
01:10 PM
|
1
|
1
|
5420
|
|
POST
|
I'm pretty sure arcpy.Project_management() is not compatible with in_memory workspace. Maybe while it's running as a GP service it gets run in such a manner and is erroring out.
... View more
01-07-2021
01:00 PM
|
2
|
3
|
5433
|
|
POST
|
It works pretty well. I integrated a buffer option into my sketch toolbar.
... View more
01-07-2021
09:44 AM
|
1
|
0
|
5151
|
|
POST
|
I just made my own sketch toolbar, similar to this sample.
... View more
01-07-2021
09:06 AM
|
1
|
2
|
5169
|
|
POST
|
Try formatting the date in the SQL when you query it. Here's your query string but formatted with Python multiline string. sqlString = """SELECT FORMAT([Timestamp], 'yyy-MM-dd HH:mm:ss.fff') as Timestamp,
[RecordedValue], [GradeName], [ApprovalName]
FROM {}
WHERE (SensorID = '{}')
AND (
Timestamp BETWEEN CONVERT(datetime, '{}') AND CONVERT(datetime, '{}')
)
ORDER BY Timestamp
""" .format(DB_TIMESERIES, senID, start, end) Sorry, I work with Oracle databases so I apologize if something in that syntax is slightly off.
... View more
01-07-2021
07:58 AM
|
2
|
1
|
2404
|
|
POST
|
Convert each section to a polygon just so it's easier to identify the extent of each one individually. Then pick one to be the template extent object of the fishnet extent and choose number_rows = 9 and number_columns = 9. Repeat that for each polygon section. You may need to clean up the edges a bit.
... View more
01-06-2021
02:15 PM
|
0
|
3
|
4691
|
|
IDEA
|
True. I meant it as you'd have to inspect their app and repurpose their code. Would be interesting to have a widget already available to configure for this purpose though.
... View more
01-06-2021
01:09 PM
|
0
|
0
|
7573
|
|
POST
|
I agree with @DanPatterson, it seems like you could use Fishnet with some combination of cell size, cell count, or extent.
... View more
01-06-2021
12:47 PM
|
0
|
0
|
4707
|
| 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 |