|
POST
|
Hi, Have you tried like this: <Image Source="/your_config_name;component/Images/trekk.png"/>
... View more
12-06-2021
10:23 PM
|
0
|
0
|
2774
|
|
POST
|
Hi, The faster way is to create shapefile and write to it without EditOperation. It could be done using CreateRowBuffer from FeatureClass. More info here: https://github.com/Esri/arcgis-pro-sdk/wiki/ProSnippets-Geodatabase
... View more
12-01-2021
07:09 AM
|
0
|
0
|
4009
|
|
POST
|
Hi, There is better way. You can use Feature Class To Feature Class geoprocessing tool. You can set SQL expression for it. But expression you need to form by yourself, From spatial query read each row OBJECTID and form expression like this: OBJECTID in (.....)
... View more
11-30-2021
12:16 PM
|
0
|
3
|
4245
|
|
POST
|
Hi, You need to select features using spatial filter first and then use geoprocessing. Most of geoprocessing tools checks automatically for layer selection. SpatialQueryFilter filter = new SpatialQueryFilter();
// define filter patameters
layer.Select(filter);
// Call geoprocessing using layer as input parameter
... View more
11-30-2021
08:09 AM
|
0
|
5
|
4260
|
|
POST
|
Hi, I use the following code to get raster layer path: return QueuedTask.Run<string>(() =>
{
try
{
string fullSpec = string.Empty;
CIMDataConnection dataConnection = pLayer.GetDataConnection();
if (dataConnection is CIMStandardDataConnection)
{
CIMStandardDataConnection dataSConnection = dataConnection as CIMStandardDataConnection;
string sConnection = dataSConnection.WorkspaceConnectionString;
var wFactory = dataSConnection.WorkspaceFactory;
if (wFactory == WorkspaceFactory.Raster)
{
string sWorkspaceName = sConnection.Split('=')[1];
string sTable = dataSConnection.Dataset;
fullSpec = Path.Combine(sWorkspaceName, sTable);
}
}
return fullSpec;
}
catch (Exception ex)
{
System.Diagnostics.Debug.WriteLine(ex.ToString(), System.Reflection.Assembly.GetExecutingAssembly().FullName);
return string.Empty;
}
}); It works for file based rasters and Esri GRIDs. I don't check how it works with sde stored rasters
... View more
11-30-2021
07:55 AM
|
1
|
0
|
1821
|
|
POST
|
Hi, You can MosaicRule on ImageServiceLayer: // Get the mosaic rule of the image service.
CIMMosaicRule mosaicRule = imageServiceLayer.GetMosaicRule();
// Set the mosaic method to be Center.
mosaicRule.MosaicMethod = RasterMosaicMethod.Center;
// Update the image service with the changed mosaic rule.
imageService.SetMosaicRule(mosaicRule); I have tried and it works. Another one thing I have found in https://github.com/Esri/arcgis-pro-sdk/wiki/ProConcepts-Map-Authoring#working-with-mosaic-layers Similarly, an image service layer that is part of a mosaic layer can be distinguished from other image service layers by using the ImageMosaicSubLayer class. You could try to investigate ImageMosaicSubLayer functionality
... View more
11-18-2021
11:08 PM
|
0
|
0
|
1433
|
|
POST
|
Hi, I have used ArcGIS Pro sample https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Map-Authoring/AddRasterLayer code to load ImageServiceLayer. // Create a url pointing to the source. In this case it is a url to an image service
// which will result in an image service layer being created.
string dataSoureUrl = @"http://imagery.arcgisonline.com/arcgis/services/LandsatGLS/GLS2010_Enhanced/ImageServer";
// Note: A url can also point to
// 1.) An image on disk or an in a file geodatabase. e.g. string dataSoureUrl = @"C:\temp\a.tif"; This results in a raster layer.
// 2.) A mosaic dataset in a file gdb e.g. string dataSoureUrl = @"c:\temp\mygdb.gdb\MyMosaicDataset"; This results in a mosaic layer.
// 3.) A raster or mosaic dataset in an enterprise geodatabase.
// Create an ImageServiceLayer object to hold the new layer.
ImageServiceLayer rasterLayer = null;
// The layer has to be created on the Main CIM Thread (MCT).
await QueuedTask.Run(() =>
{
// Create a layer based on the url. In this case the layer we are creating is an image service layer.
rasterLayer = (ImageServiceLayer)LayerFactory.Instance.CreateLayer(new Uri(dataSoureUrl), myMap);
// Check if it is created.
if (rasterLayer == null)
{
ArcGIS.Desktop.Framework.Dialogs.MessageBox.Show("Failed to create layer for url:" + dataSoureUrl);
return;
}
// Validate the colorizer to see if the layer is colorized correctly.
if (!(rasterLayer.GetColorizer() is CIMRasterRGBColorizer))
ArcGIS.Desktop.Framework.Dialogs.MessageBox.Show("Colorizer does not match for layer created from url: " + dataSoureUrl);
}); After you can try to check rasterLayer is MosaicLayer and if it is trus cast rasterLayer to MosaicLayer
... View more
11-17-2021
10:53 PM
|
0
|
0
|
1442
|
|
POST
|
Hi, ArcGIS Pro SDK API Reference works today, but it takes about 2 minutes to rise up edit box to enter search content. The same situation is with ArcGIS 10.8 ArcObjects API reference. The issue comes with each new version of API reference. We reported about that and situation with current version was fixed but new versions of API have the same issue. P..s. There is possibility to download ArcGISProAPIReference.chm file from https://github.com/Esri/arcgis-pro-sdk/releases and have local API reference
... View more
11-15-2021
10:11 PM
|
0
|
0
|
1379
|
|
POST
|
Hi, I have found the same issue too and reported that issue to Esri support today. Waiting for the answer.
... View more
11-15-2021
07:31 AM
|
0
|
0
|
1409
|
|
POST
|
Hi, If you want to get Pro UI style in your add-in, you need to use ArcGIS Pro styles for window controls. It will take care of light and dark themes. In advance you can make your own style based on ArcGIS Pro style. For example: <Style x:Key="NewStyle" BasedOn="{StaticResource Esri_TextBlockRegular}" TargetType="{x:Type TextBlock}" >
<Setter Property="Height" Value="20"/>
<Setter Property="Margin" Value="10,0,0,5"/>
<Setter Property="Padding" Value="0"/>
</Style>
... View more
11-11-2021
10:20 PM
|
0
|
1
|
1888
|
|
POST
|
Hi, Have you read this article? Effects of raster terrain representation on GIS shortest path analysis You could try to implement author ideas using raster pixel value reading with ArcObjects
... View more
11-09-2021
12:24 AM
|
1
|
1
|
2730
|
|
POST
|
Hi, Look at Esri ArcObjects sample Edit event listener
... View more
11-05-2021
07:50 AM
|
0
|
0
|
1206
|
|
POST
|
Hi Tim, I use ArcGIS Pro 2.7.2. In ArcGIS Pro Trace geoprocessing tool works as expected and selects some network elements. I have copied Python script and placed it in my application, but I don't know how to get selection from it. I have checked all results of arcpy.tn.Trace and my selection must be in element number 2. My python script: result = arcpy.tn.Trace(traceNetworkDataset, "UPSTREAM", startPointsFC, None, "NO_DIRECTION", '', "EXCLUDE_BARRIERS",
"DO_NOT_VALIDATE_CONSISTENCY", "DO_NOT_IGNORE_BARRIERS_AT_STARTING_POINTS", "IGNORE_INDETERMINATE_FLOW",
None, None, "BOTH_JUNCTIONS_AND_EDGES", None, None, "SELECTION", "NEW_SELECTION", "CLEAR_ALL_PREVIOUS_TRACE_RESULTS", '',
"Trace_Results_Aggregated_Points", "Trace_Results_Aggregated_Lines", None, "DO_NOT_USE_TRACE_CONFIGURATION", '') Your scripts don't use selection but maybe you know how to get it?
... View more
10-19-2021
10:27 AM
|
0
|
2
|
7204
|
|
POST
|
Hi Ben, Have you succeeded with trace results? From ArcGIS Pro trace selects features what I need but from python I don't know how to make the same selection.
... View more
10-19-2021
07:16 AM
|
0
|
0
|
2031
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | Tuesday | |
| 1 | Tuesday | |
| 2 | 04-24-2026 08:33 AM | |
| 1 | 03-23-2026 11:44 AM | |
| 1 | 05-22-2024 11:48 PM |
| Online Status |
Online
|
| Date Last Visited |
Tuesday
|