|
POST
|
I have an issue with arcgis-py3 clones. I just created a clone through the Python Command Prompt (through AGPs UI never worked for me!), and swapped the default environment to the newly created one. Then I made the attempt to update the arcgis package. conda update arcgis The result on a fresh environment is I went then to jupyterlab, trying to install jupyterlab-manager, which requires NodeJS. Hence, back to the command prompt and conda install nodejs The result is of course the same. The inconsistency persists. How can I avoid the inconsistencies, except from not trying to update or install anything? I am on ArcGIS Pro 2.9.0
... View more
06-22-2022
11:49 PM
|
0
|
6
|
3616
|
|
POST
|
@TanuHoque, yes, I am using Pro. The use case for my colleagues is e.g. a construction site. For whatever reason the colleague has to take all the existing buildings in the vicinity into consideration and she/he knows that we offer building polygons as a nation-wide feature layer at our portal. The colleague request the data through an addin as a feature service layer. The area of the mapview is at that point covering not only the closer area around the construction site, but actually the whole municipality (or worse: the whole country). It takes now a while to get, and visualize all the unnecessary building polygons, and the they clutter the mapview. To avoid exactly that, the colleague will most likely then go to the portal, define a bounding box and extract the data through the portal, to store the data locally, where they will be outdated after a short while. Of course, buildings might not be the best example, but you get the point. To provide my colleagues with an easy way to retrieve data from the portal, without knowing to much about the portal I wrote an addin, offering a little ui, where the user get all the publicly available geo-data (provided through our portal) . Here, the user has the possibility to use a map tool to define a bounding box, which I would like to use to limit the requested service layers to. Hence, the question about adding a &extent=minX, minY, maxX, maxY into the uri, when creating the service layer in Pro. I am aware of the possibilities the user has, once the data are in the map. What I want to do is to limit the data before they come into the map, and to avoid redundant, and/or outdated data laying around in all sort of project folders.
... View more
05-16-2022
05:31 AM
|
0
|
0
|
1676
|
|
POST
|
The ThemeLayer class contains already the GetItemInfoValue() method, but public virtual ItemInfoValue GetItemInfoValue()
{
string uri = Id;
Item portalItem = ItemFactory.Instance.Create(uri, ItemFactory.ItemType.PortalItem);
return new ItemInfoValue()
{
name = portalItem?.Name,
title = portalItem?.Name,
catalogPath = portalItem?.Path,
type = portalItem?.Type,
typeID = portalItem?.TypeID,
isContainer = "false" // is that correct?
};
} returned always null, as long as I was giving the url to the portal item, instead of simply handing the item id over. However, now my issue is that the items path value is not pointing at the service itself but at a directory, via the Rest api: "https://portal.com/fed/rest/services/folder/service_name/FeatureServer". As I see it the actual Feature Service would be found at : "https://portal.com/fed/rest/services/folder/service_name/FeatureServer/0". Now, that one I cannot access, since: ArcGIS REST Framework Home Error: The administrator has disabled the Services Directory. Code: 403 Usually, I create the layer I want to add from our portal by creating the uriString through: string curService = $"https://portal.com/portal/home/item.html?id={guid}"
LayerFactory.Instance.CreateLayer(new Uri(curService, UriKind.Absolute), activeMapView.Map, 0); and that's what I planned to have in the OnDrop() method. But, I never reach the method, because the end of the StartDrag() method leads to a warning-messagebox: Add data - Failed to add data: https://portal.com/fed/rest/services/folder/service_name/FeatureServer I would rather have the OnDrop() method doing the job of adding the items to the map. Currently it seems that the StartDrag() method is doing everything, which does not make sense, since it is immediately activated when dragging something, without even knowing where it is dragged to. Does that make sense?
... View more
05-11-2022
07:34 AM
|
0
|
0
|
1761
|
|
POST
|
Yes, I worked with both examples, the one you mentioned and the one for the Excel file drop.
... View more
05-10-2022
07:34 AM
|
0
|
2
|
1773
|
|
POST
|
I have a ListBox in a Dockpane from where I want to Drag/Drop items onto a Map. When starting the Drag the StartDrag method is triggered. However, neither OnDragOver or OnDrop is ever triggered thereafter. My XAML file has a reference to the DragDrop namespace and the ListBox is set as drag source xmlns:dragDrop="clr-namespace:ArcGIS.Desktop.Framework.DragDrop;assembly=ArcGIS.Desktop.Framework"
<ListBox x:Name="DataLayerList" ItemsSource="{Binding LayersFiltered, Mode=TwoWay}" dragDrop:DragDrop.IsDragSource="True" dragDrop:DragDrop.DragHandler="{Binding}"/> My ViewModel implements IDragSource and here is my Drag&Drop part. Where OnDragOver and OnDrop is never triggered when I pull an item from the ListBox onto a Map. private List<string> _dragLayerGuids;
public void StartDrag(DragInfo dragInfo)
{
IEnumerable sourceItems = dragInfo.SourceItems;
if (sourceItems == null)
{
return;
}
_dragLayerGuids = new List<string>();
foreach (ThemeLayer layer in sourceItems)
{
_dragLayerGuids.Add(layer.Id);
}
}
public override void OnDragOver(DropInfo dropInfo)
{
dropInfo.Effects = DragDropEffects.All;
}
public override void OnDrop(DropInfo dropInfo)
{
if (_dragLayerGuids != null)
{
AddService(_dragLayerGuids);
}
} What am I missing to make this work?
... View more
05-10-2022
02:39 AM
|
0
|
4
|
1801
|
|
POST
|
The geometry attributes calculation tool can be started by right-click on the attribute tables column header…
... View more
05-06-2022
01:36 PM
|
1
|
0
|
3308
|
|
POST
|
I take it your polygon is a multipart geometry... In the geoprocessing tools you find 'Multipart To Singlepart', did you try that to separate the multipart input features into singlepart features? You can then filter the singlepart features by their area and delete those you find not to fit your demands. If your question is only about on how to filter and delete features based on their attributes... The 'Select By Attributes' tool is your friend to specify your terms, then you simply delete the selection.
... View more
05-06-2022
05:04 AM
|
1
|
1
|
3378
|
|
POST
|
I expose my data as MapImage and Feature layers via Portal, and some of the users have been requesting the possibility to adjust the extent that's requested from the services. Hence, my thought was to provide a MapTool allowing the user to define a bounding box, and restrict the services to this extent. I do have the MapTool in place but realized thereafter that there is no (easy) way to set the extent of these two MapItemTypes. I went to the CIM, to see if the connections for any of the two layer types provide the possibility to set the extent, but again, I didn't see any possibility to do so. Next thought was to give the extent as a parameter when establishing the layer (LayerFactory.Instance.CreateLayer()), using an Uri like this one: https://our-maps.company.com/portal/home/item.html?id={service.Id}. But, simply adding a &extent=minX, minY, maxX, maxY only leads to that the requested layer does not exist. When I was trying to inspect the layer exposed through Portal, I used Python from within ArcGIS Pro, having a look at the values of the extent. One thing puzzled me a bit and that is that the extent coordinates have been returned in WGS84, even though the layers are all in UTM32N!? Now I wonder if it is at all possible to achieve want I want to do, to restrict the extent.
... View more
05-03-2022
12:10 PM
|
0
|
2
|
1753
|
|
POST
|
The solution to get to the thumbnail is to add the token of your current session to the thumbnail path. ArcGISPortal activePortal = ArcGISPortalManager.Current.GetActivePortal();
string sessionToken = activePortal.GetToken();
_thumbnail = $"{portalItem.ThumbnailPath}?token={_portalToken}";
... View more
04-19-2022
03:13 AM
|
0
|
0
|
2113
|
|
POST
|
I want to retrieve the thumbnail path of a layer at our enterprise portal, and while that is straight forward I have the challenge, that I cannot use the path returned https://our-portal.com/portal/sharing/rest/content/items/580d1a480196436fb7e2e1170466ba94/info/thumbnail/thumbnail1548171039005.png Because there I am getting an Error 403 (You do not have permissions to access this resource or perform this operation.). The layer itself I can create using string curService = $"https://our-portal.com/portal/home/item.html?id={guid}";
await QueuedTask.Run(() => LayerFactory.Instance.CreateLayer(new Uri(curService, UriKind.Absolute), activeMapView.Map, 0)); How can I connect to the thumbnail?
... View more
04-18-2022
08:20 AM
|
0
|
1
|
2147
|
|
POST
|
I even have this page bookmarked... 😉 Well, kudos to you, it works fine. I was just not expecting that there is no dedicated PortalQueryParameters method to aim at tags.
... View more
03-25-2022
11:38 AM
|
0
|
0
|
1519
|
|
POST
|
I am wondering if it is possible with the ArcGIS Pro SDK to retrieve a collection of tags used in an ArcGIS Enterprise Portal. Using the web interface of a portal I can do this basically at every corner. However, I could not find a way to get tags used on portal content, and I missed the way to query the portal for content by way of tags. It seems as there is the possibility to retrieve the collection of tags when using Python (https://support.esri.com/en/technical-article/000020473), but in C#...
... View more
03-24-2022
10:19 AM
|
0
|
2
|
1557
|
|
POST
|
I tried several times to get this part with the ItemTemplate and the namespace right, and failed every time. What usually happened was that the project ran, but my ListBox was not showing any content anymore.
... View more
03-14-2022
08:16 AM
|
0
|
0
|
2114
|
|
POST
|
I tried TwoWay before and it did not change the behaviour... Would be still interested in a solution for TwoWay binding. 🙂 I solved it now with OneWay binding. In need of a button to react on the users selection I implemented the button by referencing the ListBox and its SelectedItems property. <Button Content="Add selected data" Grid.Row="3"
VerticalAlignment="Bottom" HorizontalAlignment="Right" Margin="0,5"
Style="{DynamicResource Esri_Button}" Command="{Binding AddServiceCommand}"
CommandParameter="{Binding ElementName=DataLayerList, Path=SelectedItems}"/> That works without any problem and the custom command to execute the buttons functionality receives a collection of objects of type ThemeLayer.
... View more
03-14-2022
07:56 AM
|
0
|
2
|
2121
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 01-09-2026 01:54 AM | |
| 1 | 10-24-2022 01:23 AM | |
| 1 | 09-15-2021 01:21 AM | |
| 2 | 08-30-2022 04:31 AM | |
| 2 | 04-24-2024 04:23 AM |
| Online Status |
Offline
|
| Date Last Visited |
05-08-2026
05:14 AM
|