Última versión
parent
1abf90fe19
commit
b4096ab81f
|
|
@ -21,7 +21,7 @@ using ArcGIS.Desktop.Framework.Threading.Tasks;
|
||||||
using ArcGIS.Core.Data;
|
using ArcGIS.Core.Data;
|
||||||
using ArcGIS.Desktop.Core;
|
using ArcGIS.Desktop.Core;
|
||||||
using ArcGIS.Desktop.Editing;
|
using ArcGIS.Desktop.Editing;
|
||||||
|
using ArcGIS.Desktop.Internal.Layouts.Utilities;
|
||||||
|
|
||||||
namespace PruebaAddIn
|
namespace PruebaAddIn
|
||||||
{
|
{
|
||||||
|
|
@ -59,14 +59,34 @@ namespace PruebaAddIn
|
||||||
return Geoprocessing.MakeValueArray(inlayers, outpath);
|
return Geoprocessing.MakeValueArray(inlayers, outpath);
|
||||||
});*/
|
});*/
|
||||||
|
|
||||||
|
EditOperation op = new EditOperation();
|
||||||
|
|
||||||
using (Geodatabase fileGeodatabase = new Geodatabase(new FileGeodatabaseConnectionPath(new Uri("D:\\Proyectos\\Olivia\\Datos\\gdbs\\Soria.gdb"))))
|
using (Geodatabase fileGeodatabase = new Geodatabase(new FileGeodatabaseConnectionPath(new Uri("D:\\Proyectos\\Olivia\\Datos\\gdbs\\Soria.gdb"))))
|
||||||
|
{
|
||||||
|
//management.CreateFeatureClass
|
||||||
|
FeatureClass featureClass_out= fileGeodatabase.
|
||||||
using (FeatureClass featureClass = fileGeodatabase.OpenDataset<FeatureClass>("prueba"))
|
using (FeatureClass featureClass = fileGeodatabase.OpenDataset<FeatureClass>("prueba"))
|
||||||
{
|
{
|
||||||
//FeatureClassDefinition facilitySiteDefinition = featureClass.GetDefinition();
|
FeatureClassDefinition facilitySiteDefinition = featureClass.GetDefinition();
|
||||||
|
featureClass_out.CopyFrom<FeatureClass, FeatureClass>(featureClass);
|
||||||
|
featureClass_out.DeleteRows(null);
|
||||||
//int facilityIdIndex = facilitySiteDefinition.FindField("TIPO_ENT");
|
//int facilityIdIndex = facilitySiteDefinition.FindField("TIPO_ENT");
|
||||||
string whereClause = "NOM_TIPO_ENTIDAD = 'Aceras'";
|
string whereClause = "NOM_TIPO_ENTIDAD = 'Aceras'";
|
||||||
Selection sel = featureClass.Select(new QueryFilter { WhereClause = whereClause }, SelectionType.ObjectID, SelectionOption.Normal);
|
//Selection sel = featureClass.Select(new QueryFilter { WhereClause = whereClause }, SelectionType.ObjectID, SelectionOption.Normal);
|
||||||
|
//FeatureClass featSel = sel as FeatureClass;
|
||||||
|
//IReadOnlyList<long> selectedOIDs = sel.GetObjectIDs();
|
||||||
|
Row row;
|
||||||
|
Feature feat;
|
||||||
|
using (RowCursor rowCursor = featureClass.Search(new QueryFilter { WhereClause = whereClause }))
|
||||||
|
{
|
||||||
|
while (rowCursor.MoveNext())
|
||||||
|
{
|
||||||
|
using (row = rowCursor.Current)
|
||||||
|
{
|
||||||
|
feat = row as Feature;
|
||||||
|
featureClass_out
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var progDlg = new ProgressDialog("Running Geoprocessing Tool", "Cancel", 100, true);
|
var progDlg = new ProgressDialog("Running Geoprocessing Tool", "Cancel", 100, true);
|
||||||
|
|
@ -110,3 +130,4 @@ namespace PruebaAddIn
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue