POST
|
Hi Uma, What about MSHA help file to view it in Microsoft Help Viewer? Will it be provided in the future or you plan to provide CHM only? It is more convinient to view all help in one place.
... View more
02-10-2017
12:41 AM
|
0
|
0
|
1496
|
POST
|
I've noticed that some items in the PROJECT pane has white text on mouse over while others has dark blue text. Looks like a bug. Also, as you can see, items with dark blue text on hover have different rectangle of highlighting (it is smaller and has margin). Items with artifacts are Save, Save As, Options, Help, Exit.
... View more
02-09-2017
09:27 PM
|
0
|
3
|
1514
|
POST
|
Maybe EditCompletedEventArgs.Members is an empty collection if edit session is cancelled?
... View more
02-08-2017
06:57 AM
|
0
|
1
|
956
|
POST
|
Hi Thomas, Of course I am seeing errors: Your input raster is placed in \\dom.example\data\snow. So why do you try to use C:\Temp as a value for the workspace environment variable? This variable must be set to location where your rasters are placed as I wrote in my previous comment. Expression must not contain full paths of input rasters. You specify path to them in workspace environment variable. Expression should contain only names of input rasters (optionally with band name). So the right version of your code is: var expression = "\"sd_20170201\" * 10000";
var outputRaster = @"C:\Temp\out_from_rc";
var parameters = Geoprocessing.MakeValueArray(expression,
outputRaster);
var workspace = @"\\dom.example\data\snow";
var environments = Geoprocessing.MakeEnvironmentArray(workspace: workspace);
var gpResult = await Geoprocessing.ExecuteToolAsycn("RasterCalculator",
parameters,
environments,
CancelableProgressor.None); I've tested this code with input ESRI GRID raster stored in remote directory and succesfully created output raster with it.
... View more
02-07-2017
06:38 PM
|
0
|
1
|
2172
|
POST
|
Please format your code snippet. It is quite difficult to work with code without syntax highlighting.
... View more
02-03-2017
07:56 PM
|
0
|
0
|
682
|
POST
|
Hi Thomas, You want to use Raster Calculator tool in your .NET code, is it correct? If yes I see no problems to do this: var expression = "\"tmp.png\\Band_1\" * 10";
var outputRaster = @"D:\tmp\out_from_rc";
var parameters = Geoprocessing.MakeValueArray(expression,
outputRaster);
var workspace = @"D:\tmp";
var environments = Geoprocessing.MakeEnvironmentArray(workspace: workspace);
var gpResult = await Geoprocessing.ExecuteToolAsync("RasterCalculator",
parameters,
environments,
CancelableProgressor.None); I succesfully created out_from_rc raster dataset with this code. It seems that you've missed to set workspace environment variable. It should be set to location where your rasters are placed. P.S. Very often validation in text boxes occurs only on text box lost keyboard focus. It is standard practice and there is really nothing unusual in this behavior. So if you type some invalid expression, click outside of the text box (now red circle with X will appear), then return to text box and correct your expression, red circle with X will not disappear until the text box lost keyboard focus. It is normal.
... View more
02-03-2017
07:42 PM
|
0
|
3
|
2172
|
POST
|
Thank you, Wolfgang. I will be waiting for the next Pro SDK release
... View more
02-01-2017
10:50 PM
|
0
|
0
|
1940
|
POST
|
Hi Wolfgang, But how can I create a feature class template with corrected fields if there is no possibility to specify fields collection in Create Feature Class tool? What you've suggested is: to create a feature class with corrected fields I need create feature class with corrected fields. It's recursion! Well, it seems that there is no good solution for the described task at now. I hope that Pro SDK team will do something to make SDK more flexible and appropriate for such common tasks as creation of feature class with specified fields. I'm not a fan of the conception that all DDL operations must be performed through geoprocessing. But it seems that this decision of the Pro SDK team will not be changed... At least can you provide a tool that will be able to add multiple fields at once in the next release of SDK (something like Add Fields)?
... View more
02-01-2017
07:04 PM
|
0
|
2
|
1940
|
POST
|
Hi Wolfgang, Thanks for reply. I wrote: Now let's imagine that you develop a tool that takes FGDB feature class, does some magic with its features and writes result to shapefile. So you need to use FGDB feature class as a template for a new shapefile. Shapefile doesn't allow field names longer than 10 characters so shapefile cannot be created with fields that violate this rule. In addition to this scenario I can provide another one: FGDB feature class with a GUID field used as a template for a new shapefile. You will get an error from Create Feature Class tool (ERROR 999999: Error executing function) since fields of this type are not supported by shapefiles. Tools like Feature Class to Feature Class and Feature Class to Shapefile are not an option. I need to create new feature class rather than transfer existing feature class to the new destination. I can provide many real scenarios where fields must be processed somehow prior to create feature class with them. The point of my post is the ability to specify fields need to be exist in the ArcGIS Pro SDK. Even if Create Feature Class tool will not fail on scenarios described above the problem will remain for some tasks. Example of such task: you need to create mapping between input fields and output fields. If Create Feature Class tool will automatically correct field names it will be impossible in general to determine origin fields for the fields in new feature class since: output field names differ from the input ones; there is no guarantee that order of fields in output feature class is the same as in the input one. I believe that creation of an empty feature class and then adding fields one by one with Add Field tool is bad solution. Is it recommended workflow for described task?
... View more
01-30-2017
07:02 PM
|
0
|
4
|
1940
|
BLOG
|
Thanks Charles for the link. It is what I need. Waiting to see these pictures in the API Reference.
... View more
01-30-2017
06:18 PM
|
0
|
0
|
560
|
BLOG
|
Thank you Christopher for info. Waiting for a future release
... View more
01-30-2017
06:17 PM
|
0
|
0
|
560
|
POST
|
Wiki page on the ArcGIS Pro SDK github states that all schema creation and modification operations such as creating tables and feature classes, creating and modifying fields, enabling attachments, and so on, need to be performed using the Geoprocessing API. Now let's imagine that you develop a tool that takes FGDB feature class, does some magic with its features and writes result to shapefile. But you want the output feature class will have exactly the same fields as the input one. OK, you are going to use Create Feature Class geoprocessing tool for that, passing the input feature class as template parameter. But if input fields contains those which name consist of more than 10 characters, you will get an error. Is it possible to take input fields, correct them (or do any other actions) and pass modified fields to the method that creates a feature class? The only workaround I see now is to create feature class without template and then add each field one by one with Add Field geoprocessing tool. But it is obviously bad solution since it is very slow when working with a lot of fields. It is sad to know that DDL in ArcGIS Pro SDK is much less flexible than in ArcObjects
... View more
01-30-2017
04:00 AM
|
1
|
6
|
3745
|
IDEA
|
There are no built-in methods in ArcObjects to perform grouping of rows/features. It is common task in table processing so it is strange to me that this functionality is missed. To implement grouping developers can use at now following approaches: IQueryFilterDefinition.PostfixClause IQueryFilter queryFilter = new QueryFilterClass
{
PostfixClause = "GROUP BY SOME_FIELD"
};
ICursor cursor = table.Search(queryFilter, true); But: this works only for GDBs; you need manually determine where current group ends and starts another one (in other words, you need track changings of field's value while iterating by cursor); it is unable to perform custom grouping, for example, based on some spatial criteria. ITableSort You can sort rows with ITableSort and then iterate through records to form groups. But: ITableSort has some limitations: it can't be used to sort tables without an ObjectID field; it can't be used to perform custom sorting based on some spatial criteria. as with first approach you need track changings of field's value while iterating by cursor to determine end of each group. It would be great if you provide a way to group table data in ArcObjects with following key features: iterating by groups, so it will be easy to know their bounds; grouping by multiple fields; support for shapefiles and tables without an ObjectID field; ability to use custom grouping logic. It can be something like that: public class CustomTableGroup : ITableGroupCallBack
{
public bool IsNewGroup(int[] fieldIndicies, object[] currentValues, object[] newValues)
{
// determine here if passed newValues start a new group
}
}
// ...
ITableGroup tableGroup = new TableGroupClass
{
Table = table,
Fields = "field1, field2, field3",
Group = new CustomTableGroup()
};
// ...
IGroupCursor groupCursor = null;
try
{
groupCursor = tableGroup.Group();
for (IGroup group; (group = groupCursor.NextGroup()) != null;)
{
// indices of the fields to group by
int[] fieldIndices = group.FieldIndices;
// values of the fields to group by for the current group
object[] fieldValues = group.FieldValues;
// iterate through the group
ICursor cursor = null;
try
{
cursor = group.Rows;
for (IRow row; (row = cursor.NextRow()) != null;)
{
// do something
}
}
finally
{
if (cursor != null)
Marshal.ReleaseComObject(cursor);
}
}
}
finally
{
if (groupCursor != null)
Marshal.ReleaseComObject(groupCursor);
}
... View more
01-28-2017
09:01 PM
|
2
|
0
|
829
|
IDEA
|
In ArcObjects there is possibility to perform custom sorting using ITableSortCallBack: public class CustomTableSort : ITableSortCallBack
{
public int Compare(object value1, object value2, int fieldIndex, int fieldSortIndex)
{
// Do something
}
}
ITableSort tableSort = new TableSortClass
{
Table = ...,
Fields = ...,
Compare = new CustomTableSort()
}; But unfortunately geometries are not passed to the Compare method. So now there is no easy way to perform custom sort by some spatial criteria out-of-the-box. Developers need write their own sorting algorithms since they cannot use built-in ITableSort interface in this case. It would be great if this limitation of the ITableSortCallBack will be removed.
... View more
01-28-2017
01:05 AM
|
1
|
0
|
494
|
Title | Kudos | Posted |
---|---|---|
1 | 09-25-2018 09:14 AM | |
1 | 11-20-2017 12:35 PM | |
1 | 02-16-2017 08:55 PM | |
1 | 11-18-2017 06:15 AM | |
1 | 01-13-2017 07:15 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|