what methods are supoorted by the ArcGis runtime version 100.1

1189
5
07-28-2017 01:15 AM
ManelKEDDAR
New Contributor III

Hello ,

Hope i ll find an answer , making researches on ArcGis runtime version 100.1 so we can decide if it's possible to move our software to the runtime version 100.1 or no , so i have the following questions :

if i use a local Geodatabse (.geodatabse) file , is it possible to edit the featureTables ? because when i try table.CreateFeature(IEnumerable<KeyValuePair<String, Object>>, Geometry) it says that the :The specified method is not supported.

the second this : is the edition supported cause when i try await table.AddFeatureAsync(feature); i have an exception An internal geodatabase error.: Create is not supported on the table ?

when i use (.slpk),

if i'll try to display ArcGISSceneLayer on a sceneView is it supported ?

how about editing a 3D geometry ?

Thank you for clarifying things to me so i can make a decision

cheers

0 Kudos
5 Replies
dotMorten_esri
Esri Notable Contributor

It is possible to edit feature tables in local databases, provided you have the right license level and the data allows editing. Could you share a little detail about how you're calling that method and how the data was generated, so we can get you unblocked, and perhaps improve the error message in the future.

Scene Layers are supported only in the SceneView (they are ignored in the MapView).

3D Geometry editing is only supported in the sense that you can edit the Z value of points, lines, and polygon. Mesh editing is not supported at this point in time.

0 Kudos
ManelKEDDAR
New Contributor III

Hello Morten ,

Thanks for your answer , i hope that i'll find a solution to my answer :

My first method i used was to call  .CreateFeature((IEnumerable<KeyValuePair<String, Object>>, Geometry))

here's the code : 

private async void startLocalDB()
{

var gdb = await Esri.ArcGISRuntime.Data.Geodatabase.OpenAsync(@"C:\Users\mkeddar\Documents\ArcGIS\geodblocal\poly\data\pocdb.geodatabase");
var table = gdb.GeodatabaseFeatureTables.ElementAt(0);
await table.LoadAsync();
MapPoint locationPoint = new MapPoint(-2.708471, 56.096575, 5000, SpatialReferences.Wgs84);
var pointCollection = new Esri.ArcGISRuntime.Geometry.PointCollection(SpatialReferences.Wgs84);
pointCollection.Add(-109.048, 40.998);
pointCollection.Add(-102.047, 40.998);
pointCollection.Add(-102.037, 36.989);
pointCollection.Add(-109.048, 36.998);

var poly = new Esri.ArcGISRuntime.Geometry.Polygon(pointCollection);
var attributes = new Dictionary<string, object>();
attributes.Add("polygon", poly);
if (table.LoadStatus == Esri.ArcGISRuntime.LoadStatus.Loaded)
{
// var lyr = new FeatureLayer(table);
MyMapView.Map = new Map();
// MyMapView.Map.OperationalLayers.Add(lyr);
var feature = table.CreateFeature(attributes,locationPoint);
await table.AddFeatureAsync(feature);

}

}

the error point on  table.CreateFeature(attributes,locationPoint); : the specified method is not supported

the second try was with templates so i did :

var template = table.FeatureTemplates.FirstOrDefault() ?? table.FeatureTypes.FirstOrDefault(t => t.Templates.Any())?.Templates?.FirstOrDefault();
var feature = table.CreateFeature(template);
await table.AddFeatureAsync(feature);

and i have an error saying that error.: "An internal geodatabase error.: Create is not supported on the table".

I even tried with (.mpk) file to edit the feature Class (feature Table) but it doesn't work cause when i capture the Url of the local service it says that the only supported operations are (Query) there's no edit , update,create,or delete .i think that the runtime is not a very complete API 

here's my code with (.mpk ) file 

private async void AddNewFeature2D()
{

var service = new LocalFeatureService(@"C:\Users\mkeddar\Documents\ArcGIS\poly.mpk");

await service.StartAsync();
var uri = new Uri($"{service.Url}/0");
var featureTable = new ServiceFeatureTable(uri);
MapPoint locationPoint = new MapPoint(-2.708471, 56.096575, 5000, SpatialReferences.Wgs84);
var pointCollection = new Esri.ArcGISRuntime.Geometry.PointCollection(SpatialReferences.Wgs84);
pointCollection.Add(-109.048, 40.998);
pointCollection.Add(-102.047, 40.998);
pointCollection.Add(-102.037, 36.989);
pointCollection.Add(-109.048, 36.998);

//create a new polygon from the point collection
var poly = new Esri.ArcGISRuntime.Geometry.Polygon(pointCollection);
var attributes = new Dictionary<string, object>();
attributes.Add("polygon", poly);
await featureTable.LoadAsync();

//if the table os loaded successfully , create a new feature layer for the table and add it to the map

//Editer la feature Layer
var template = featureTable.FeatureTemplates.FirstOrDefault() ??featureTable.FeatureTypes.FirstOrDefault(t => t.Templates.Any())?.Templates?.FirstOrDefault();
var feature = featureTable.CreateFeature(template);

//var feature = featureTable.CreateFeature(attributes,locationPoint) //Doesn't work error: method is not supported
//add the new feature this updates local copy of the table
await featureTable.AddFeatureAsync(feature);

//push this update (applyEdit)
// push this update (apply edits) to the feature service
IReadOnlyList<EditResult> editResults = await featureTable.ApplyEditsAsync();
// check the results for errors
foreach (var r in editResults)
{
if (r.CompletedWithErrors)
{
Console.WriteLine("Edit to Object '" + r.ObjectId + "' failed: " + r.Error.Message);
}
}
//IReadOnlyList<EditResult> editResults = await table2D.a

}

i 've shared my mpk and .geodatabse file notice no lethod worked 

0 Kudos
dotMorten_esri
Esri Notable Contributor

table.CanAdd() returns false, and table.IsEditable also returns false. This is a read-only database, which is why you can't edit it.

0 Kudos
ManelKEDDAR
New Contributor III

Hello i checked the database and it is not a readonly database ,Is it possible to edit features with lite license runtime ?

Envoyé de mon iPhone

Le 31 juil. 2017 à 17:45, Morten Nielsen <geonet@esri.com> a écrit :

GeoNet

Re: what methods are supoorted by the ArcGis runtime version 100.1

reply from Morten Nielsen in ArcGIS Runtime SDK for .NET - View the full discussion

table.CanAdd() returns false, and table.IsEditable also returns false. This is a read-only database, which is why you can't edit it.

Reply to this message by replying to this email, or go to the message on GeoNet

Start a new discussion in ArcGIS Runtime SDK for .NET by email or at GeoNet

Following Re: what methods are supoorted by the ArcGis runtime version 100.1 in these streams: Inbox

Following Morten Nielsen in these streams: Inbox

This email was sent by GeoNet because you are a registered user.

You may unsubscribe instantly from GeoNet, or adjust email frequency in your email preferences

0 Kudos
dotMorten_esri
Esri Notable Contributor

I downloaded your data. It is read-only. It's probably due to how you created the database (you should create it from a sync task from a server and ensure it's set up for upload or bidirectional sync - creating it from pro creates read-only databases).

I can't remember if lite allows editing, but I'm pretty sure it doesn't. That's easy to verify though: Get it working without a license (ie "dev mode"), then try and license for lite and see if it'll still work. In that case however, you'd be getting a different error than what you are getting now.