Layer addition

603
2
Jump to solution
02-09-2022 11:08 PM
DavidMrázek
Occasional Contributor II

Hello,

can I just ask how do I add layers to a project that are saved in this way?

souborz.png

 

string url = @"C:\Users\mrazekd\Desktop\ZABAGED_20220106_ISSMD_v1022.gdb\";  
var mv = MapView.Active;
            Uri uri = new Uri(url);
            await QueuedTask.Run(() => LayerFactory.Instance.CreateLayer(uri,mv.Map));

 

Thank you

David

0 Kudos
1 Solution

Accepted Solutions
shan_sarkar
Occasional Contributor III

Hi @DavidMrázek ,

From your screenshot it seems you are trying to access or add a feature class from a File geodatabase, which is used to store as a system folder that contains binary files that store and manage geospatial data. If you try to access the folder named ZABAGED_20220106_ISSMD_v1022.gdb from your windows explorer it might end up corrupting the geodatabase as it stores data in a different manner than compared to a shapefile.

Found a slightly different but similar case which might be helpful Creating a feature class and loading data programmatically

 

Here are some useful information on the File Geodatabases

1. File geodatabases

2. Connect to a database

3.  https://www.esri.com/news/arcuser/0309/files/9reasons.pdf

I hope this helps.


~Shan

View solution in original post

2 Replies
shan_sarkar
Occasional Contributor III

Hi @DavidMrázek ,

From your screenshot it seems you are trying to access or add a feature class from a File geodatabase, which is used to store as a system folder that contains binary files that store and manage geospatial data. If you try to access the folder named ZABAGED_20220106_ISSMD_v1022.gdb from your windows explorer it might end up corrupting the geodatabase as it stores data in a different manner than compared to a shapefile.

Found a slightly different but similar case which might be helpful Creating a feature class and loading data programmatically

 

Here are some useful information on the File Geodatabases

1. File geodatabases

2. Connect to a database

3.  https://www.esri.com/news/arcuser/0309/files/9reasons.pdf

I hope this helps.


~Shan
DavidMrázek
Occasional Contributor II

It will definitely help.

Thanks a lot