POST
|
IMapServer3 mp = (IMapServer3)this.serverObjectHelper.ServerObject;
object[] name = new object[1];
object[] values = new object[1];
mp.DocumentInfo.GetAllProperties(out name[0], out values[0]);
object[] nameList = (object[])name[0];
object[] valueList = (object[])values[0]; it's the property 'keywords'
... View more
07-15-2021
10:45 AM
|
0
|
0
|
917
|
POST
|
Hi, AlvaroA The Fields object passed to the relAttrFields parameter should not be an object retrieved from another class. If the new class is going to have the same fields as an existing class, cast the existing class' fields collection to the IClone interface, clone it, and use the cloned fields collection as input for this method. Can be help you ?
... View more
07-15-2021
09:35 AM
|
1
|
1
|
866
|
POST
|
get IServerObjectHelper in init The server object helper implements a weak reference on a server object such that a server object extension can keep a string reference on the server object helper (for example, in a member variable) and avoid keeping a strong reference on the server object itself.
... View more
06-09-2021
06:24 AM
|
0
|
1
|
1336
|
POST
|
I also advide this link https://developers.arcgis.com/enterprise-sdk/guide/net/design-philosophy-for-arcgis-enterprise-sdk-net/
... View more
06-09-2021
06:10 AM
|
0
|
0
|
1510
|
POST
|
In c# you can deserialize: https://community.esri.com/t5/arcgis-enterprise-extensibility/soi-returning-pbf/td-p/1049024
... View more
06-07-2021
01:01 AM
|
0
|
0
|
1257
|
POST
|
try edit/view csproj because soe doesn't need this dll. when have you installed ags have you select '.NET support extension' ? You can see in Control Panel\All Control Panel Items\Programs and Features select arcgis and unistall/change and modify and next ...
... View more
06-06-2021
08:11 AM
|
0
|
0
|
1085
|
POST
|
SOE and SOI developed with Enterprise sdk always are ok after last ArcGIS Enterprise 10.9.x, part of the ArcGIS 2021 releases. You cannot use SOE and SOI developed with ArcObjects .NET/Java SDK in version released after last ArcGIS Enterprise 10.9.x, part of the ArcGIS 2021 releases because the ArcGIS 2022 releases of ArcGIS Enterprise will only contain the ArcGIS Pro-based runtime Removal of ArcMap-based runtime from ArcGIS Enterprise (esri.com)
... View more
06-06-2021
07:57 AM
|
1
|
2
|
1528
|
POST
|
Ciao Gianni, The FeatureCollection is an encoding of feature geographic and attribute data structures using the Protocol Binary Format (PBF). Notably, the FeatureCollection is an alternative encoding of a FeatureSet, ESRI's JSON encoding of Feature objects. Not only are FeatureCollections serialized differently through the use of a new binary specification, but they also have fundamental structural differences that developers will need to account for. here you can see the initial specification arcgis-pbf/proto/FeatureCollection at main · Esri/arcgis-pbf · GitHub you can generate your class in for example c# protoc.exe FeatureCollection.proto --csharp_out=C:/Temp/Scratch/out --proto_path=c:/Temp/Scratch/pbf you can download protoc.exe here Release Protocol Buffers v3.17.2 · protocolbuffers/protobuf · GitHub FeatureCollection.proto ( https://raw.githubusercontent.com/Esri/arcgis-pbf/main/proto/FeatureCollection/FeatureCollection.proto ) then with your class generated you can write similar code to deserialize pbf: FeatureCollectionPBuffer f = (File.ReadAllBytes(@"C:\Temp\Scratch\pbf\query")).ToObject<FeatureCollectionPBuffer>();
public static T ToObject<T>(this byte[] buf) where T : IMessage<T>, new()
{
if (buf == null)
return default(T);
using (MemoryStream ms = new MemoryStream())
{
ms.Write(buf, 0, buf.Length);
ms.Seek(0, SeekOrigin.Begin);
MessageParser<T> parser = new MessageParser<T>(() => new T());
return parser.ParseFrom(ms);
}
}
... View more
06-06-2021
07:37 AM
|
1
|
1
|
2270
|
POST
|
you can write similar code to randomize path for every task generate intermediate raster static Random random = new Random();
internal static char GetLetter()
{
// This method returns a random lowercase letter.
// ... Between 'a' and 'z' inclusize.
int num = random.Next(0, 26); // Zero to 25
char let = (char)('a' + num);
return let;
}
IHydrologyOp2 hydrologyOp = new RasterHydrologyOpClass();
IRasterAnalysisEnvironment rasterAnalysisEnvironment = hydrologyOp as IRasterAnalysisEnvironment;
rasterAnalysisEnvironment.DefaultOutputRasterPrefix = Helper.GetLetter() + (Guid.NewGuid().ToString("N")).Substring(0, 3);
so you have : C:\Users\user\AppData\Local\Temp\1\XXXX5694\ (XXXX string random)
... View more
04-02-2021
06:48 AM
|
0
|
0
|
819
|
POST
|
In help you need see class that implement the interface IFeatureClassName You can write similar code: IMapServer mapServer = (IMapServer)serverObjectHelper.ServerObject;
string mapName = mapServer.DefaultMapName;
IMapServerDataAccess dataAccess = (IMapServerDataAccess)mapServer;
IFeatureClass sourceFeatureClass = (IFeatureClass)dataAccess.GetDataSource(mapName, 0);
IDataset sourceDataSet = (IDataset)sourceFeatureClass;
IWorkspace sourceWorkspace = sourceDataSet.Workspace;
IFeatureDataConverter featureDataConverter = new FeatureDataConverterClass();
IWorkspaceFactory targetWorkspaceFactory = new ShapefileWorkspaceFactory();
IWorkspace targetWorkspace = targetWorkspaceFactory.OpenFromFile($@"c:\temp", 0);
IDataset targetWorkspaceDataset = (IDataset)targetWorkspace;
IName targetWorkspaceDatasetName = targetWorkspaceDataset.FullName;
IWorkspaceName targetWorkspaceName = (IWorkspaceName)targetWorkspaceDatasetName;
IFeatureClassName shpFeatureClassName = new FeatureQueryNameClass();
IDatasetName shpDatasetName = (IDatasetName)shpFeatureClassName;
shpDatasetName.WorkspaceName = targetWorkspaceName;
shpDatasetName.Name = $"Test_{Guid.NewGuid()}";
int shapeFieldPosition = sourceFeatureClass.FindField(sourceFeatureClass.ShapeFieldName);
IFields inputFields = sourceFeatureClass.Fields;
IField shapeField = inputFields.get_Field(shapeFieldPosition);
IGeometryDef geometryDef = (IGeometryDef)((IClone)shapeField.GeometryDef).Clone();
IFields outFields = (IFields)((IClone)sourceFeatureClass.Fields).Clone();
featureDataConverter.ConvertFeatureClass((IFeatureClassName)sourceDataSet.FullName, null, null, shpFeatureClassName, geometryDef, outFields, "", 1000, 0);
... View more
03-17-2021
01:03 PM
|
1
|
0
|
2507
|
POST
|
If you want use sdk you can use FeatureDataConverter class ( FeatureDataConverter Class (arcgis.com) ) - create a scratch file gdb (try and see if you can use ProConcepts DDL · Esri/arcgis-pro-sdk Wiki · GitHub ) or use a template gdb empty on server - use method convertfeatureclass ( IFeatureDataConverter2 Interface | ArcGIS Enterprise SDK ) - zip gdb - download file (see this samples arcgis-enterprise-sdk-resources/Samples/dot net/SOE/DownloadFileRESTSOE at master · Esri/arcgis-enterprise-sdk-resources · GitHub )
... View more
03-10-2021
04:03 AM
|
2
|
2
|
2548
|
POST
|
see also ProConcepts DDL · Esri/arcgis-pro-sdk Wiki · GitHub
... View more
03-10-2021
03:37 AM
|
0
|
0
|
2138
|
POST
|
if can be useful you can see my soe https://github.com/nicogis/Factory-Utilities-SOE here you have an operation ('ExtractData') https://github.com/nicogis/Factory-Utilities-SOE/blob/37f3a4868d85435bf03cb3b6648a1a7dedccae40/FactoryUtilities.cs#L218 where if you can pass a featureset from client you can select parameter dataFormat (SHAPEFILE) to dowload file zipped
... View more
03-09-2021
08:08 AM
|
1
|
0
|
2566
|
Title | Kudos | Posted |
---|---|---|
1 | 06-20-2024 11:20 AM | |
1 | 05-25-2017 10:11 AM | |
1 | 06-20-2023 12:09 AM | |
1 | 10-14-2022 05:14 AM | |
1 | 06-14-2023 02:00 AM |
Online Status |
Offline
|
Date Last Visited |
06-20-2024
07:25 PM
|