|
POST
|
Hi @PhilipC , @MarkusBenninghoff , This might help you with publishing the GP tool into Portal: portalURL = "https:??gis.example.com?portal"
portalURL = portalURL.replace('??', '//')
portalURL = portalURL.replace('?', '/')
gis = GIS(url = portalURL, username = 'geop', password = '****', verify_cert = False) When trying to share a GP tool and analyzing it before publishing, the GP script is scanned to discover any project data. When this happens, every quoted string used in a Python variable or as an argument to a function is tested to see if it is a path to data that exists. Therefore, in the user's script, the Portal URL string is interpreted as a file path, hence deemed to be an invalid data source. By creating a string variable as "https:??gis.example.com?portal" and replacing the "?" with "/", the URL will be interpreted as a file path. I hope that helps. Mehdi
... View more
02-22-2021
05:27 PM
|
4
|
3
|
6551
|
|
POST
|
@DanielLewis , Try this, go to properties of the folder > Security > Share and try sharing the folder with Administrators first then try to create the datastore (ArcGIS Server Manger > Site > Data Stores > Register Folder). If it doesn't work, try to share with Everyone. Then register the folder. I hope that helps.
... View more
02-16-2021
12:03 AM
|
0
|
0
|
2183
|
|
IDEA
|
@DavidWheelock2 , There is already a tool (Overview Window) developed by esri (@Wolf , @UmaHarano ) in pro sdk which does similar functionality. Unfortunately it doesn't have any indicator yet but it's as easy as it is in ArcMap. Here's the link: https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Framework/MapControl you need to use Visual Studio to build the solution and install it. Cheers Mehdi
... View more
02-15-2021
10:51 PM
|
0
|
0
|
5323
|
|
POST
|
@Anonymous User , Then you need to use something similar to this: var ADA_id = split($feature.<your ADA field>, "-")[1]
If (Count(ADA_id ) == 4) {
return concatenate('ADA-000',ADA_id)
}
else {
If (Count(ADA_id ) == 3) {
return concatenate('ADA-0000',ADA_id)
}
else {
return ADA_id
}} ====================================================================== Please give a like if helpful and Accept as Solution if it's answered your query.
... View more
02-15-2021
07:16 PM
|
0
|
0
|
2514
|
|
POST
|
Hi @Anonymous User , In ArcGIS Pro, click on the feature class layer you want to add attribute rules to in TOC and then click Data tab > Attribute Rules in Design. In Attribute Roles windows you can add a Calculation Rule in Arcade like: concatenate('ADA-000',$feature.<your fc field>) I hope that helps. Cheers Mehdi ====================================================================== Please give a like if helpful and Accept as Solution if it's answered your query.
... View more
02-15-2021
05:49 PM
|
0
|
2
|
2523
|
|
POST
|
@Eugene , You can contact your country's esri support team or alternatively esri us support team.
... View more
02-14-2021
06:06 PM
|
0
|
0
|
776
|
|
POST
|
@DavidField , You can use element height and width to change the font size and legend size since LegendItem does not have fontSize property. ....
leg.fittingStrategy = "AdjustColumnsAndFont"
print(leg.elementHeight, leg.elementWidth)
40.57 75.59
leg.elementHeight = 20
leg.elementWidth = 40 This is the reference link for LegendElement:: https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/legendelement-class.htm Cheers Mehdi ====================================================================== Please give a like if helpful and Accept as Solution if it's answered your query.
... View more
02-09-2021
12:23 AM
|
1
|
0
|
2468
|
|
POST
|
@CassiePorter , I reckon the error is due to the following limitation from manager.overwrite: "3. The data file used to overwrite should be of the same format and filename as the original that was used to publish the layer 4." Anyway, I've created another script and tested successfully. It first truncates the existing buffered feature layer then appends the newly buffered ones. You just need to add/remove and update the attribute fields according to your feature layer fields. from arcgis.gis import GIS
from arcgis.features import use_proximity
from copy import deepcopy
gis = GIS("url", "username", "password")
# get the buffered feature layer
existing_Buffered_Points_item = gis.content.get("existing_Buffered_Points_item_id")
existing_Buffered_Points_layers = existing_Buffered_Points_item.layers
fLyr = existing_Buffered_Points_item.layers[0]
fset = fLyr.query()
template_hostedFeature = deepcopy(fset.features[0])
fLyr.manager.truncate()
flayer_rows = fset.sdf
#access the first layer in points_item
points_layer1 = points_item.layers[0]
# get the newly buffered item
points_buffer = use_proximity.create_buffers(points_layer1,
field='buffer',
units='meters',
output_name="Buffer_m")
new_buffered_points_item = gis.content.get(points_buffer.id)
new_fLyr = new_buffered_points_item.layers[0]
new_fset = new_fLyr.query()
new_fset_features = new_fLyr.query().features
new_flayer_rows = new_fset.sdf
features_to_be_added = []
for index, row in new_flayer_rows.iterrows():
new_feature = deepcopy(template_hostedFeature)
input_geometry = new_fset_features[index].geometry
output_geometry = geometry.project(geometries = [input_geometry],
in_sr = 3857,
out_sr = 3857,
gis = gis)
# assign the updated values
# update these based on your dataset
new_feature.geometry = output_geometry[0]
new_feature.attributes['OBJECTID'] = row['OBJECTID']
new_feature.attributes['Asset_ID'] = row['Asset_ID']
new_feature.attributes['Latitude'] = row['Latitude']
new_feature.attributes['Longitude'] = row['Longitude']
new_feature.attributes['Speed'] = row['Speed']
new_feature.attributes['Date'] = row['Date']
new_feature.attributes['BUFF_DIST'] = row['BUFF_DIST']
features_to_be_added.append(new_feature)
existing_Buffered_Points_layers[0].edit_features(adds = features_to_be_added)
print("The existing buffer feature layer is updated with new buffered features!") Cheers Mehdi ====================================================================== Please give a like if helpful and Accept as Solution if it's answered your query.
... View more
02-08-2021
09:29 PM
|
1
|
1
|
3892
|
|
POST
|
Hi @Wirescan , No sure exactly what you're trying to achieve. Is it possible to share your script?
... View more
02-08-2021
09:07 PM
|
0
|
1
|
2034
|
|
POST
|
Hi @ArthurGuerrero , The following links are about how line density works: https://pro.arcgis.com/en/pro-app/latest/tool-reference/spatial-analyst/how-line-density-works.htm https://desktop.arcgis.com/en/arcmap/10.3/tools/spatial-analyst-toolbox/line-density.htm you can find the Line Density tool in ArcGIS Pro / ArcMap from Spatial Analyst Tools > Density > Line Density I hope that helps.
... View more
02-03-2021
07:21 AM
|
0
|
0
|
500
|
|
POST
|
Hi @VictorZhou1 , Yes, it's possible to manage attachments in a feature layer using ArcGIS API for python. This link provides an example of how to use the attachment property. and the following link is the API reference: https://developers.arcgis.com/python/api-reference/arcgis.features.managers.html?highlight=attachments%20get_list and this link shows how to update/append a hosted feature layer: https://community.esri.com/t5/python-questions/append-to-hosted-feature-layer-from-local-gdb-python/m-p/1021670#M59691 I hope that helps. ====================================================================== Please give a like if helpful and Accept as Solution if it's answered your query.
... View more
02-02-2021
05:12 PM
|
0
|
1
|
1619
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 09-16-2021 09:38 PM | |
| 1 | 03-17-2024 06:09 PM | |
| 1 | 11-10-2020 04:59 PM | |
| 1 | 02-08-2021 09:29 PM | |
| 1 | 02-17-2021 04:47 PM |