Avances ventanas y tratamiento gdb
parent
41a3070fff
commit
9f2c7d035e
|
|
@ -16,6 +16,8 @@ using ArcGIS.Desktop.Internal.Framework.Controls;
|
|||
using ArcGIS.Desktop.Framework.Dialogs;
|
||||
using ArcGIS.Desktop.Framework.Threading.Tasks;
|
||||
using ArcGIS.Desktop.Mapping;
|
||||
using OliviaAddInPro.Helper;
|
||||
using OliviaAddInPro.Model;
|
||||
|
||||
namespace OliviaAddInPro
|
||||
{
|
||||
|
|
@ -23,13 +25,13 @@ namespace OliviaAddInPro
|
|||
{
|
||||
protected override void OnClick()
|
||||
{
|
||||
if (OliviaGlob.tipEjec == TiposEjecucion.Ninguno)
|
||||
if (OliviaGlob.TipoEjec == TiposEjecucion.Ninguno)
|
||||
{
|
||||
//OliviaGlob.tipEjec = TiposEjecucion.Config;
|
||||
}
|
||||
else
|
||||
{
|
||||
OliviaGlob.ponMsg(Resource1.String_existe_ejec, MessageType.Warning);
|
||||
HelperGlobal.ponMsg(Resource1.String_existe_ejec, MessageType.Warning);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,6 +16,8 @@ using ArcGIS.Desktop.Internal.Framework.Controls;
|
|||
using ArcGIS.Desktop.Framework.Dialogs;
|
||||
using ArcGIS.Desktop.Framework.Threading.Tasks;
|
||||
using ArcGIS.Desktop.Mapping;
|
||||
using OliviaAddInPro.Helper;
|
||||
using OliviaAddInPro.Model;
|
||||
|
||||
namespace OliviaAddInPro
|
||||
{
|
||||
|
|
@ -23,14 +25,14 @@ namespace OliviaAddInPro
|
|||
{
|
||||
protected override void OnClick()
|
||||
{
|
||||
if (OliviaGlob.tipEjec == TiposEjecucion.Ninguno)
|
||||
if (OliviaGlob.TipoEjec == TiposEjecucion.Ninguno)
|
||||
{
|
||||
OliviaGlob.tipEjec = TiposEjecucion.LimpiezaConfig;
|
||||
OliviaGlob.TipoEjec = TiposEjecucion.LimpiezaConfig;
|
||||
DockpaneLimpiezaViewModel.Show();
|
||||
}
|
||||
else
|
||||
{
|
||||
OliviaGlob.ponMsg(Resource1.String_existe_ejec, MessageType.Warning);
|
||||
HelperGlobal.ponMsg(Resource1.String_existe_ejec, MessageType.Warning);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,6 +16,8 @@ using ArcGIS.Desktop.Internal.Framework.Controls;
|
|||
using ArcGIS.Desktop.Framework.Dialogs;
|
||||
using ArcGIS.Desktop.Framework.Threading.Tasks;
|
||||
using ArcGIS.Desktop.Mapping;
|
||||
using OliviaAddInPro.Helper;
|
||||
using OliviaAddInPro.Model;
|
||||
|
||||
namespace OliviaAddInPro
|
||||
{
|
||||
|
|
@ -23,13 +25,13 @@ namespace OliviaAddInPro
|
|||
{
|
||||
protected override void OnClick()
|
||||
{
|
||||
if (OliviaGlob.tipEjec == TiposEjecucion.Ninguno)
|
||||
if (OliviaGlob.TipoEjec == TiposEjecucion.Ninguno)
|
||||
{
|
||||
//OliviaGlob.tipEjec = TiposEjecucion.Maqueta;
|
||||
}
|
||||
else
|
||||
{
|
||||
OliviaGlob.ponMsg(Resource1.String_existe_ejec, MessageType.Warning);
|
||||
HelperGlobal.ponMsg(Resource1.String_existe_ejec, MessageType.Warning);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,6 +16,8 @@ using ArcGIS.Desktop.Framework.Dialogs;
|
|||
using ArcGIS.Desktop.Framework.Threading.Tasks;
|
||||
using ArcGIS.Desktop.Internal.Framework.Controls;
|
||||
using ArcGIS.Desktop.Mapping;
|
||||
using OliviaAddInPro.Helper;
|
||||
using OliviaAddInPro.Model;
|
||||
|
||||
namespace OliviaAddInPro
|
||||
{
|
||||
|
|
@ -23,14 +25,14 @@ namespace OliviaAddInPro
|
|||
{
|
||||
protected override void OnClick()
|
||||
{
|
||||
if(OliviaGlob.tipEjec==TiposEjecucion.Ninguno)
|
||||
if(OliviaGlob.TipoEjec==TiposEjecucion.Ninguno)
|
||||
{
|
||||
OliviaGlob.tipEjec = TiposEjecucion.RecoConfig;
|
||||
OliviaGlob.TipoEjec = TiposEjecucion.RecoConfig;
|
||||
DockpaneRecogidaViewModel.Show();
|
||||
}
|
||||
else
|
||||
{
|
||||
OliviaGlob.ponMsg(Resource1.String_existe_ejec, MessageType.Warning);
|
||||
HelperGlobal.ponMsg(Resource1.String_existe_ejec, MessageType.Warning);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,58 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OliviaAddInPro.Helper
|
||||
{
|
||||
class CheckedListItem<T> : INotifyPropertyChanged
|
||||
{
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
private bool isChecked;
|
||||
private bool isEnabled;
|
||||
private T item;
|
||||
|
||||
public CheckedListItem()
|
||||
{ }
|
||||
|
||||
public CheckedListItem(T item, bool isChecked = false, bool isEnabled = true)
|
||||
{
|
||||
this.item = item;
|
||||
this.isChecked = isChecked;
|
||||
this.isEnabled = isEnabled;
|
||||
}
|
||||
|
||||
public T Item
|
||||
{
|
||||
get { return item; }
|
||||
set
|
||||
{
|
||||
item = value;
|
||||
if (PropertyChanged != null) PropertyChanged(this, new PropertyChangedEventArgs("Item"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public bool IsChecked
|
||||
{
|
||||
get { return isChecked; }
|
||||
set
|
||||
{
|
||||
isChecked = value;
|
||||
if (PropertyChanged != null) PropertyChanged(this, new PropertyChangedEventArgs("IsChecked"));
|
||||
}
|
||||
}
|
||||
public bool IsEnabled
|
||||
{
|
||||
get { return isEnabled; }
|
||||
set
|
||||
{
|
||||
isEnabled = value;
|
||||
if (PropertyChanged != null) PropertyChanged(this, new PropertyChangedEventArgs("IsEnabled"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -17,7 +17,25 @@ namespace OliviaAddInPro.Helper
|
|||
{
|
||||
public static class HelperGdb
|
||||
{
|
||||
public static string out_st = string.Empty;
|
||||
private static string out_str = string.Empty;
|
||||
public static string OutStr {
|
||||
get
|
||||
{
|
||||
string val = out_str;
|
||||
out_str = string.Empty; //lo borra cada vez que se consulta
|
||||
return val;
|
||||
}
|
||||
set { out_str = value; }
|
||||
}
|
||||
private static string texto_sal = string.Empty;
|
||||
public static string TextoSal
|
||||
{
|
||||
get {
|
||||
string val = texto_sal;
|
||||
texto_sal = string.Empty; //lo borra cada vez que se consulta
|
||||
return val; }
|
||||
set { texto_sal = value; }
|
||||
}
|
||||
|
||||
[Flags]
|
||||
public enum TiposOpenFileDlg
|
||||
|
|
@ -28,12 +46,18 @@ namespace OliviaAddInPro.Helper
|
|||
OpenGdb=8,
|
||||
}
|
||||
|
||||
private static void ReiniciaOutStr()
|
||||
{
|
||||
out_str = string.Empty;
|
||||
}
|
||||
|
||||
//Dado el tipo de FtClass y una posición inicial abre un diálogo de búsqueda de ftclass
|
||||
//si se cancela o no es una feature class lo que se ha abierto devuelve null
|
||||
//si no, devuelve la featureclass directamente abierta
|
||||
public static FeatureClass OpenFtClassDialog(TiposOpenFileDlg tipo, string initialLoc = "")
|
||||
{
|
||||
FeatureClass fc = null;
|
||||
ReiniciaOutStr();
|
||||
string path = OpenFileDialog( tipo, initialLoc);
|
||||
if(!string.IsNullOrEmpty(path))
|
||||
{
|
||||
|
|
@ -45,13 +69,15 @@ namespace OliviaAddInPro.Helper
|
|||
//Libera el objeto
|
||||
public static void Free(IDisposable obj)
|
||||
{
|
||||
obj.Dispose();
|
||||
if(obj!=null)
|
||||
obj.Dispose();
|
||||
}
|
||||
|
||||
//Devuelve el Path del archivo seleccionado o un string vacío si se ha cancelado
|
||||
public static string OpenFileDialog(TiposOpenFileDlg tipo, string initialLoc="")
|
||||
{
|
||||
string titulo;
|
||||
ReiniciaOutStr();
|
||||
titulo = "Abrir Archivo";
|
||||
//Create a browse filter that uses Pro's "esri_browseDialogFilters_geodatabases" filter.
|
||||
//The browse filter is used in an OpenItemDialog.
|
||||
|
|
@ -98,15 +124,6 @@ namespace OliviaAddInPro.Helper
|
|||
return string.Empty;
|
||||
}
|
||||
|
||||
/*public static bool SelecPolig(string title, int wnd_handle, out string text_sal, out IGeometry geom_sal)
|
||||
{
|
||||
|
||||
}
|
||||
public static bool SelecInstal(string title, int wnd_handle, out string text_sal, out double x, out double y)
|
||||
{
|
||||
|
||||
}*/
|
||||
|
||||
//Dado un path comprueba que sea de una gdb, termina en .gdb, o si tiene .gdb en medio lo corta ahí
|
||||
//y si no tiene devuelve vacío
|
||||
public static string GetPathGdb(string path)
|
||||
|
|
@ -128,7 +145,8 @@ namespace OliviaAddInPro.Helper
|
|||
public static Task<Geodatabase> GetGdb(string pathGdb)
|
||||
{
|
||||
Geodatabase fileGeodatabase = null;
|
||||
return ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() =>
|
||||
ReiniciaOutStr();
|
||||
return ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run((Func<Geodatabase>)(() =>
|
||||
{
|
||||
string path = GetPathGdb(pathGdb);
|
||||
if (!string.IsNullOrEmpty(path))
|
||||
|
|
@ -139,12 +157,12 @@ namespace OliviaAddInPro.Helper
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
out_st = "Error al abrir Geodatabase " + path + ": " + ex.Message;
|
||||
HelperGdb.out_str = "Error al abrir Geodatabase " + path + ": " + ex.Message;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return fileGeodatabase;
|
||||
});
|
||||
}));
|
||||
//return fileGeodatabase;
|
||||
}
|
||||
|
||||
|
|
@ -154,6 +172,7 @@ namespace OliviaAddInPro.Helper
|
|||
{
|
||||
FeatureClass ftclss = null;
|
||||
Geodatabase gdb = GetGdb(pathFtClss).Result;
|
||||
ReiniciaOutStr();
|
||||
if (gdb != null)
|
||||
{
|
||||
ftclss = GetFtClass(System.IO.Path.GetFileNameWithoutExtension(pathFtClss), gdb).Result;
|
||||
|
|
@ -171,7 +190,8 @@ namespace OliviaAddInPro.Helper
|
|||
public static Task<FeatureClass> GetFtClass(string nameFtclss, Geodatabase gdb)
|
||||
{
|
||||
FeatureClass ftclss = null;
|
||||
return ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() =>
|
||||
ReiniciaOutStr();
|
||||
return ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run((Func<FeatureClass>)(() =>
|
||||
{
|
||||
try
|
||||
{
|
||||
|
|
@ -179,18 +199,19 @@ namespace OliviaAddInPro.Helper
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
out_st = "Error al abrir Feature Class " + nameFtclss + ": " + ex.Message;
|
||||
HelperGdb.out_str = "Error al abrir Feature Class " + nameFtclss + ": " + ex.Message;
|
||||
return null;
|
||||
}
|
||||
return ftclss;
|
||||
});
|
||||
}));
|
||||
}
|
||||
|
||||
//Abre una feature class cuando es un shapefile
|
||||
public static Task<FeatureClass> GetFtClassFromShp(string pathShp)
|
||||
{
|
||||
FeatureClass ftclss = null;
|
||||
return ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() =>
|
||||
ReiniciaOutStr();
|
||||
return ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run((Func<FeatureClass>)(() =>
|
||||
{
|
||||
if (pathShp.Contains(".shp"))
|
||||
{
|
||||
|
|
@ -203,20 +224,21 @@ namespace OliviaAddInPro.Helper
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
out_st = "Error al abrir Shapefile " + pathShp + ": " + ex.Message;
|
||||
HelperGdb.out_str = "Error al abrir Shapefile " + pathShp + ": " + ex.Message;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return ftclss;
|
||||
});
|
||||
}));
|
||||
}
|
||||
|
||||
//devuelve el campo dado el nombre
|
||||
private static Task<ArcGIS.Core.Data.Field> GetFieldByName(FeatureClass ftClss, string fieldName)
|
||||
{
|
||||
FeatureClassDefinition ftcldef = ftClss.GetDefinition();
|
||||
ReiniciaOutStr();
|
||||
ArcGIS.Core.Data.Field field=null;
|
||||
return ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() =>
|
||||
return ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run((Func<ArcGIS.Core.Data.Field>)(() =>
|
||||
{
|
||||
try
|
||||
{
|
||||
|
|
@ -224,11 +246,11 @@ namespace OliviaAddInPro.Helper
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
out_st = "No se encuentra el campo " + fieldName + ": " + ex.Message;
|
||||
HelperGdb.out_str = "No se encuentra el campo " + fieldName + ": " + ex.Message;
|
||||
return null;
|
||||
}
|
||||
return field;
|
||||
});
|
||||
}));
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -237,8 +259,9 @@ namespace OliviaAddInPro.Helper
|
|||
{
|
||||
FeatureClassDefinition ftcldef=null;
|
||||
IReadOnlyList<ArcGIS.Core.Data.Field> fields = null;
|
||||
ReiniciaOutStr();
|
||||
ObservableCollection<string> fields_st = new ObservableCollection<string>();
|
||||
return ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() =>
|
||||
return ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run((Func<ObservableCollection<string>>)(() =>
|
||||
{
|
||||
try
|
||||
{
|
||||
|
|
@ -251,11 +274,11 @@ namespace OliviaAddInPro.Helper
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
out_st = "Error al leer los campos " + fc.GetName() + ": " + ex.Message;
|
||||
HelperGdb.out_str = "Error al leer los campos " + fc.GetName() + ": " + ex.Message;
|
||||
return fields_st;
|
||||
}
|
||||
return fields_st;
|
||||
});
|
||||
}));
|
||||
}
|
||||
|
||||
//Devuelve comilla simple si el campo es de texto, o nada si es númerico
|
||||
|
|
@ -265,74 +288,219 @@ namespace OliviaAddInPro.Helper
|
|||
return f.FieldType == FieldType.String ? "'" : "";
|
||||
}
|
||||
|
||||
//Dado un nombre de campo, devuelve los atributos que aparecen distintos
|
||||
public static Task<ObservableCollection<string>> GetAttributes(FeatureClass fc, string fieldName)
|
||||
//Dado un nombre de campo, devuelve los valores que encuentra para ese nombre de campo
|
||||
public static Task<ObservableCollection<string>> GetFieldVals(FeatureClass fc, string fieldName, bool uniquevals)
|
||||
{
|
||||
ObservableCollection<string> attribs_st = new ObservableCollection<string>();
|
||||
return ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() =>
|
||||
ReiniciaOutStr();
|
||||
return ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run((Func<ObservableCollection<string>>)(() =>
|
||||
{
|
||||
try
|
||||
{
|
||||
FeatureClassDefinition ftcldef = fc.GetDefinition();
|
||||
ArcGIS.Core.Data.Field field = ftcldef.GetFields().First(x => x.Name.Equals(fieldName));
|
||||
string whereClause = $"";
|
||||
ArcGIS.Core.Data.QueryFilter queryFilter = new ArcGIS.Core.Data.QueryFilter { WhereClause = whereClause };
|
||||
using (RowCursor rowCursor = fc.Search(queryFilter))
|
||||
using (FeatureClassDefinition ftcldef = fc.GetDefinition())
|
||||
{
|
||||
while (rowCursor.MoveNext())
|
||||
ArcGIS.Core.Data.Field field = ftcldef.GetFields().First(x => x.Name.Equals(fieldName));
|
||||
using (RowCursor rowCursor = fc.Search())
|
||||
{
|
||||
using (Row row = rowCursor.Current)
|
||||
string str;
|
||||
while (rowCursor.MoveNext())
|
||||
{
|
||||
attribs_st.Add(Convert.ToString(row[fieldName]));
|
||||
using (Row row = rowCursor.Current)
|
||||
{
|
||||
str = Convert.ToString(row[fieldName]);
|
||||
if (uniquevals)
|
||||
{
|
||||
if (attribs_st.Contains(str))
|
||||
continue;
|
||||
}
|
||||
attribs_st.Add(str);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
out_st = "Error al leer los campos " + fc.GetName() + ": " + ex.Message;
|
||||
HelperGdb.out_str = "Error al leer los campos " + fc.GetName() + ": " + ex.Message;
|
||||
return attribs_st;
|
||||
|
||||
}
|
||||
return attribs_st;
|
||||
});
|
||||
}));
|
||||
}
|
||||
|
||||
/*public static Geometry GetGeomSel(string pathLyr, string selField, ObservableCollection<string> selAttributes, out string textoSal)
|
||||
/**
|
||||
* Devuelve una geometría que es la suma de la inicial y la que se añade Add
|
||||
*/
|
||||
public static ArcGIS.Core.Geometry.Geometry UneGeom(ArcGIS.Core.Geometry.Geometry geomIni, ArcGIS.Core.Geometry.Geometry geomUne)
|
||||
{
|
||||
string _textosal = "";
|
||||
Geometry geomsal = null;
|
||||
if (geomIni == null)
|
||||
return geomUne;
|
||||
return GeometryEngine.Instance.Union(geomIni, geomUne);
|
||||
}
|
||||
|
||||
/*is_str = FunGDB.is_str_field(clase_path, selField);
|
||||
nval = list.selec_valores_campo(selField, out val_ids, out val_st);//valores únicos
|
||||
if (nval > 0)
|
||||
/**
|
||||
* Devuelve una geometría a la que dada una geometría inicial se le quita Excl
|
||||
*/
|
||||
public static ArcGIS.Core.Geometry.Geometry QuitaGeom(ArcGIS.Core.Geometry.Geometry geomIni, ArcGIS.Core.Geometry.Geometry geomQuita)
|
||||
{
|
||||
return GeometryEngine.Instance.Union(geomIni, geomQuita);
|
||||
}
|
||||
|
||||
/**
|
||||
* Forma la envolvente convexa, el mínimo polígono,
|
||||
* que contiene los ámbitos para exportar, a partir de ahí la red navegable ampliando a un buffer
|
||||
*/
|
||||
public static ArcGIS.Core.Geometry.Geometry GetGeomConvexHull(FeatureClass fclss, ArcGIS.Core.Data.QueryFilter filter)
|
||||
{
|
||||
ArcGIS.Core.Geometry.Geometry geomIni = null;
|
||||
geomIni = GetGeomUnica(fclss, filter);
|
||||
if (geomIni != null)
|
||||
return GeometryEngine.Instance.ConvexHull(geomIni);
|
||||
else
|
||||
return null;
|
||||
}
|
||||
|
||||
/*
|
||||
* A partir de una capa recorre todos los elementos que cumplen el filtro y los une en una única geometría
|
||||
*/
|
||||
public static ArcGIS.Core.Geometry.Geometry GetGeomUnica(FeatureClass fclss, ArcGIS.Core.Data.QueryFilter filtro)
|
||||
{
|
||||
ArcGIS.Core.Geometry.Geometry geomsal = null;
|
||||
ReiniciaOutStr();
|
||||
|
||||
try
|
||||
{
|
||||
//se embucla para unir las geoms
|
||||
for (int i = 0; i < nval; i++)
|
||||
using (RowCursor rowCursor = fclss.Search(filtro))
|
||||
{
|
||||
if (is_str)
|
||||
consulta = selField + " = '" + val_st[i] + "'";
|
||||
else
|
||||
consulta = selField + " = " + val_st[i];
|
||||
ids = FunGDB.dame_ids_consulta(clase_path, consulta);
|
||||
fc = FunGDB.abre_ftclass(clase_path);
|
||||
if ((ids != null) && (fc != null))
|
||||
while (rowCursor.MoveNext())
|
||||
{
|
||||
for (j = 0; j < ids.Length; j++)
|
||||
using (Row row = rowCursor.Current)
|
||||
{
|
||||
f = fc.GetFeature(ids[j]);
|
||||
geom = f.Shape;
|
||||
geom_sal = FunGDB.une_geoms(geom_sal, geom);
|
||||
FunGDB.libera(f);
|
||||
if(row is Feature ft)
|
||||
geomsal = UneGeom(geomsal, ft.GetShape());
|
||||
}
|
||||
}
|
||||
FunGDB.libera(fc);
|
||||
//Actualiza el texto de salida
|
||||
_textosal = _textosal + HelperGlobal.RevisaText(val_st[i]);
|
||||
}
|
||||
}
|
||||
textoSal = _textosal;
|
||||
catch (Exception ex)
|
||||
{
|
||||
out_str = "Error al leer generar geometría única " + out_str + ex.Message;
|
||||
return geomsal;
|
||||
}
|
||||
|
||||
return geomsal;
|
||||
}*/
|
||||
}
|
||||
/**
|
||||
* Dado un campo de una feature class y el valor que se quiere para el campo
|
||||
* devuelve las geometrías que cumplen dicho criterio
|
||||
*/
|
||||
public static Task<ArcGIS.Core.Geometry.Geometry> GetGeomSel(FeatureClass fclss, string fieldName, ObservableCollection<string> selFieldVals)
|
||||
{
|
||||
ArcGIS.Core.Geometry.Geometry geomsal = null;
|
||||
ArcGIS.Core.Geometry.Geometry geomAux = null;
|
||||
string where = "";
|
||||
ArcGIS.Core.Data.Field f;
|
||||
ArcGIS.Core.Data.QueryFilter filtro;
|
||||
bool ok = true;
|
||||
ReiniciaOutStr();
|
||||
TextoSal = string.Empty;
|
||||
|
||||
return ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run((Func<ArcGIS.Core.Geometry.Geometry>)(() =>
|
||||
{
|
||||
try
|
||||
{
|
||||
using (FeatureClassDefinition ftcldef = fclss.GetDefinition())
|
||||
{
|
||||
f = ftcldef.GetFields().First(x => x.Name.Equals(fieldName));
|
||||
//se embucla para unir las geoms
|
||||
for (int i = 0; i < selFieldVals.Count && ok; i++)
|
||||
{
|
||||
where = $"{fieldName} = {Quote(f)}{selFieldVals[i]}{Quote(f)}";
|
||||
filtro = new ArcGIS.Core.Data.QueryFilter { WhereClause = where };
|
||||
geomAux = GetGeomUnica(fclss, filtro);
|
||||
if(geomAux == null)
|
||||
{
|
||||
ok = false;
|
||||
continue;
|
||||
}
|
||||
geomsal = UneGeom(geomsal, geomAux);
|
||||
TextoSal = TextoSal + HelperGlobal.RevisaText(selFieldVals[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
HelperGdb.out_str = "Error al generar geometría en " + fclss.GetName() + " Con filtro " + where +": " + ex.Message;
|
||||
return geomsal;
|
||||
|
||||
}
|
||||
if (!ok)
|
||||
HelperGdb.out_str = "Error al generar geometría en " + fclss.GetName() + " Con filtro " + where + HelperGdb.out_str;
|
||||
return geomsal;
|
||||
}));
|
||||
}
|
||||
/**
|
||||
* Devuelve el número de entidades de una FeatureClass que cumplen la consulta, o todos si la consulta es empty
|
||||
*/
|
||||
public static int GetNumElems(string pathGdb, string ftclssName, string consulta = "")
|
||||
{
|
||||
Geodatabase gdb = GetGdb(pathGdb).Result;
|
||||
FeatureClass fc = null;
|
||||
int n = -1;
|
||||
if (gdb != null)
|
||||
{
|
||||
fc = GetFtClass(ftclssName, gdb).Result;
|
||||
if(fc!=null)
|
||||
n= GetNumElems(fc, consulta).Result;
|
||||
}
|
||||
Free(fc);
|
||||
Free(gdb);
|
||||
return n;
|
||||
|
||||
}
|
||||
/**
|
||||
* Devuelve el número de entidades de una FeatureClass que cumplen la consulta, o todos si la consulta es empty
|
||||
*/
|
||||
public static Task<int> GetNumElems(FeatureClass fc, string consulta = "")
|
||||
{
|
||||
int n = -1;
|
||||
return ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run((Func<int>)(() =>
|
||||
{
|
||||
try
|
||||
{
|
||||
if (fc != null)
|
||||
{
|
||||
if (string.IsNullOrEmpty(consulta))
|
||||
n = fc.GetCount();
|
||||
else
|
||||
{
|
||||
//realiza consulta
|
||||
n = 0;
|
||||
using (Selection sel = fc.Select(new ArcGIS.Core.Data.QueryFilter { WhereClause = consulta }, SelectionType.ObjectID, SelectionOption.Normal))
|
||||
n = sel.GetCount();
|
||||
}
|
||||
}
|
||||
return n;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
HelperGdb.out_str = "Error al contar filas en " + fc.GetName() + ": " + ex.Message;
|
||||
return n;
|
||||
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
/**
|
||||
* Devuelve el número de entidades de una FeatureClass que cumplen la consulta, o todos si la consulta es empty
|
||||
*/
|
||||
public static int GetNumElems(string pathFtClss, string consulta = "")
|
||||
{
|
||||
FeatureClass fc = GetFtClass(pathFtClss);
|
||||
int n=GetNumElems(fc,consulta).Result;
|
||||
Free(fc);
|
||||
return n;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,13 +1,22 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using ArcGIS.Desktop.Internal.Framework.Controls;
|
||||
|
||||
namespace OliviaAddInPro.Helper
|
||||
{
|
||||
public static class HelperGlobal
|
||||
{
|
||||
public static ErrorMessageDialog msg;
|
||||
|
||||
public static void ponMsg(String mensaje, MessageType tipo, String titulo = "OLIVIA")
|
||||
{
|
||||
msg = new ErrorMessageDialog(titulo, mensaje, tipo);
|
||||
msg.ShowDialog();
|
||||
}
|
||||
public static string RevisaText(string text)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,77 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using ArcGIS.Core.Geometry;
|
||||
|
||||
namespace OliviaAddInPro.Model
|
||||
{
|
||||
class Comun
|
||||
{
|
||||
/**
|
||||
* Capa de ámbitos
|
||||
*/
|
||||
public string CapaElems = string.Empty;
|
||||
/**
|
||||
* Velocidad de desplazamiento, en km/h. Si es 0, es determinada por la vía
|
||||
*/
|
||||
public double VDespl = 0;
|
||||
/**
|
||||
* Tiempo de tratamiento, en minutos
|
||||
*/
|
||||
public double Ttto = 5;
|
||||
/**
|
||||
* Geometría para el filtro de ámbitos, incluye zonas, se añaden los ámbitos que pertenecen a esa geom
|
||||
*/
|
||||
public Geometry GeomZon = null;
|
||||
/**
|
||||
* Geometría para el filtro de ámbitos, incluye zonas, se añaden los ámbitos que pertenecen a esa geom
|
||||
*/
|
||||
public Geometry GeomNiv = null;
|
||||
/**
|
||||
* Geometría para el filtro de ámbitos, incluye restricciones, se quitan los ámbitos que pertenecen a esa geom
|
||||
*/
|
||||
public Geometry GeomRestr = null;
|
||||
/**
|
||||
* Coordenadas de la instalación
|
||||
*/
|
||||
public Coordinate2D CoordsInstal = new Coordinate2D(0, 0);
|
||||
/**
|
||||
* Buffer para la exportación, en metros
|
||||
*/
|
||||
public int BuffExport = 1000;
|
||||
/**
|
||||
* Tiempo de trabajo al día por convenio, en minutos
|
||||
*/
|
||||
public double TConv = LimpiezaDef.Parametros.t_conv;
|
||||
/**
|
||||
* Tiempo de descanso del personal, en minutos
|
||||
*/
|
||||
public double TDescan = LimpiezaDef.Parametros.t_descanso;
|
||||
/**
|
||||
* Tiempo de carga y descarga, en minutos
|
||||
*/
|
||||
public double TDescarg = LimpiezaDef.Parametros.t_cardesc;
|
||||
/**
|
||||
* Tiempo de desplazamiento inicio/fin a las instalaciones, en minutos
|
||||
*/
|
||||
public double TDesplIniFin = LimpiezaDef.Parametros.t_desp;
|
||||
/**
|
||||
* hora de inicio de la jornada de trabajo, en minutos
|
||||
*/
|
||||
public double HIni = LimpiezaDef.Parametros.h_inicio;
|
||||
/**
|
||||
* Porcentaje de tráfico que se estima, ya que si no los vehículos irían siempre a la velocida máxima permitida por la vía
|
||||
*/
|
||||
public int Trafico = 80;
|
||||
/**
|
||||
* Número de puntos de control
|
||||
*/
|
||||
public int NPtosCtrl = 3;
|
||||
/**
|
||||
* Número de sectores, si es 0, se calcula automáticamente, si es negativo, se ajusta a jornada
|
||||
*/
|
||||
public int NSect = 3;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
using ArcGIS.Core.Geometry;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using OliviaAddInPro.Helper;
|
||||
|
||||
namespace OliviaAddInPro.Model
|
||||
{
|
||||
class Limpieza : Comun
|
||||
{
|
||||
//**********************************************
|
||||
//Se recogen en PaneLimpiezaSub1
|
||||
/**
|
||||
* Tipo de tratamiento elegidos
|
||||
*/
|
||||
public int TipoTto = -1;
|
||||
/**
|
||||
* Ámbitos de trabajo elegidos
|
||||
*/
|
||||
public bool[] AmbitosSel = new bool[(int)LimpiezaDef.AmbitsTra.AmbN];
|
||||
/**
|
||||
* Indica si respeta el sentido de circulación o no
|
||||
*/
|
||||
public bool RespCirc = false;
|
||||
/**
|
||||
* Tipo de unidades del tiempo de tto
|
||||
*/
|
||||
public int UdsTTto = (int)GeneralDef.OlvTiposTto.OlvTipTtoNoDef;
|
||||
|
||||
/**
|
||||
* Lee la gdb y devuelve el array de ámbitos en función de si hay en la gdb o no
|
||||
*/
|
||||
public bool[] BuscAmbGdb()
|
||||
{
|
||||
string consulta;
|
||||
int numero_lin;
|
||||
bool[] amb_gdb = new bool[(int)LimpiezaDef.AmbitsTra.AmbN];//se inician a false
|
||||
string ftclass;
|
||||
|
||||
//mira a ver si hay ejes de calle
|
||||
ftclass = LimpiezaDef.ftclass[(int)LimpiezaDef.AmbitsTra.AmbEjeCalle];
|
||||
consulta = LimpiezaDef.filtro_str[(int)LimpiezaDef.AmbitsTra.AmbEjeCalle];
|
||||
numero_lin = HelperGdb.GetNumElems(OliviaGlob.Paths.PathGdbNw, ftclass, consulta);
|
||||
if (numero_lin > 0)
|
||||
{
|
||||
amb_gdb[(int)LimpiezaDef.AmbitsTra.AmbEjeCalle] = true;
|
||||
}
|
||||
//mira a ver si hay el resto de capas y tienen entidades
|
||||
for (int i = (int)LimpiezaDef.AmbitsTra.AmbBordLibreMec; i < (int)LimpiezaDef.AmbitsTra.AmbN; i++)
|
||||
{
|
||||
consulta = LimpiezaDef.filtro_str[i];
|
||||
numero_lin = HelperGdb.GetNumElems(CapaElems, consulta);
|
||||
|
||||
if (numero_lin > 0)
|
||||
{
|
||||
amb_gdb[i] = true;
|
||||
}
|
||||
}
|
||||
|
||||
return amb_gdb;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,792 @@
|
|||
using System;
|
||||
|
||||
/**
|
||||
* @file LimpiezaDef.cs
|
||||
* Clase con definiciones de limpieza comunes al proyecto Olivia y a OliviaTask.
|
||||
*/
|
||||
/**
|
||||
* Clase con definiciones de limpieza comunes al proyecto Olivia y a OliviaTask.
|
||||
*/
|
||||
namespace OliviaAddInPro.Model
|
||||
{
|
||||
public static class LimpiezaDef
|
||||
{
|
||||
public const int NMaxZon = 9;
|
||||
public const int NMaxNiv = 12;
|
||||
|
||||
//*************************************************************************************
|
||||
//Enums y structs generales
|
||||
/**
|
||||
* Nombre de las capas que se van a necesitar para la exportación de datos para la limpieza
|
||||
*/
|
||||
public struct Capas
|
||||
{
|
||||
public static string ftclass_niveles; //<Nombre de la capa de niveles
|
||||
public static string ftclass_cont; //<Nombre de la capa de contenedores
|
||||
public static string ftclass_mobi; //<Nombre de la capa de mobiliario (pipicanes, papeleras, etc)
|
||||
public static string ftclass_limp_mec; //<Nombre de la capa de los ámbitos de limpieza lineales
|
||||
public static string ftclass_instala; //<Nombre de la capa de instalaciones
|
||||
};
|
||||
/**
|
||||
* Nombre de los campos (de las capas) sobre los que se realizarán consultas para la limpieza
|
||||
*/
|
||||
public struct Campos
|
||||
{
|
||||
public static string consulta_entidad; //<Campo a consultar de la capa de limpieza el tipo de entidad (ámbito)
|
||||
public static string consulta_mecan; //<Campo a consultar de la capa de limpieza si es mecanizable o no
|
||||
public static string consulta_observ; //<Campo a consultar de la capa de limpieza, observaciones
|
||||
public static string consulta_anch_tip; //<Campo a consultar de la capa de limpieza, ancho tipo
|
||||
public static string consulta_tipolo; //<Campo a consultar de la capa de limpieza, tipología
|
||||
};
|
||||
/**
|
||||
* Nombre de los atributos (de las capas) sobre los que se realizarán consultas para la limpieza
|
||||
*/
|
||||
public struct Atributos
|
||||
{
|
||||
public static string atr_bord; //<Atributo a consultar para los Bordillos libres
|
||||
public static string atr_aparc; //<Atributo a consultar para las Bandas de Aparcamiento
|
||||
public static string atr_acera; //<Atributo a consultar para las Aceras
|
||||
public static string atr_peat; //<Atributo a consultar para las Peatonales
|
||||
public static string atr_hoja; //<Atributo a consultar para la Caida de Hoja
|
||||
public static string atr_esca; //<Atributo a consultar para las Escaleras
|
||||
public static string atr_fuent; //<Atributo a consultar para las Fuentes
|
||||
public static string atr_infan; //<Atributo a consultar para las Zonas Infantiles
|
||||
public static string atr_pape; //<Atributo a consultar para las Papeleras
|
||||
public static string atr_paso_niv; //<Atributo a consultar para los Pasos a Nivel
|
||||
public static string atr_pipi; //<Atributo a consultar para los Pipicanes
|
||||
public static string atr_sane; //<Atributo a consultar para los Sanecanes
|
||||
public static string atr_terri; //<Atributo a consultar para las Areas Terrizas
|
||||
public static string atr_ocio; //<Atributo a consultar para las Zonas de Ocio
|
||||
public static string atr_org_ofi; //<Atributo a consultar para los Organismos Oficiales
|
||||
public static string atr_parq; //<Atributo a consultar para los Parques
|
||||
public static string atr_park; //<Atributo a consultar para los Parkings
|
||||
public static string atr_play; //<Atributo a consultar para las Playas
|
||||
public static string atr_polid; //<Atributo a consultar para los Plideportivos
|
||||
public static string atr_turis; //<Atributo a consultar para los Puntos de Interés Turístico
|
||||
public static string atr_solar; //<Atributo a consultar para los Solares
|
||||
public static string atr_suelo; //<Atributo a consultar para los Usos del Suelo
|
||||
public static string atr_ap_lin; //<Atributo a consultar para el aparcamiento en Linea
|
||||
public static string atr_ap_bat; //<Atributo a consultar para el aparcamiento en Bateria
|
||||
|
||||
};
|
||||
/**
|
||||
* Nombre de los parámetros que intervienen en el cálculo para la limpieza
|
||||
*/
|
||||
public struct Parametros
|
||||
{
|
||||
public static int t_ttoM; //<Tiempo de tratamiento máximo admitido
|
||||
public static int t_ttom; //<Tiempo de tratamiento mínimo permitido
|
||||
public static int v_despM; //<Velocidad de desplazamiento máximo admitido
|
||||
public static int v_despm; //<Velocidad de desplazamiento mínimo admitido
|
||||
public static int t_cardescM; //<Tiempo de descarga máximo admitido
|
||||
public static int t_cardescm; //<Tiempo de descarga mínimo admitido
|
||||
public static int t_cardesc; //<Tiempo de descarga establecido
|
||||
public static int t_despM; //<Tiempo de desplazamiento máximo admitido
|
||||
public static int t_despm; //<Tiempo de desplazamiento mínimo admitido
|
||||
public static int t_desp; //<Tiempo de desplazamiento establecido
|
||||
public static int t_convM; //<Tiempo de convenio máximo admitido
|
||||
public static int t_convm; //<Tiempo de convenio mínimo admitido
|
||||
public static int t_conv; //<Tiempo de convenio establecido
|
||||
public static int t_descansoM; //<Tiempo de descanso máximo admitido
|
||||
public static int t_descansom; //<Tiempo de descanso mínimo admitido
|
||||
public static int t_descanso; //<Tiempo de descanso establecido
|
||||
public static int h_inicio; //<Hora de inicio de la jornada de trabajo
|
||||
public static int ancho_viaM; //<Ancho de vía máximo admitido
|
||||
public static int ancho_viam; //<Ancho de vía mínimo admitido
|
||||
public static int ancho_via; //<Ancho de vía establecido
|
||||
public static int ttoBarMan; //<Tiempo de tratamiento de Barrido_Manual
|
||||
public static int ttoBarManMant; //<Tiempo de tratamiento de Barrido_mantenimiento_manual
|
||||
public static int ttoBarMMot; //<Tiempo de tratamiento de Barrido_manual_motorizado
|
||||
public static int ttoBarMC; //<Tiempo de tratamiento de Barrido_mecanico_calzadas
|
||||
public static int ttoBarMAP; //<Tiempo de tratamiento de Barrido_mecanico_aceras_peatonales
|
||||
public static int ttoBarMix; //<Tiempo de tratamiento de Barrido_mixto
|
||||
public static int ttoBalMan; //<Tiempo de tratamiento de Baldeo_manual
|
||||
public static int ttoBalMC; //<Tiempo de tratamiento de Baldeo_mecanico_calzadas
|
||||
public static int ttoBalMAP; //<Tiempo de tratamiento de Baldeo_mecanico_aceras_peatonales
|
||||
public static int ttoBalMix; //<Tiempo de tratamiento de Baldeo_mixto
|
||||
public static int ttoBL; //<Tiempo de tratamiento de Brigada_limpieza
|
||||
public static int ttoCH; //<Tiempo de tratamiento de Caida_Hoja
|
||||
public static int ttoVPap; //<Tiempo de tratamiento de Vaciado_papeleras
|
||||
public static int ttoLPap; //<Tiempo de tratamiento de Limpieza_papeleras
|
||||
public static int ttoLC; //<Tiempo de tratamiento de Limpieza_contenedores
|
||||
public static int ttoLZI; //<Tiempo de tratamiento de Limpieza_zonas_infantiles
|
||||
public static int ttoLPip; //<Tiempo de tratamiento de Limpieza_pipicanes
|
||||
public static int ttoLS; //<Tiempo de tratamiento de Limpieza_sanecanes
|
||||
public static int vdespBarMan; //<Velocidad de desplazamiento de Barrido_Manual
|
||||
public static int vdespBarManMant; //<Velocidad de desplazamiento de Barrido_mantenimiento_manual
|
||||
public static int vdespBarMMot; //<Velocidad de desplazamiento de Barrido_manual_motorizado
|
||||
public static int vdespBarMC; //<Velocidad de desplazamiento de Barrido_mecanico_calzadas
|
||||
public static int vdespBarMAP; //<Velocidad de desplazamiento de Barrido_mecanico_aceras_peatonales
|
||||
public static int vdespBarMix; //<Velocidad de desplazamiento de Barrido_mixto
|
||||
public static int vdespBalMan; //<Velocidad de desplazamiento de Baldeo_manual
|
||||
public static int vdespBalMC; //<Velocidad de desplazamiento de Baldeo_mecanico_calzadas
|
||||
public static int vdespBalMAP; //<Velocidad de desplazamiento de Baldeo_mecanico_aceras_peatonales
|
||||
public static int vdespBalMix; //<Velocidad de desplazamiento de Baldeo_mixto
|
||||
public static int vdespBL; //<Velocidad de desplazamiento de Brigada_limpieza
|
||||
public static int vdespCH; //<Velocidad de desplazamiento de Caida_Hoja
|
||||
public static int vdespVPap; //<Velocidad de desplazamiento de Vaciado_papeleras
|
||||
public static int vdespLPap; //<Velocidad de desplazamiento de Limpieza_papeleras
|
||||
public static int vdespLC; //<Velocidad de desplazamiento de Limpieza_contenedores
|
||||
public static int vdespLZI; //<Velocidad de desplazamiento de Limpieza_zonas_infantiles
|
||||
public static int vdespLPip; //<Velocidad de desplazamiento de Limpieza_pipicanes
|
||||
public static int vdespLS; //<Velocidad de desplazamiento de Limpieza_sanecanes
|
||||
public static double umbral_reco; //<Umbral de llenado para la recogida de contenedores
|
||||
};
|
||||
public struct OtrosParam
|
||||
{
|
||||
public static double giro_max;
|
||||
public static double anch_peat;
|
||||
public static double anch_ace;
|
||||
public static double anch_aplin;
|
||||
public static double anch_apbat;
|
||||
public static double anch_bordlib;
|
||||
public static double desv_max;
|
||||
public static double desv_max_abs;
|
||||
};
|
||||
//*************************************************************************************
|
||||
//Enums globales limpieza
|
||||
/**
|
||||
* Tipos de tratamiento.
|
||||
* Enumeración de los diferentes tipos de tratamiento correspondientes
|
||||
* a los servicios de limpieza viaria.
|
||||
*/
|
||||
public enum TiposTto
|
||||
{
|
||||
TtoNoDef = -1,
|
||||
//lineales
|
||||
TtoBarrMan, //<Barrido manual
|
||||
TtoBarrMant, //<Barrido manual de mantenimiento
|
||||
TtoBarrMot, //<Barrido manual motorizado
|
||||
TtoBarrMecCalz, //<Barrido mecánico de calzadas
|
||||
TtoBarrMecAcYCalzP, //<Barrido mecánico de aceras y calzadas peatonales
|
||||
TtoBarrMixAcYCalz, //<Barrido mixto de aceras y calzadas
|
||||
TtoBaldMan, //<Baldeo manual
|
||||
TtoBaldMecCalz, //<Baldeo mecánico de calzadas
|
||||
TtoBaldMecAcYCalzP, //<Baldeo mecánico de aceras y calzadas peatonales
|
||||
TtoBaldMixAcYCalz, //<Baldeo mixto de aceras y calzadas
|
||||
TtoFregMecAcYCalzP, //<Fregado mecánico de aceras y calzadas peatonales
|
||||
TtoCaidaHoja, //<Caída de la hoja
|
||||
//puntuales
|
||||
TtoPapeVaci, //<Vaciado de papeleras
|
||||
TtoPapeLimp, //<Limpieza de papeleras
|
||||
TtoLimpCont, //<Limpieza de ubicación de contenedores
|
||||
TtoLimpZInf, //<Limpieza de zonas infantiles
|
||||
TtoLimpPipi, //<Limpieza de pipicanes
|
||||
TtoLimpSane, //<Limpieza y reposición de sanecanes
|
||||
TtoCustom, //<Tratamiento editable para seleccionar cualquier tipo de ámbito
|
||||
TtoN //<Número de tipos de tratamiento
|
||||
};
|
||||
/**
|
||||
* Ámbitos de trabajo.
|
||||
* Enumeración de los diferentes ámbitos de trabajo en los que se pueden efectuar los tratamientos
|
||||
* correspondientes a los servicios de limpieza viaria.
|
||||
*/
|
||||
public enum AmbitsTra
|
||||
{
|
||||
AmbNoDef = -1,
|
||||
//lineales
|
||||
AmbEjeCalle, //<Ejes de calle, tipo línea
|
||||
AmbBordLibreMec, //<Bordillos libres de aparcamiento mecanizables, tipo línea
|
||||
AmbBordLibreNoMec, //<Bordillos libres de aparcamiento no mecanizables, tipo línea
|
||||
AmbBordAparc, //<Bordillos con banda de aparcamiento, tipo línea
|
||||
AmbAceMec, //<Aceras mecanizables, tipo línea
|
||||
AmbAceNoMec, //<Aceras no mecanizables, tipo línea
|
||||
AmbCallePeatMec, //<Calles peatonales mecanizables, tipo línea
|
||||
AmbCallePeatNoMec, //<Calles peatonales no mecanizables, tipo línea
|
||||
AmbBordHojaMec, //<Bordillos con caída de hoja mecanizables, tipo línea
|
||||
AmbBordHojaNoMec, //<Bordillos con caída de hoja no mecanizables, tipo línea
|
||||
//puntuales
|
||||
AmbConte, //<Puntos de contenerización, tipo punto
|
||||
AmbPape, //<Papeleras, tipo punto
|
||||
AmbZInf, //<Zonas infantiles, tipo punto
|
||||
AmbPipi, //<Pipicanes, tipo punto
|
||||
AmbSane, //<Sanecanes, tipo punto
|
||||
AmbN //<Número de ámbitos de trabajo
|
||||
};
|
||||
/**
|
||||
* Array que indica qué ámbitos tiene cada opción, mediante true en las posiciones de los ámbitos válidos
|
||||
*/
|
||||
public struct AmbsValOps
|
||||
{
|
||||
public bool[] ambs;
|
||||
};
|
||||
/**
|
||||
* Definición de tipo para la matriz que da los ámbitos
|
||||
* Donde hay n opciones y cada opción un array de booleanos que indican con true si esa opción tiene ese ámbito
|
||||
*/
|
||||
public struct AmbsVal
|
||||
{
|
||||
public int n_ops;
|
||||
public AmbsValOps[] ambs_ops;
|
||||
};
|
||||
//*************************************************************************************
|
||||
//Variables generales
|
||||
/*array de las diferentes consltas de atributos a realizar en Ambitos_limpiezas_mecanicas. Se añade uno porque en los ámbitos sólo se recoge una vez Papeleras, mientras que hay Vaciado y Limpieza de las mismas.*/
|
||||
public static string[] filtro_str = new string[(int)AmbitsTra.AmbN];
|
||||
|
||||
public static string[] ftclass = new string[(int)AmbitsTra.AmbN];
|
||||
/**
|
||||
* Array de strings con los nombres de los tipos de tratamiento que se asignará la gdb importada a ArcGIS una vez realizada la sectorización y la planificación
|
||||
*/
|
||||
public static String[] tto_gdb = new String[(int)TiposTto.TtoN - 1];
|
||||
/**
|
||||
* Array de strings con los nombres de los ámbitos de trabajo que se asignará la gdb importada a ArcGIS una vez realizada la sectorización y la planificación
|
||||
*/
|
||||
public static String[] ambs_gdb = new String[(int)LimpiezaDef.AmbitsTra.AmbN];
|
||||
/**
|
||||
* Array de strings con los prefijos del tiupo de tratamiento para poner a "ambs_gdb" para que no haya posibles capas duplicadas
|
||||
*/
|
||||
public static String[] preftto_gdb = new String[(int)TiposTto.TtoN - 1];
|
||||
/**
|
||||
* Array de strings con los tipos de tratamientos y diferentes zonas de actuación de limpieza
|
||||
*/
|
||||
public static String[] simb_tto = new String[22];
|
||||
/**
|
||||
* Array de strings con nombres de los sibmolos referentes al tipo de tratamiento de limpieza viaria
|
||||
*/
|
||||
public static String[] nombre_simblimp_vsm = new String[22];
|
||||
/**
|
||||
* Array de cadenas de doubles enumerando los tiempos de tratamiento para los diferentes tipos de tratamiento.
|
||||
*/
|
||||
public static double[] tiempos_tto = new double[(int)LimpiezaDef.TiposTto.TtoN - 1];
|
||||
/**
|
||||
* Array de cadenas de doubles enumerando las velocidades de desplazamiento para los diferentes tipos de tratamiento.
|
||||
*/
|
||||
public static double[] v_desplazamiento = new double[(int)LimpiezaDef.TiposTto.TtoN - 1];
|
||||
/**
|
||||
* Array de cadenas de caracteres enumerando los tipos de tratamiento
|
||||
*/
|
||||
public static String[] tipos_tto_str = new String[(int)LimpiezaDef.TiposTto.TtoN - 1];
|
||||
/**
|
||||
* Array de cadenas de caracteres enumerando los ámbitos de trabajo
|
||||
*/
|
||||
public static String[] ambits_tra_str = new String[(int)LimpiezaDef.AmbitsTra.AmbN];
|
||||
/**
|
||||
* Matriz que da si los tratamientos tienen en cuenta las restricciones de circulación o no
|
||||
*/
|
||||
public static bool[] rest_circ;
|
||||
/**
|
||||
* Matriz que da si los tratamientos tienen en cuenta las restricciones de circulación o no
|
||||
*/
|
||||
public static bool[] t_carg_desc;
|
||||
/**
|
||||
* Matriz que da los ámbitos correspondientes a los tipos de tratamiento
|
||||
*/
|
||||
public static AmbsVal[] ambs_val;
|
||||
/**
|
||||
* Anchos por defecto para el cálculo de rendimientos de los tratamientos
|
||||
* De momento los lee olivia del cfg_geo.ini, habría que pasarlos por socket?
|
||||
*/
|
||||
public static double ancho_peat_def = 6;
|
||||
public static double ancho_acera_def = 1.5;
|
||||
public static double ancho_ap_lin_def = 2;
|
||||
public static double ancho_ap_bat_def = 4;
|
||||
public static double ancho_bord_lib_def = 1.5;
|
||||
//*************************************************************************************
|
||||
public static void iniciaLimpDef()
|
||||
{
|
||||
rellena_tto_gdb();
|
||||
rellena_amb_gdb();
|
||||
rellena_preftto_gdb();
|
||||
rellena_simb_tiptto();
|
||||
rellena_simblimp_vsm();
|
||||
inicia_tiempos();
|
||||
rellena_matrs();
|
||||
inicia_matr_restr();
|
||||
inicia_matr_amb();
|
||||
inicia_matr_carg_desc();
|
||||
}
|
||||
/**
|
||||
* Inicializa la matriz de strings con los nombres (tipos de tratamiento) que llevarán los grupos de la geodatabase importada a ArcGIS una vez realizada la sectorización y la planificación
|
||||
*/
|
||||
public static void rellena_tto_gdb()
|
||||
{
|
||||
LimpiezaDef.tto_gdb[(int)LimpiezaDef.TiposTto.TtoBarrMan] = "Barrido_man";
|
||||
LimpiezaDef.tto_gdb[(int)LimpiezaDef.TiposTto.TtoBarrMant] = "Barrido_man_mantenimiento";
|
||||
LimpiezaDef.tto_gdb[(int)LimpiezaDef.TiposTto.TtoBarrMot] = "Barrido_man_motorizado";
|
||||
LimpiezaDef.tto_gdb[(int)LimpiezaDef.TiposTto.TtoBarrMecCalz] = "Barrido_mec_calzadas";
|
||||
LimpiezaDef.tto_gdb[(int)LimpiezaDef.TiposTto.TtoBarrMecAcYCalzP] = "Barrido_mec_aceras_peat";
|
||||
LimpiezaDef.tto_gdb[(int)LimpiezaDef.TiposTto.TtoBarrMixAcYCalz] = "Barrido_mixto";
|
||||
LimpiezaDef.tto_gdb[(int)LimpiezaDef.TiposTto.TtoBaldMan] = "Baldeo_manual";
|
||||
LimpiezaDef.tto_gdb[(int)LimpiezaDef.TiposTto.TtoBaldMecCalz] = "Baldeo_mec_calzadas";
|
||||
LimpiezaDef.tto_gdb[(int)LimpiezaDef.TiposTto.TtoBaldMecAcYCalzP] = "Baldeo_mec_aceras_peat";
|
||||
LimpiezaDef.tto_gdb[(int)LimpiezaDef.TiposTto.TtoBaldMixAcYCalz] = "Baldeo_mixto";
|
||||
LimpiezaDef.tto_gdb[(int)LimpiezaDef.TiposTto.TtoFregMecAcYCalzP] = "Brigada_limpieza";
|
||||
LimpiezaDef.tto_gdb[(int)LimpiezaDef.TiposTto.TtoCaidaHoja] = "Caida_hoja";
|
||||
LimpiezaDef.tto_gdb[(int)LimpiezaDef.TiposTto.TtoPapeVaci] = "Vaciado_papeleras";
|
||||
LimpiezaDef.tto_gdb[(int)LimpiezaDef.TiposTto.TtoPapeLimp] = "Limpieza_papeleras";
|
||||
LimpiezaDef.tto_gdb[(int)LimpiezaDef.TiposTto.TtoLimpCont] = "Limpieza_contenedores";
|
||||
LimpiezaDef.tto_gdb[(int)LimpiezaDef.TiposTto.TtoLimpZInf] = "Limpieza_zonas_infant";
|
||||
LimpiezaDef.tto_gdb[(int)LimpiezaDef.TiposTto.TtoLimpPipi] = "Limpieza_pipicanes";
|
||||
LimpiezaDef.tto_gdb[(int)LimpiezaDef.TiposTto.TtoLimpSane] = "Limpieza_sanecanes";
|
||||
}
|
||||
|
||||
/**
|
||||
* Inicializa la matriz de strings con los nombres (ambitos de trabajo) que llevarán los featureclass de la geodatabase importada a ArcGIS una vez realizada la sectorización y la planificación
|
||||
*/
|
||||
public static void rellena_amb_gdb()
|
||||
{
|
||||
LimpiezaDef.ambs_gdb[(int)LimpiezaDef.AmbitsTra.AmbEjeCalle] = "EjCal";
|
||||
LimpiezaDef.ambs_gdb[(int)LimpiezaDef.AmbitsTra.AmbBordLibreMec] = "BordLibM";
|
||||
LimpiezaDef.ambs_gdb[(int)LimpiezaDef.AmbitsTra.AmbBordLibreNoMec] = "BordLibNM";
|
||||
LimpiezaDef.ambs_gdb[(int)LimpiezaDef.AmbitsTra.AmbBordAparc] = "BordBndApar";
|
||||
LimpiezaDef.ambs_gdb[(int)LimpiezaDef.AmbitsTra.AmbAceMec] = "AceM";
|
||||
LimpiezaDef.ambs_gdb[(int)LimpiezaDef.AmbitsTra.AmbAceNoMec] = "AceNM";
|
||||
LimpiezaDef.ambs_gdb[(int)LimpiezaDef.AmbitsTra.AmbCallePeatMec] = "PeatM";
|
||||
LimpiezaDef.ambs_gdb[(int)LimpiezaDef.AmbitsTra.AmbCallePeatNoMec] = "PeatNM";
|
||||
LimpiezaDef.ambs_gdb[(int)LimpiezaDef.AmbitsTra.AmbBordHojaMec] = "CaiHojM";
|
||||
LimpiezaDef.ambs_gdb[(int)LimpiezaDef.AmbitsTra.AmbBordHojaNoMec] = "CaiHojNM";
|
||||
LimpiezaDef.ambs_gdb[(int)LimpiezaDef.AmbitsTra.AmbConte] = "Contenerización";
|
||||
LimpiezaDef.ambs_gdb[(int)LimpiezaDef.AmbitsTra.AmbPape] = "Papeleras";
|
||||
LimpiezaDef.ambs_gdb[(int)LimpiezaDef.AmbitsTra.AmbZInf] = "ZonasInfantiles";
|
||||
LimpiezaDef.ambs_gdb[(int)LimpiezaDef.AmbitsTra.AmbPipi] = "Pipicanes";
|
||||
LimpiezaDef.ambs_gdb[(int)LimpiezaDef.AmbitsTra.AmbSane] = "Sanecanes";
|
||||
}
|
||||
|
||||
/**
|
||||
* Inicializa la matriz de strings con los prefijos (tipo de tratamiento) que llevarán los featureclass de la geodatabase importada a ArcGIS una vez realizada la sectorización y la planificación
|
||||
*/
|
||||
public static void rellena_preftto_gdb()
|
||||
{
|
||||
LimpiezaDef.preftto_gdb[(int)LimpiezaDef.TiposTto.TtoBarrMan] = "BarMan";
|
||||
LimpiezaDef.preftto_gdb[(int)LimpiezaDef.TiposTto.TtoBarrMant] = "BarManMant";
|
||||
LimpiezaDef.preftto_gdb[(int)LimpiezaDef.TiposTto.TtoBarrMot] = "BarMMot";
|
||||
LimpiezaDef.preftto_gdb[(int)LimpiezaDef.TiposTto.TtoBarrMecCalz] = "BarMC";
|
||||
LimpiezaDef.preftto_gdb[(int)LimpiezaDef.TiposTto.TtoBarrMecAcYCalzP] = "BarMAP";
|
||||
LimpiezaDef.preftto_gdb[(int)LimpiezaDef.TiposTto.TtoBarrMixAcYCalz] = "BarMix";
|
||||
LimpiezaDef.preftto_gdb[(int)LimpiezaDef.TiposTto.TtoBaldMan] = "BalMan";
|
||||
LimpiezaDef.preftto_gdb[(int)LimpiezaDef.TiposTto.TtoBaldMecCalz] = "BalMC";
|
||||
LimpiezaDef.preftto_gdb[(int)LimpiezaDef.TiposTto.TtoBaldMecAcYCalzP] = "BalMAP";
|
||||
LimpiezaDef.preftto_gdb[(int)LimpiezaDef.TiposTto.TtoBaldMixAcYCalz] = "BalMix";
|
||||
LimpiezaDef.preftto_gdb[(int)LimpiezaDef.TiposTto.TtoFregMecAcYCalzP] = "BL";
|
||||
LimpiezaDef.preftto_gdb[(int)LimpiezaDef.TiposTto.TtoCaidaHoja] = "CH";
|
||||
LimpiezaDef.preftto_gdb[(int)LimpiezaDef.TiposTto.TtoPapeVaci] = "VPap";
|
||||
LimpiezaDef.preftto_gdb[(int)LimpiezaDef.TiposTto.TtoPapeLimp] = "LPap";
|
||||
LimpiezaDef.preftto_gdb[(int)LimpiezaDef.TiposTto.TtoLimpCont] = "LC";
|
||||
LimpiezaDef.preftto_gdb[(int)LimpiezaDef.TiposTto.TtoLimpZInf] = "LZI";
|
||||
LimpiezaDef.preftto_gdb[(int)LimpiezaDef.TiposTto.TtoLimpPipi] = "LPip";
|
||||
LimpiezaDef.preftto_gdb[(int)LimpiezaDef.TiposTto.TtoLimpSane] = "LS";
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Inicializa la matriz de strings con los tipos de tratamientos y diferentes zonas de actuación de limpieza
|
||||
*/
|
||||
public static void rellena_simb_tiptto()
|
||||
{
|
||||
LimpiezaDef.simb_tto[0] = LimpiezaDef.Atributos.atr_esca;
|
||||
LimpiezaDef.simb_tto[1] = LimpiezaDef.Atributos.atr_fuent;
|
||||
LimpiezaDef.simb_tto[2] = LimpiezaDef.Atributos.atr_infan;
|
||||
LimpiezaDef.simb_tto[3] = LimpiezaDef.Atributos.atr_pape;
|
||||
LimpiezaDef.simb_tto[4] = LimpiezaDef.Atributos.atr_paso_niv;
|
||||
LimpiezaDef.simb_tto[5] = LimpiezaDef.Atributos.atr_pipi;
|
||||
LimpiezaDef.simb_tto[6] = LimpiezaDef.Atributos.atr_sane;
|
||||
LimpiezaDef.simb_tto[7] = LimpiezaDef.Atributos.atr_acera;
|
||||
//LimpiezaDef.simb_tto[7] = "Acera_Mecanizable";
|
||||
LimpiezaDef.simb_tto[8] = LimpiezaDef.Atributos.atr_aparc;
|
||||
LimpiezaDef.simb_tto[9] = LimpiezaDef.Atributos.atr_bord;
|
||||
LimpiezaDef.simb_tto[10] = LimpiezaDef.Atributos.atr_hoja;
|
||||
LimpiezaDef.simb_tto[11] = LimpiezaDef.Atributos.atr_peat;
|
||||
LimpiezaDef.simb_tto[12] = LimpiezaDef.Atributos.atr_terri;
|
||||
LimpiezaDef.simb_tto[13] = LimpiezaDef.Atributos.atr_ocio;
|
||||
LimpiezaDef.simb_tto[14] = LimpiezaDef.Atributos.atr_org_ofi;
|
||||
LimpiezaDef.simb_tto[15] = LimpiezaDef.Atributos.atr_parq;
|
||||
LimpiezaDef.simb_tto[16] = LimpiezaDef.Atributos.atr_park;
|
||||
LimpiezaDef.simb_tto[17] = LimpiezaDef.Atributos.atr_play;
|
||||
LimpiezaDef.simb_tto[18] = LimpiezaDef.Atributos.atr_polid;
|
||||
LimpiezaDef.simb_tto[19] = LimpiezaDef.Atributos.atr_turis;
|
||||
LimpiezaDef.simb_tto[20] = LimpiezaDef.Atributos.atr_solar;
|
||||
LimpiezaDef.simb_tto[21] = LimpiezaDef.Atributos.atr_suelo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Inicializa la matriz de strings con los nombres de los sibmolos referentes al tipo tratamiento de limpieza viaria
|
||||
*/
|
||||
public static void rellena_simblimp_vsm()
|
||||
{
|
||||
LimpiezaDef.nombre_simblimp_vsm[0] = "escaleras";
|
||||
LimpiezaDef.nombre_simblimp_vsm[1] = "Fuentes";
|
||||
LimpiezaDef.nombre_simblimp_vsm[2] = "Juegos infantiles";
|
||||
LimpiezaDef.nombre_simblimp_vsm[3] = "Papeleras";
|
||||
LimpiezaDef.nombre_simblimp_vsm[4] = "Paso a distinto nivel";
|
||||
LimpiezaDef.nombre_simblimp_vsm[5] = "Pipicans";
|
||||
LimpiezaDef.nombre_simblimp_vsm[6] = "Sanecans";
|
||||
LimpiezaDef.nombre_simblimp_vsm[7] = "Aceras";
|
||||
LimpiezaDef.nombre_simblimp_vsm[8] = "Aparcamiento";
|
||||
LimpiezaDef.nombre_simblimp_vsm[9] = "Bordillo libre";
|
||||
LimpiezaDef.nombre_simblimp_vsm[10] = "Caida Hoja";
|
||||
LimpiezaDef.nombre_simblimp_vsm[11] = "Peatonal";
|
||||
LimpiezaDef.nombre_simblimp_vsm[12] = "areas terrizas";
|
||||
LimpiezaDef.nombre_simblimp_vsm[13] = "Ocio";
|
||||
LimpiezaDef.nombre_simblimp_vsm[14] = "Organismos oficiales";
|
||||
LimpiezaDef.nombre_simblimp_vsm[15] = "Parques";
|
||||
LimpiezaDef.nombre_simblimp_vsm[16] = "Parquin";
|
||||
LimpiezaDef.nombre_simblimp_vsm[17] = "Playa";
|
||||
LimpiezaDef.nombre_simblimp_vsm[18] = "Polideportivo";
|
||||
LimpiezaDef.nombre_simblimp_vsm[19] = "Puntos de interes turistico";
|
||||
LimpiezaDef.nombre_simblimp_vsm[20] = "Solares";
|
||||
LimpiezaDef.nombre_simblimp_vsm[21] = "Uso suelo";
|
||||
}
|
||||
|
||||
public static void inicia_tiempos()
|
||||
{
|
||||
LimpiezaDef.tiempos_tto[(int)LimpiezaDef.TiposTto.TtoBarrMan] = LimpiezaDef.Parametros.ttoBarMan;
|
||||
LimpiezaDef.tiempos_tto[(int)LimpiezaDef.TiposTto.TtoBarrMant] = LimpiezaDef.Parametros.ttoBarManMant;
|
||||
LimpiezaDef.tiempos_tto[(int)LimpiezaDef.TiposTto.TtoBarrMot] = LimpiezaDef.Parametros.ttoBarMMot;
|
||||
LimpiezaDef.tiempos_tto[(int)LimpiezaDef.TiposTto.TtoBarrMecCalz] = LimpiezaDef.Parametros.ttoBarMC;
|
||||
LimpiezaDef.tiempos_tto[(int)LimpiezaDef.TiposTto.TtoBarrMecAcYCalzP] = LimpiezaDef.Parametros.ttoBarMAP;
|
||||
LimpiezaDef.tiempos_tto[(int)LimpiezaDef.TiposTto.TtoBarrMixAcYCalz] = LimpiezaDef.Parametros.ttoBarMix;
|
||||
LimpiezaDef.tiempos_tto[(int)LimpiezaDef.TiposTto.TtoBaldMan] = LimpiezaDef.Parametros.ttoBalMan;
|
||||
LimpiezaDef.tiempos_tto[(int)LimpiezaDef.TiposTto.TtoBaldMecCalz] = LimpiezaDef.Parametros.ttoBalMC;
|
||||
LimpiezaDef.tiempos_tto[(int)LimpiezaDef.TiposTto.TtoBaldMecAcYCalzP] = LimpiezaDef.Parametros.ttoBalMAP;
|
||||
LimpiezaDef.tiempos_tto[(int)LimpiezaDef.TiposTto.TtoBaldMixAcYCalz] = LimpiezaDef.Parametros.ttoBalMix;
|
||||
LimpiezaDef.tiempos_tto[(int)LimpiezaDef.TiposTto.TtoFregMecAcYCalzP] = LimpiezaDef.Parametros.ttoBL;
|
||||
LimpiezaDef.tiempos_tto[(int)LimpiezaDef.TiposTto.TtoCaidaHoja] = LimpiezaDef.Parametros.ttoCH;
|
||||
LimpiezaDef.tiempos_tto[(int)LimpiezaDef.TiposTto.TtoPapeVaci] = LimpiezaDef.Parametros.ttoVPap;
|
||||
LimpiezaDef.tiempos_tto[(int)LimpiezaDef.TiposTto.TtoPapeLimp] = LimpiezaDef.Parametros.ttoLPap;
|
||||
LimpiezaDef.tiempos_tto[(int)LimpiezaDef.TiposTto.TtoLimpCont] = LimpiezaDef.Parametros.ttoLC;
|
||||
LimpiezaDef.tiempos_tto[(int)LimpiezaDef.TiposTto.TtoLimpZInf] = LimpiezaDef.Parametros.ttoLZI;
|
||||
LimpiezaDef.tiempos_tto[(int)LimpiezaDef.TiposTto.TtoLimpPipi] = LimpiezaDef.Parametros.ttoLPip;
|
||||
LimpiezaDef.tiempos_tto[(int)LimpiezaDef.TiposTto.TtoLimpSane] = LimpiezaDef.Parametros.ttoLS;
|
||||
|
||||
LimpiezaDef.v_desplazamiento[(int)LimpiezaDef.TiposTto.TtoBarrMan] = LimpiezaDef.Parametros.vdespBarMan;
|
||||
LimpiezaDef.v_desplazamiento[(int)LimpiezaDef.TiposTto.TtoBarrMant] = LimpiezaDef.Parametros.vdespBarManMant;
|
||||
LimpiezaDef.v_desplazamiento[(int)LimpiezaDef.TiposTto.TtoBarrMot] = LimpiezaDef.Parametros.vdespBarMMot;
|
||||
LimpiezaDef.v_desplazamiento[(int)LimpiezaDef.TiposTto.TtoBarrMecCalz] = LimpiezaDef.Parametros.vdespBarMC;
|
||||
LimpiezaDef.v_desplazamiento[(int)LimpiezaDef.TiposTto.TtoBarrMecAcYCalzP] = LimpiezaDef.Parametros.vdespBarMAP;
|
||||
LimpiezaDef.v_desplazamiento[(int)LimpiezaDef.TiposTto.TtoBarrMixAcYCalz] = LimpiezaDef.Parametros.vdespBarMix;
|
||||
LimpiezaDef.v_desplazamiento[(int)LimpiezaDef.TiposTto.TtoBaldMan] = LimpiezaDef.Parametros.vdespBalMan;
|
||||
LimpiezaDef.v_desplazamiento[(int)LimpiezaDef.TiposTto.TtoBaldMecCalz] = LimpiezaDef.Parametros.vdespBalMC;
|
||||
LimpiezaDef.v_desplazamiento[(int)LimpiezaDef.TiposTto.TtoBaldMecAcYCalzP] = LimpiezaDef.Parametros.vdespBalMAP;
|
||||
LimpiezaDef.v_desplazamiento[(int)LimpiezaDef.TiposTto.TtoBaldMixAcYCalz] = LimpiezaDef.Parametros.vdespBalMix;
|
||||
LimpiezaDef.v_desplazamiento[(int)LimpiezaDef.TiposTto.TtoFregMecAcYCalzP] = LimpiezaDef.Parametros.vdespBL;
|
||||
LimpiezaDef.v_desplazamiento[(int)LimpiezaDef.TiposTto.TtoCaidaHoja] = LimpiezaDef.Parametros.vdespCH;
|
||||
LimpiezaDef.v_desplazamiento[(int)LimpiezaDef.TiposTto.TtoPapeVaci] = LimpiezaDef.Parametros.vdespVPap;
|
||||
LimpiezaDef.v_desplazamiento[(int)LimpiezaDef.TiposTto.TtoPapeLimp] = LimpiezaDef.Parametros.vdespLPap;
|
||||
LimpiezaDef.v_desplazamiento[(int)LimpiezaDef.TiposTto.TtoLimpCont] = LimpiezaDef.Parametros.vdespLC;
|
||||
LimpiezaDef.v_desplazamiento[(int)LimpiezaDef.TiposTto.TtoLimpZInf] = LimpiezaDef.Parametros.vdespLZI;
|
||||
LimpiezaDef.v_desplazamiento[(int)LimpiezaDef.TiposTto.TtoLimpPipi] = LimpiezaDef.Parametros.vdespLPip;
|
||||
LimpiezaDef.v_desplazamiento[(int)LimpiezaDef.TiposTto.TtoLimpSane] = LimpiezaDef.Parametros.vdespLS;
|
||||
}
|
||||
|
||||
/**
|
||||
* Rellena las matrices de datos
|
||||
*/
|
||||
public static void rellena_matrs()
|
||||
{
|
||||
tipos_tto_str[(int)LimpiezaDef.TiposTto.TtoBarrMan] = "Barrido manual";
|
||||
tipos_tto_str[(int)LimpiezaDef.TiposTto.TtoBarrMant] = "Barrido manual de mantenimiento";
|
||||
tipos_tto_str[(int)LimpiezaDef.TiposTto.TtoBarrMot] = "Barrido manual motorizado";
|
||||
tipos_tto_str[(int)LimpiezaDef.TiposTto.TtoBarrMecCalz] = "Barrido mecánico de calzadas";
|
||||
tipos_tto_str[(int)LimpiezaDef.TiposTto.TtoBarrMecAcYCalzP] = "Barrido mecánico de aceras y calzadas peatonales";
|
||||
tipos_tto_str[(int)LimpiezaDef.TiposTto.TtoBarrMixAcYCalz] = "Barrido mixto de aceras y calzadas";
|
||||
tipos_tto_str[(int)LimpiezaDef.TiposTto.TtoBaldMan] = "Baldeo manual";
|
||||
tipos_tto_str[(int)LimpiezaDef.TiposTto.TtoBaldMecCalz] = "Baldeo mecánico de calzadas";
|
||||
tipos_tto_str[(int)LimpiezaDef.TiposTto.TtoBaldMecAcYCalzP] = "Baldeo mecánico de aceras y calzadas peatonales";
|
||||
tipos_tto_str[(int)LimpiezaDef.TiposTto.TtoBaldMixAcYCalz] = "Baldeo mixto de aceras y calzadas";
|
||||
tipos_tto_str[(int)LimpiezaDef.TiposTto.TtoFregMecAcYCalzP] = "Fregado mecánico de aceras y calzadas peatonales";
|
||||
tipos_tto_str[(int)LimpiezaDef.TiposTto.TtoCaidaHoja] = "Caída de la hoja";
|
||||
tipos_tto_str[(int)LimpiezaDef.TiposTto.TtoPapeVaci] = "Vaciado de papeleras";
|
||||
tipos_tto_str[(int)LimpiezaDef.TiposTto.TtoPapeLimp] = "Limpieza de papeleras";
|
||||
tipos_tto_str[(int)LimpiezaDef.TiposTto.TtoLimpCont] = "Limpieza de ubicación de contenedores";
|
||||
tipos_tto_str[(int)LimpiezaDef.TiposTto.TtoLimpZInf] = "Limpieza de zonas infantiles";
|
||||
tipos_tto_str[(int)LimpiezaDef.TiposTto.TtoLimpPipi] = "Limpieza de pipicanes";
|
||||
tipos_tto_str[(int)LimpiezaDef.TiposTto.TtoLimpSane] = "Limpieza y reposición de sanecanes";
|
||||
|
||||
ambits_tra_str[(int)LimpiezaDef.AmbitsTra.AmbEjeCalle] = "Ejes de calle";
|
||||
ambits_tra_str[(int)LimpiezaDef.AmbitsTra.AmbBordLibreMec] = "Bordillos libres de aparcamiento mec.";
|
||||
ambits_tra_str[(int)LimpiezaDef.AmbitsTra.AmbBordLibreNoMec] = "Bordillos libres de aparcamiento no mec.";
|
||||
ambits_tra_str[(int)LimpiezaDef.AmbitsTra.AmbBordAparc] = "Bordillos con banda de aparcamiento";
|
||||
ambits_tra_str[(int)LimpiezaDef.AmbitsTra.AmbAceMec] = "Aceras mecanizables";
|
||||
ambits_tra_str[(int)LimpiezaDef.AmbitsTra.AmbAceNoMec] = "Aceras no mecanizables";
|
||||
ambits_tra_str[(int)LimpiezaDef.AmbitsTra.AmbCallePeatMec] = "Calles peatonales mecanizables";
|
||||
ambits_tra_str[(int)LimpiezaDef.AmbitsTra.AmbCallePeatNoMec] = "Calles peatonales no mecanizables";
|
||||
ambits_tra_str[(int)LimpiezaDef.AmbitsTra.AmbBordHojaMec] = "Bordillos con caída de hoja mecanizables";
|
||||
ambits_tra_str[(int)LimpiezaDef.AmbitsTra.AmbBordHojaNoMec] = "Bordillos con caída de hoja no mecanizables";
|
||||
ambits_tra_str[(int)LimpiezaDef.AmbitsTra.AmbConte] = "Puntos de contenerización";
|
||||
ambits_tra_str[(int)LimpiezaDef.AmbitsTra.AmbPape] = "Papeleras";
|
||||
ambits_tra_str[(int)LimpiezaDef.AmbitsTra.AmbZInf] = "Zonas infantiles";
|
||||
ambits_tra_str[(int)LimpiezaDef.AmbitsTra.AmbPipi] = "Pipicanes";
|
||||
ambits_tra_str[(int)LimpiezaDef.AmbitsTra.AmbSane] = "Sanecanes";
|
||||
}
|
||||
/**
|
||||
* Inicializa la matriz que da las restricciones de circulación de los tipos de tratamiento
|
||||
*/
|
||||
public static void inicia_matr_restr()
|
||||
{
|
||||
rest_circ = new bool[(int)LimpiezaDef.TiposTto.TtoN];//se inician a false
|
||||
rest_circ[(int)LimpiezaDef.TiposTto.TtoBarrMecCalz] = true;
|
||||
rest_circ[(int)LimpiezaDef.TiposTto.TtoBarrMixAcYCalz] = true;
|
||||
rest_circ[(int)LimpiezaDef.TiposTto.TtoBaldMecCalz] = true;
|
||||
rest_circ[(int)LimpiezaDef.TiposTto.TtoBaldMixAcYCalz] = true;
|
||||
rest_circ[(int)LimpiezaDef.TiposTto.TtoCaidaHoja] = true;
|
||||
rest_circ[(int)LimpiezaDef.TiposTto.TtoPapeVaci] = true;
|
||||
rest_circ[(int)LimpiezaDef.TiposTto.TtoPapeLimp] = true;
|
||||
rest_circ[(int)LimpiezaDef.TiposTto.TtoLimpCont] = true;
|
||||
rest_circ[(int)LimpiezaDef.TiposTto.TtoLimpZInf] = true;
|
||||
rest_circ[(int)LimpiezaDef.TiposTto.TtoLimpPipi] = true;
|
||||
rest_circ[(int)LimpiezaDef.TiposTto.TtoLimpSane] = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Inicializa la matriz que da los ámbitos correspondientes a los tipos de tratamiento
|
||||
*/
|
||||
public static void inicia_matr_amb()
|
||||
{
|
||||
//crea la matriz
|
||||
ambs_val = new AmbsVal[(int)LimpiezaDef.TiposTto.TtoN];
|
||||
|
||||
//va creando los arrays de cada elemento de la matriz correspondiente a un tipo de tratamiento
|
||||
|
||||
//Barrido manual
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBarrMan].n_ops = 1;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBarrMan].ambs_ops = new AmbsValOps[ambs_val[(int)LimpiezaDef.TiposTto.TtoBarrMan].n_ops];
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBarrMan].ambs_ops[0].ambs = new bool[(int)LimpiezaDef.AmbitsTra.AmbN]; //se inicializa todo a false
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBarrMan].ambs_ops[0].ambs[(int)LimpiezaDef.AmbitsTra.AmbAceMec] = true;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBarrMan].ambs_ops[0].ambs[(int)LimpiezaDef.AmbitsTra.AmbAceNoMec] = true;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBarrMan].ambs_ops[0].ambs[(int)LimpiezaDef.AmbitsTra.AmbCallePeatMec] = true;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBarrMan].ambs_ops[0].ambs[(int)LimpiezaDef.AmbitsTra.AmbCallePeatNoMec] = true;
|
||||
|
||||
//Barrido manual de mantenimiento
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBarrMant].n_ops = 1;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBarrMant].ambs_ops = new AmbsValOps[ambs_val[(int)LimpiezaDef.TiposTto.TtoBarrMant].n_ops];
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBarrMant].ambs_ops[0].ambs = new bool[(int)LimpiezaDef.AmbitsTra.AmbN]; //se inicializa todo a false
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBarrMant].ambs_ops[0].ambs = ambs_val[(int)LimpiezaDef.TiposTto.TtoBarrMan].ambs_ops[0].ambs;//igual que el manual
|
||||
//igual que el manual
|
||||
|
||||
//Barrido manual motorizado
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBarrMot].n_ops = 1;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBarrMot].ambs_ops = new AmbsValOps[ambs_val[(int)LimpiezaDef.TiposTto.TtoBarrMot].n_ops];
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBarrMot].ambs_ops[0].ambs = new bool[(int)LimpiezaDef.AmbitsTra.AmbN]; //se inicializa todo a false
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBarrMot].ambs_ops[0].ambs = new bool[(int)LimpiezaDef.AmbitsTra.AmbN]; //se inicializa todo a false
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBarrMot].ambs_ops[0].ambs[(int)LimpiezaDef.AmbitsTra.AmbAceMec] = true;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBarrMot].ambs_ops[0].ambs[(int)LimpiezaDef.AmbitsTra.AmbAceNoMec] = true;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBarrMot].ambs_ops[0].ambs[(int)LimpiezaDef.AmbitsTra.AmbCallePeatMec] = true;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBarrMot].ambs_ops[0].ambs[(int)LimpiezaDef.AmbitsTra.AmbCallePeatNoMec] = true;
|
||||
|
||||
//Barrido mecánico de calzadas
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBarrMecCalz].n_ops = 1;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBarrMecCalz].ambs_ops = new AmbsValOps[ambs_val[(int)LimpiezaDef.TiposTto.TtoBarrMecCalz].n_ops];
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBarrMecCalz].ambs_ops[0].ambs = new bool[(int)LimpiezaDef.AmbitsTra.AmbN]; //se inicializa todo a false
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBarrMecCalz].ambs_ops[0].ambs[(int)LimpiezaDef.AmbitsTra.AmbBordLibreMec] = true;
|
||||
|
||||
//Barrido mecánico de aceras y calzadas peatonales
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBarrMecAcYCalzP].n_ops = 1;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBarrMecAcYCalzP].ambs_ops = new AmbsValOps[ambs_val[(int)LimpiezaDef.TiposTto.TtoBarrMecAcYCalzP].n_ops];
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBarrMecAcYCalzP].ambs_ops[0].ambs = new bool[(int)LimpiezaDef.AmbitsTra.AmbN]; //se inicializa todo a false
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBarrMecAcYCalzP].ambs_ops[0].ambs[(int)LimpiezaDef.AmbitsTra.AmbAceMec] = true;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBarrMecAcYCalzP].ambs_ops[0].ambs[(int)LimpiezaDef.AmbitsTra.AmbCallePeatMec] = true;
|
||||
|
||||
//Barrido mixto de aceras y calzadas
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBarrMixAcYCalz].n_ops = 4;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBarrMixAcYCalz].ambs_ops = new AmbsValOps[ambs_val[(int)LimpiezaDef.TiposTto.TtoBarrMixAcYCalz].n_ops];
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBarrMixAcYCalz].ambs_ops[0].ambs = new bool[(int)LimpiezaDef.AmbitsTra.AmbN]; //se inicializa todo a false
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBarrMixAcYCalz].ambs_ops[0].ambs[(int)LimpiezaDef.AmbitsTra.AmbBordAparc] = true;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBarrMixAcYCalz].ambs_ops[0].ambs[(int)LimpiezaDef.AmbitsTra.AmbAceNoMec] = true;
|
||||
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBarrMixAcYCalz].ambs_ops[1].ambs = new bool[(int)LimpiezaDef.AmbitsTra.AmbN]; //se inicializa todo a false
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBarrMixAcYCalz].ambs_ops[1].ambs[(int)LimpiezaDef.AmbitsTra.AmbBordAparc] = true;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBarrMixAcYCalz].ambs_ops[1].ambs[(int)LimpiezaDef.AmbitsTra.AmbAceMec] = true;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBarrMixAcYCalz].ambs_ops[1].ambs[(int)LimpiezaDef.AmbitsTra.AmbAceNoMec] = true;
|
||||
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBarrMixAcYCalz].ambs_ops[2].ambs = new bool[(int)LimpiezaDef.AmbitsTra.AmbN]; //se inicializa todo a false
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBarrMixAcYCalz].ambs_ops[2].ambs[(int)LimpiezaDef.AmbitsTra.AmbBordAparc] = true;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBarrMixAcYCalz].ambs_ops[2].ambs[(int)LimpiezaDef.AmbitsTra.AmbBordLibreMec] = true;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBarrMixAcYCalz].ambs_ops[2].ambs[(int)LimpiezaDef.AmbitsTra.AmbAceNoMec] = true;
|
||||
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBarrMixAcYCalz].ambs_ops[3].ambs = new bool[(int)LimpiezaDef.AmbitsTra.AmbN]; //se inicializa todo a false
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBarrMixAcYCalz].ambs_ops[3].ambs[(int)LimpiezaDef.AmbitsTra.AmbBordAparc] = true;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBarrMixAcYCalz].ambs_ops[3].ambs[(int)LimpiezaDef.AmbitsTra.AmbBordLibreMec] = true;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBarrMixAcYCalz].ambs_ops[3].ambs[(int)LimpiezaDef.AmbitsTra.AmbAceMec] = true;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBarrMixAcYCalz].ambs_ops[3].ambs[(int)LimpiezaDef.AmbitsTra.AmbAceNoMec] = true;
|
||||
|
||||
//Baldeo manual
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBaldMan].n_ops = 1;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBaldMan].ambs_ops = new AmbsValOps[ambs_val[(int)LimpiezaDef.TiposTto.TtoBaldMan].n_ops];
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBaldMan].ambs_ops[0].ambs = new bool[(int)LimpiezaDef.AmbitsTra.AmbN]; //se inicializa todo a false
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBaldMan].ambs_ops[0].ambs[(int)LimpiezaDef.AmbitsTra.AmbAceMec] = true;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBaldMan].ambs_ops[0].ambs[(int)LimpiezaDef.AmbitsTra.AmbCallePeatMec] = true;
|
||||
|
||||
//Baldeo mecánico de calzadas
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBaldMecCalz].n_ops = 2;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBaldMecCalz].ambs_ops = new AmbsValOps[ambs_val[(int)LimpiezaDef.TiposTto.TtoBaldMecCalz].n_ops];
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBaldMecCalz].ambs_ops[0].ambs = new bool[(int)LimpiezaDef.AmbitsTra.AmbN]; //se inicializa todo a false
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBaldMecCalz].ambs_ops[0].ambs[(int)LimpiezaDef.AmbitsTra.AmbBordAparc] = true;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBaldMecCalz].ambs_ops[0].ambs[(int)LimpiezaDef.AmbitsTra.AmbBordLibreMec] = true;
|
||||
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBaldMecCalz].ambs_ops[1].ambs = new bool[(int)LimpiezaDef.AmbitsTra.AmbN]; //se inicializa todo a false
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBaldMecCalz].ambs_ops[1].ambs[(int)LimpiezaDef.AmbitsTra.AmbEjeCalle] = true;
|
||||
|
||||
//Baldeo mecánico de aceras y calzadas peatonales
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBaldMecAcYCalzP].n_ops = 1;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBaldMecAcYCalzP].ambs_ops = new AmbsValOps[ambs_val[(int)LimpiezaDef.TiposTto.TtoBaldMecAcYCalzP].n_ops];
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBaldMecAcYCalzP].ambs_ops[0].ambs = new bool[(int)LimpiezaDef.AmbitsTra.AmbN]; //se inicializa todo a false
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBaldMecAcYCalzP].ambs_ops[0].ambs[(int)LimpiezaDef.AmbitsTra.AmbAceMec] = true;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBaldMecAcYCalzP].ambs_ops[0].ambs[(int)LimpiezaDef.AmbitsTra.AmbCallePeatMec] = true;
|
||||
|
||||
//Baldeo mixto de aceras y calzadas
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBaldMixAcYCalz].n_ops = 4;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBaldMixAcYCalz].ambs_ops = new AmbsValOps[ambs_val[(int)LimpiezaDef.TiposTto.TtoBaldMixAcYCalz].n_ops];
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBaldMixAcYCalz].ambs_ops[0].ambs = new bool[(int)LimpiezaDef.AmbitsTra.AmbN]; //se inicializa todo a false
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBaldMixAcYCalz].ambs_ops[0].ambs[(int)LimpiezaDef.AmbitsTra.AmbBordAparc] = true;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBaldMixAcYCalz].ambs_ops[0].ambs[(int)LimpiezaDef.AmbitsTra.AmbAceNoMec] = true;
|
||||
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBaldMixAcYCalz].ambs_ops[1].ambs = new bool[(int)LimpiezaDef.AmbitsTra.AmbN]; //se inicializa todo a false
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBaldMixAcYCalz].ambs_ops[1].ambs[(int)LimpiezaDef.AmbitsTra.AmbBordAparc] = true;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBaldMixAcYCalz].ambs_ops[1].ambs[(int)LimpiezaDef.AmbitsTra.AmbAceMec] = true;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBaldMixAcYCalz].ambs_ops[1].ambs[(int)LimpiezaDef.AmbitsTra.AmbAceNoMec] = true;
|
||||
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBaldMixAcYCalz].ambs_ops[2].ambs = new bool[(int)LimpiezaDef.AmbitsTra.AmbN]; //se inicializa todo a false
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBaldMixAcYCalz].ambs_ops[2].ambs[(int)LimpiezaDef.AmbitsTra.AmbBordAparc] = true;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBaldMixAcYCalz].ambs_ops[2].ambs[(int)LimpiezaDef.AmbitsTra.AmbBordLibreMec] = true;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBaldMixAcYCalz].ambs_ops[2].ambs[(int)LimpiezaDef.AmbitsTra.AmbAceNoMec] = true;
|
||||
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBaldMixAcYCalz].ambs_ops[3].ambs = new bool[(int)LimpiezaDef.AmbitsTra.AmbN]; //se inicializa todo a false
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBaldMixAcYCalz].ambs_ops[3].ambs[(int)LimpiezaDef.AmbitsTra.AmbBordAparc] = true;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBaldMixAcYCalz].ambs_ops[3].ambs[(int)LimpiezaDef.AmbitsTra.AmbBordLibreMec] = true;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBaldMixAcYCalz].ambs_ops[3].ambs[(int)LimpiezaDef.AmbitsTra.AmbAceMec] = true;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoBaldMixAcYCalz].ambs_ops[3].ambs[(int)LimpiezaDef.AmbitsTra.AmbAceNoMec] = true;
|
||||
|
||||
//Fregado mecánico de aceras y calzadas peatonales
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoFregMecAcYCalzP].n_ops = 1;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoFregMecAcYCalzP].ambs_ops = new AmbsValOps[ambs_val[(int)LimpiezaDef.TiposTto.TtoFregMecAcYCalzP].n_ops];
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoFregMecAcYCalzP].ambs_ops[0].ambs = new bool[(int)LimpiezaDef.AmbitsTra.AmbN]; //se inicializa todo a false
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoFregMecAcYCalzP].ambs_ops[0].ambs[(int)LimpiezaDef.AmbitsTra.AmbAceMec] = true;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoFregMecAcYCalzP].ambs_ops[0].ambs[(int)LimpiezaDef.AmbitsTra.AmbCallePeatMec] = true;
|
||||
|
||||
|
||||
//Caída de la hoja
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoCaidaHoja].n_ops = 3;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoCaidaHoja].ambs_ops = new AmbsValOps[ambs_val[(int)LimpiezaDef.TiposTto.TtoCaidaHoja].n_ops];
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoCaidaHoja].ambs_ops[0].ambs = new bool[(int)LimpiezaDef.AmbitsTra.AmbN]; //se inicializa todo a false
|
||||
//No están especififacadas las características de la opción 1 ?
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoCaidaHoja].ambs_ops[0].ambs[(int)LimpiezaDef.AmbitsTra.AmbEjeCalle] = true;
|
||||
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoCaidaHoja].ambs_ops[1].ambs = new bool[(int)LimpiezaDef.AmbitsTra.AmbN]; //se inicializa todo a false
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoCaidaHoja].ambs_ops[1].ambs[(int)LimpiezaDef.AmbitsTra.AmbBordAparc] = true;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoCaidaHoja].ambs_ops[1].ambs[(int)LimpiezaDef.AmbitsTra.AmbBordLibreMec] = true;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoCaidaHoja].ambs_ops[1].ambs[(int)LimpiezaDef.AmbitsTra.AmbAceNoMec] = true;
|
||||
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoCaidaHoja].ambs_ops[2].ambs = new bool[(int)LimpiezaDef.AmbitsTra.AmbN]; //se inicializa todo a false
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoCaidaHoja].ambs_ops[2].ambs[(int)LimpiezaDef.AmbitsTra.AmbBordAparc] = true;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoCaidaHoja].ambs_ops[2].ambs[(int)LimpiezaDef.AmbitsTra.AmbBordLibreMec] = true;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoCaidaHoja].ambs_ops[2].ambs[(int)LimpiezaDef.AmbitsTra.AmbAceMec] = true;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoCaidaHoja].ambs_ops[2].ambs[(int)LimpiezaDef.AmbitsTra.AmbAceNoMec] = true;
|
||||
|
||||
//Vaciado de papeleras
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoPapeVaci].n_ops = 1;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoPapeVaci].ambs_ops = new AmbsValOps[ambs_val[(int)LimpiezaDef.TiposTto.TtoPapeVaci].n_ops];
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoPapeVaci].ambs_ops[0].ambs = new bool[(int)LimpiezaDef.AmbitsTra.AmbN]; //se inicializa todo a false
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoPapeVaci].ambs_ops[0].ambs[(int)LimpiezaDef.AmbitsTra.AmbPape] = true;
|
||||
|
||||
//Limpieza de papeleras
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoPapeLimp].n_ops = 1;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoPapeLimp].ambs_ops = new AmbsValOps[ambs_val[(int)LimpiezaDef.TiposTto.TtoPapeLimp].n_ops];
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoPapeLimp].ambs_ops[0].ambs = new bool[(int)LimpiezaDef.AmbitsTra.AmbN]; //se inicializa todo a false
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoPapeLimp].ambs_ops[0].ambs[(int)LimpiezaDef.AmbitsTra.AmbPape] = true;
|
||||
|
||||
//Limpieza de ubicación de contenedores
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoLimpCont].n_ops = 1;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoLimpCont].ambs_ops = new AmbsValOps[ambs_val[(int)LimpiezaDef.TiposTto.TtoLimpCont].n_ops];
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoLimpCont].ambs_ops[0].ambs = new bool[(int)LimpiezaDef.AmbitsTra.AmbN]; //se inicializa todo a false
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoLimpCont].ambs_ops[0].ambs[(int)LimpiezaDef.AmbitsTra.AmbConte] = true;
|
||||
|
||||
//<Limpieza de zonas infantiles
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoLimpZInf].n_ops = 1;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoLimpZInf].ambs_ops = new AmbsValOps[ambs_val[(int)LimpiezaDef.TiposTto.TtoLimpZInf].n_ops];
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoLimpZInf].ambs_ops[0].ambs = new bool[(int)LimpiezaDef.AmbitsTra.AmbN]; //se inicializa todo a false
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoLimpZInf].ambs_ops[0].ambs[(int)LimpiezaDef.AmbitsTra.AmbZInf] = true;
|
||||
|
||||
//<Limpieza de pipicanes
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoLimpPipi].n_ops = 1;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoLimpPipi].ambs_ops = new AmbsValOps[ambs_val[(int)LimpiezaDef.TiposTto.TtoLimpPipi].n_ops];
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoLimpPipi].ambs_ops[0].ambs = new bool[(int)LimpiezaDef.AmbitsTra.AmbN]; //se inicializa todo a false
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoLimpPipi].ambs_ops[0].ambs[(int)LimpiezaDef.AmbitsTra.AmbPipi] = true;
|
||||
|
||||
//<Limpieza y reposición de sanecanes
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoLimpSane].n_ops = 1;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoLimpSane].ambs_ops = new AmbsValOps[ambs_val[(int)LimpiezaDef.TiposTto.TtoLimpSane].n_ops];
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoLimpSane].ambs_ops[0].ambs = new bool[(int)LimpiezaDef.AmbitsTra.AmbN]; //se inicializa todo a false
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoLimpSane].ambs_ops[0].ambs[(int)LimpiezaDef.AmbitsTra.AmbSane] = true;
|
||||
|
||||
//<Tratamiento personalizado
|
||||
//se pone 3 opciones para generar el array de booleanos para poder elegir ambitos lienales, puntutales o eje de calle.
|
||||
//realmente son opciones comunes a todos los tratamientos y no exclusivos de TtoCustom
|
||||
//se aprovecha que está creado el array de booleanos para rellenar las opciones golobales a todos los tratamientos
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoCustom].n_ops = 3;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoCustom].ambs_ops = new AmbsValOps[ambs_val[(int)LimpiezaDef.TiposTto.TtoCustom].n_ops];
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoCustom].ambs_ops[0].ambs = new bool[(int)LimpiezaDef.AmbitsTra.AmbN]; //se inicializa todo a false
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoCustom].ambs_ops[0].ambs[(int)LimpiezaDef.AmbitsTra.AmbBordLibreMec] = true;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoCustom].ambs_ops[0].ambs[(int)LimpiezaDef.AmbitsTra.AmbBordLibreNoMec] = true;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoCustom].ambs_ops[0].ambs[(int)LimpiezaDef.AmbitsTra.AmbBordAparc] = true;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoCustom].ambs_ops[0].ambs[(int)LimpiezaDef.AmbitsTra.AmbAceMec] = true;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoCustom].ambs_ops[0].ambs[(int)LimpiezaDef.AmbitsTra.AmbAceNoMec] = true;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoCustom].ambs_ops[0].ambs[(int)LimpiezaDef.AmbitsTra.AmbCallePeatMec] = true;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoCustom].ambs_ops[0].ambs[(int)LimpiezaDef.AmbitsTra.AmbCallePeatNoMec] = true;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoCustom].ambs_ops[0].ambs[(int)LimpiezaDef.AmbitsTra.AmbBordHojaMec] = true;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoCustom].ambs_ops[0].ambs[(int)LimpiezaDef.AmbitsTra.AmbBordHojaNoMec] = true;
|
||||
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoCustom].ambs_ops[1].ambs = new bool[(int)LimpiezaDef.AmbitsTra.AmbN]; //se inicializa todo a false
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoCustom].ambs_ops[1].ambs[(int)LimpiezaDef.AmbitsTra.AmbConte] = true;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoCustom].ambs_ops[1].ambs[(int)LimpiezaDef.AmbitsTra.AmbPape] = true;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoCustom].ambs_ops[1].ambs[(int)LimpiezaDef.AmbitsTra.AmbZInf] = true;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoCustom].ambs_ops[1].ambs[(int)LimpiezaDef.AmbitsTra.AmbPipi] = true;
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoCustom].ambs_ops[1].ambs[(int)LimpiezaDef.AmbitsTra.AmbSane] = true;
|
||||
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoCustom].ambs_ops[2].ambs = new bool[(int)LimpiezaDef.AmbitsTra.AmbN]; //se inicializa todo a false
|
||||
ambs_val[(int)LimpiezaDef.TiposTto.TtoCustom].ambs_ops[2].ambs[(int)LimpiezaDef.AmbitsTra.AmbEjeCalle] = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Inicializa la matriz booleana que habilita o deshabilita el timechecker del tiempo de carga y descarga, dependiendo del tipo de tratamiento
|
||||
*/
|
||||
public static void inicia_matr_carg_desc()
|
||||
{
|
||||
t_carg_desc = new bool[(int)LimpiezaDef.TiposTto.TtoN]; //se inician a false
|
||||
t_carg_desc[(int)LimpiezaDef.TiposTto.TtoBarrMan] = false;
|
||||
t_carg_desc[(int)LimpiezaDef.TiposTto.TtoBarrMant] = false;
|
||||
t_carg_desc[(int)LimpiezaDef.TiposTto.TtoBarrMot] = true;
|
||||
t_carg_desc[(int)LimpiezaDef.TiposTto.TtoBarrMecCalz] = true;
|
||||
t_carg_desc[(int)LimpiezaDef.TiposTto.TtoBarrMecAcYCalzP] = true;
|
||||
t_carg_desc[(int)LimpiezaDef.TiposTto.TtoBarrMixAcYCalz] = true;
|
||||
t_carg_desc[(int)LimpiezaDef.TiposTto.TtoBaldMan] = true;
|
||||
t_carg_desc[(int)LimpiezaDef.TiposTto.TtoBaldMecCalz] = true;
|
||||
t_carg_desc[(int)LimpiezaDef.TiposTto.TtoBaldMecAcYCalzP] = true;
|
||||
t_carg_desc[(int)LimpiezaDef.TiposTto.TtoBaldMixAcYCalz] = true;
|
||||
t_carg_desc[(int)LimpiezaDef.TiposTto.TtoFregMecAcYCalzP] = true;
|
||||
t_carg_desc[(int)LimpiezaDef.TiposTto.TtoCaidaHoja] = true;
|
||||
t_carg_desc[(int)LimpiezaDef.TiposTto.TtoPapeVaci] = false;
|
||||
t_carg_desc[(int)LimpiezaDef.TiposTto.TtoPapeLimp] = false;
|
||||
t_carg_desc[(int)LimpiezaDef.TiposTto.TtoLimpCont] = false;
|
||||
t_carg_desc[(int)LimpiezaDef.TiposTto.TtoLimpZInf] = false;
|
||||
t_carg_desc[(int)LimpiezaDef.TiposTto.TtoLimpPipi] = false;
|
||||
t_carg_desc[(int)LimpiezaDef.TiposTto.TtoLimpSane] = false;
|
||||
t_carg_desc[(int)LimpiezaDef.TiposTto.TtoCustom] = true;
|
||||
}
|
||||
/**Devuelve el array de los ámbitos comunes y no comunes de las opciones de un tratamiento tto
|
||||
* Es un array de longitud el número de ámbitos totales, con true en las posiciones en los que el ámbito sea común o
|
||||
* no común en las opciones
|
||||
*/
|
||||
public static bool[] dame_amb(int tto)
|
||||
{
|
||||
int i;
|
||||
bool sig;
|
||||
bool[] amb_com = new bool[(int)LimpiezaDef.AmbitsTra.AmbN];
|
||||
|
||||
for (int j = 0; j < (int)LimpiezaDef.AmbitsTra.AmbN; j++)
|
||||
{
|
||||
sig = false;
|
||||
for (i = 0; i < ambs_val[tto].n_ops && !sig; i++)
|
||||
{
|
||||
if (ambs_val[tto].ambs_ops[i].ambs[j]) //con que encuentre uno true lo pone y pasa al siguiente
|
||||
{
|
||||
amb_com[j] = sig = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return amb_com;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,591 @@
|
|||
/**
|
||||
* @file GeneralDef.cs
|
||||
* Clase con definiciones globales comunes al proyecto Olivia y a OliviaTasks.
|
||||
*/
|
||||
/**
|
||||
* Clase con definiciones globales comunes al proyecto Olivia y a OliviaTasks.
|
||||
*/
|
||||
namespace OliviaAddInPro.Model
|
||||
{
|
||||
public static class GeneralDef
|
||||
{
|
||||
//*************************************************************************************
|
||||
//Enums y structs generales
|
||||
/**
|
||||
* Tipos de ejecución de la herramienta Olivia
|
||||
*/
|
||||
public enum TiposOliv
|
||||
{
|
||||
OlivNoDef = -1,
|
||||
OlivLimp, //<Indica herramienta de limpieza viaria
|
||||
OlivResi, //<Indica herramienta de recogida de residuos
|
||||
OlivJard, //<Indica herramienta de jardines
|
||||
OlivEstReg, //<Indica herramienta de estacionamiento regulado
|
||||
OlivN //<Número herramientas
|
||||
};
|
||||
/**
|
||||
* Unidades del tiempo de tratamiento
|
||||
*/
|
||||
public enum OlvTiposTto
|
||||
{
|
||||
OlvTipTtoNoDef = -1,
|
||||
OlvTipTtoMin,
|
||||
OlvTipTtoMh,
|
||||
OlvTipTtoMh_eje,
|
||||
OlvTipTtoM2h,
|
||||
OlvTipTtoM2h_eje,
|
||||
};
|
||||
//*************************************************************************************
|
||||
//Variables generales
|
||||
/*
|
||||
* Define el nombre en registro de la clave
|
||||
*/
|
||||
public const string OlvRegKey = "SOFTWARE\\Intergeo Tecnología\\Olivia";
|
||||
/*
|
||||
* Define el máximo y paso de la ventana de progreso de ejecución, el mínimo es 0
|
||||
*/
|
||||
public const int ProgrMax = 100;
|
||||
public const int ProgrStep = 5;
|
||||
public const int ParamN = 5;
|
||||
public const int ParamLimpN = 37;
|
||||
public const int ParamRecoN = 40;
|
||||
/*
|
||||
* Define el separador entre parámetros de la llamada al proceso oliviatasks
|
||||
*/
|
||||
public const string EjecGeoParamSep = "/";
|
||||
public const string EjecGeoProgName = "olivia";
|
||||
public const string EjecGeoParamIgual = ":";
|
||||
public const string NombOlvTasks = "OliviaTasks";
|
||||
public const string NombColSector = "SECTOR";
|
||||
/**
|
||||
* Define el nombre del grupo de propiedades generales
|
||||
*/
|
||||
public const string GrupoGen = "PATHS";
|
||||
/**
|
||||
* Define el nombre del grupo de GDBs (tanto para la gdb de datos generales como para la red navegable)
|
||||
*/
|
||||
public const string GrupoGDB = "GENERAL";
|
||||
/**
|
||||
* Define el nombre del grupo de propiedades de capas generales
|
||||
*/
|
||||
public const string GrupoCapa = "CAPAS_GENERALES";
|
||||
/**
|
||||
* Define el nombre del grupo de propiedades de limpieza
|
||||
*/
|
||||
public const string GrupoCapaLImp = "CAPAS_LIMP";
|
||||
/**
|
||||
* Define el nombre del grupo de propiedades de limpieza
|
||||
*/
|
||||
public const string GrupoCampoLimp = "CAMPOS_LIMP";
|
||||
/**
|
||||
* Define el nombre del grupo de atributos de limpieza
|
||||
*/
|
||||
public const string GrupoAtribLimp = "ATRIBUTOS_LIMP";
|
||||
/**
|
||||
* Define el nombre del grupo de propiedades de recogida
|
||||
*/
|
||||
public const string GrupoFiltLimp = "FILTROS_LIMP";
|
||||
/**
|
||||
* Define el nombre del grupo de parámetros de limpieza
|
||||
*/
|
||||
public const string GrupoParamLimp = "PARAM_LIMP";
|
||||
/**
|
||||
* Define el nombre del grupo de propiedades de recogida
|
||||
*/
|
||||
public const string GrupoCampoReco = "CAMPOS_RECO";
|
||||
/**
|
||||
* Define el nombre del grupo de atributos de recogida
|
||||
*/
|
||||
public const string GrupoAtribReco = "ATRIBUTOS_RECO";
|
||||
/**
|
||||
* Define el nombre del grupo de atributos de la lateralidad de la carga de los vehículos
|
||||
*/
|
||||
public const string GrupoCampoLater = "ATRIBUTOS_LATERAL";
|
||||
/**
|
||||
* Define el nombre del grupo de propiedades de recogida
|
||||
*/
|
||||
public const string GrupoCampoSens = "CAMPOS_SENS";
|
||||
/**
|
||||
* Define el nombre del grupo de propiedades de CSV
|
||||
*/
|
||||
public const string GrupoCampoCsv = "CAMPOS_CSV";
|
||||
/**
|
||||
* Define el nombre del grupo de propiedades de recogida
|
||||
*/
|
||||
public const string GrupoFiltReco = "FILTROS_RECO";
|
||||
/**
|
||||
* Define el nombre del grupo de parámetros de recogida
|
||||
*/
|
||||
public const string GrupoParamReco = "PARAM_RECO";
|
||||
/**
|
||||
* Define el nombre del grupo de parámetros de recogida
|
||||
*/
|
||||
public const string GrupoSimbVsm = "SIMBOL_VSM";
|
||||
/**
|
||||
* Define el nombre del grupo de campos de la red navegable
|
||||
*/
|
||||
public const string GrupoCampoNW = "CAMPOS_NW";
|
||||
public const string GrupoCampoOtros = "OTROS_PARAM";
|
||||
/**
|
||||
* Define el nombre del grupo de propiedades generales
|
||||
*/
|
||||
public const string OliviaDirWork = "%dir_work%";
|
||||
/**
|
||||
* Define las propiedades generales a guardar y leer
|
||||
*/
|
||||
public const string GG_pw = "path_work";
|
||||
public const string GG_pg = "path_exe";
|
||||
public const string GG_pdl = "path_dll";
|
||||
public const string GG_pt = "path_temp";
|
||||
public const string GG_pd = "path_data";
|
||||
public const string GG_pn = "path_nw";
|
||||
public const string GG_pcar = "path_cart";
|
||||
public const string GG_pcfg = "path_cfgeo";
|
||||
public const string GG_strtto = "str_tto";
|
||||
////
|
||||
public const string GG_tipo = "tipo";
|
||||
public const string GG_ip = "ip";
|
||||
public const string GG_port = "port";
|
||||
public const string GG_tout = "tout";
|
||||
/////
|
||||
public const string GG_tco = "t_conv";
|
||||
public const string GG_tdc = "t_descan";
|
||||
public const string GG_npt = "n_ptsctrl";
|
||||
public const string GG_sec = "n_secdef";
|
||||
public const string GG_coox = "coor_inst_x";
|
||||
public const string GG_cooy = "coor_inst_y";
|
||||
public const string GG_hini = "h_inicio";
|
||||
public const string GG_trafic = "trafico";
|
||||
public const string GG_ais = "aislados";
|
||||
|
||||
/**
|
||||
* Define las propiedades de limpieza a enviar a oliviatasks
|
||||
*/
|
||||
public const string GL_res = "restr_cir";
|
||||
public const string GL_tto = "t_tto";
|
||||
public const string GL_uto = "u_tto";
|
||||
public const string GL_vdp = "v_despl";
|
||||
public const string GL_tdp = "t_despl";
|
||||
public const string GL_tca = "t_carg";
|
||||
public const string GL_anc = "anch_med";
|
||||
/**
|
||||
* Define las propiedades de recogida a enviar a oliviatasks
|
||||
*/
|
||||
public const string GR_camp_cap = "campo_capaci";
|
||||
public const string GR_kgM = "kg_max";
|
||||
public const string GR_camp_uds = "campo_uds";
|
||||
public const string GR_camp_kgrec = "campo_kgrecog";
|
||||
public const string GR_kgrecog = "recogida_kg";
|
||||
public const string GR_carga_cont = "carga_cont";
|
||||
public const string GR_dens = "densidad";
|
||||
public const string GR_tvc = "t_vacia";
|
||||
public const string GR_tdca = "t_descarg";
|
||||
public const string GR_tsal = "t_sallleg";
|
||||
public const string GR_anc = "anch_vehi";
|
||||
public const string GR_gir = "giro_vehi";
|
||||
public const string GR_descx = "coor_desc_x";
|
||||
public const string GR_descy = "coor_desc_y";
|
||||
public const string GR_sens_id = "sens_id";
|
||||
public const string GR_sens_url = "sens_url";
|
||||
public const string GR_sens_llen = "sens_lleno";
|
||||
public const string GR_sens_fecha = "sens_fechai";
|
||||
public const string GR_sens_fechaf = "sens_fechaf";
|
||||
public const string GR_sens_modo = "md_pet";
|
||||
public const string GR_lateral = "lateralidad";
|
||||
/**
|
||||
* Define las GDBs a leer
|
||||
*/
|
||||
public const string GDB_gen = "gdb_general";
|
||||
public const string GDB_nw = "red_carreteras";
|
||||
public const string simb_vsm = "simbologia_vsm";
|
||||
public const string simb_esri = "simbologia_esri";
|
||||
public const string GDB_puerto = "puerto";
|
||||
public const string GG_buff = "buffer_export";
|
||||
/**
|
||||
* Define los nombres de las capas de la GDB general
|
||||
*/
|
||||
public const string GC_eje = "eje_via";
|
||||
public const string GC_zon = "zonas";
|
||||
public const string GC_rest = "restricciones";
|
||||
public const string GC_muni = "municipios";
|
||||
/**
|
||||
* Define los nombres de los campos a consultar en la GDB general
|
||||
*/
|
||||
public const string GA_zon = "cons_zon";
|
||||
public const string GA_cap_zon = "cons_cap_zon";
|
||||
/**
|
||||
* Define los nombres de las capas de limpieza de la GDB general
|
||||
*/
|
||||
public const string GCA_eje = "eje_via";
|
||||
public const string GCA_niv = "niveles";
|
||||
public const string GCA_zon = "zonas";
|
||||
public const string GCA_cont = "contenedor";
|
||||
public const string GCA_mobi = "mobiliario";
|
||||
public const string GCA_limp = "limp_meca";
|
||||
public const string GCA_inst = "instalaciones";
|
||||
public const string GCA_rest = "restricciones";
|
||||
public const string GCA_muni = "municipios";
|
||||
/**
|
||||
* Define los nombres de los campos de limpieza a consultar en la GDB general
|
||||
*/
|
||||
public const string GAA_entid = "cons_tip_ent";
|
||||
public const string GAA_mecan = "cons_mecaniz";
|
||||
public const string GAA_obser = "cons_obser";
|
||||
public const string GAA_anch_tip = "cons_anch_tip";
|
||||
public const string GAA_tipolo = "cons_tipolo";
|
||||
/**
|
||||
* Define los nombres de los atributos de limpieza a consultar en la GDB general
|
||||
*/
|
||||
public const string GAL_esc = "atr_esca";
|
||||
public const string GAL_fuent = "atr_fuent";
|
||||
public const string GAL_infan = "atr_infan";
|
||||
public const string GAL_pape = "atr_pape";
|
||||
public const string GAL_paso_niv = "atr_paso_niv";
|
||||
public const string GAL_pipi = "atr_pipi";
|
||||
public const string GAL_sane = "atr_sane";
|
||||
public const string GAL_acera = "atr_acera";
|
||||
public const string GAL_aparc = "atr_aparc";
|
||||
public const string GAL_bord = "atr_bord";
|
||||
public const string GAL_hoja = "atr_hoja";
|
||||
public const string GAL_peat = "atr_peat";
|
||||
public const string GAL_terri = "atr_terri";
|
||||
public const string GAL_ocio = "atr_ocio";
|
||||
public const string GAL_org_ofi = "atr_org_ofi";
|
||||
public const string GAL_parq = "atr_parq";
|
||||
public const string GAL_park = "atr_park";
|
||||
public const string GAL_play = "atr_play";
|
||||
public const string GAL_polid = "atr_polid";
|
||||
public const string GAL_turis = "atr_turis";
|
||||
public const string GAL_solar = "atr_solar";
|
||||
public const string GAL_suelo = "atr_suelo";
|
||||
public const string GAL_ap_lin = "atr_ap_lin";
|
||||
public const string GAL_ap_bat = "atr_ap_bat";
|
||||
/**
|
||||
* Define los nombres de los filtros de las consultas de limpieza a la GDB general
|
||||
*/
|
||||
public const string GFA_eje = "ejes";
|
||||
public const string GFA_blm = "bord_libre_mec";
|
||||
public const string GFA_blnm = "bord_libre_no_mec";
|
||||
public const string GFA_ba = "bord_aparc";
|
||||
public const string GFA_bam = "bord_acera_mec";
|
||||
public const string GFA_banm = "bord_acera_no_mec";
|
||||
public const string GFA_cpm = "calle_peat_mec";
|
||||
public const string GFA_cpnm = "calle_peat_no_mec";
|
||||
public const string GFA_chm = "caida_hoja_mec";
|
||||
public const string GFA_chnm = "caida_hoja_no_mec";
|
||||
public const string GFA_cont = "contenedores";
|
||||
public const string GFA_pap = "pape";
|
||||
public const string GFA_inf = "zon_inf";
|
||||
public const string GFA_pipi = "pipican";
|
||||
public const string GFA_sane = "sanecan";
|
||||
/**
|
||||
* Define los nombres de los parámetros de limpieza a la GDB general
|
||||
*/
|
||||
public const string GPA_ttoM = "t_tratamiento_max";
|
||||
public const string GPA_ttom = "t_tratamiento_min";
|
||||
public const string GPA_v_despM = "v_desplaz_max";
|
||||
public const string GPA_v_despm = "v_desplaz_min";
|
||||
public const string GPA_cardescM = "t_carga_desc_max";
|
||||
public const string GPA_cardescm = "t_carga_desc_min";
|
||||
public const string GPA_cardesc = "t_carga_desc";
|
||||
public const string GPA_t_despM = "t_desplaz_max";
|
||||
public const string GPA_t_despm = "t_desplaz_min";
|
||||
public const string GPA_t_desp = "t_desplaz";
|
||||
public const string GPA_convM = "t_convenio_max";
|
||||
public const string GPA_convm = "t_convenio_min";
|
||||
public const string GPA_conv = "t_convenio";
|
||||
public const string GPA_descM = "t_descanso_max";
|
||||
public const string GPA_descm = "t_descanso_min";
|
||||
public const string GPA_desc = "t_descanso";
|
||||
public const string GPA_h_inicio = "hora_inicio";
|
||||
public const string GPA_anchM = "ancho_via_max";
|
||||
public const string GPA_anchm = "ancho_via_min";
|
||||
public const string GPA_anch = "ancho_via";
|
||||
public const string GPA_ttoBarMan = "t_tratamiento_BarMan";
|
||||
public const string GPA_ttoBarManMant = "t_tratamiento_BarManMant";
|
||||
public const string GPA_ttoBarMMot = "t_tratamiento_BarMMot";
|
||||
public const string GPA_ttoBarMC = "t_tratamiento_BarMC";
|
||||
public const string GPA_ttoBarMAP = "t_tratamiento_BarMAP";
|
||||
public const string GPA_ttoBarMix = "t_tratamiento_BarMix";
|
||||
public const string GPA_ttoBalMan = "t_tratamiento_BalMan";
|
||||
public const string GPA_ttoBalMC = "t_tratamiento_BalMC";
|
||||
public const string GPA_ttoBalMAP = "t_tratamiento_BalMAP";
|
||||
public const string GPA_ttoBalMix = "t_tratamiento_BalMix";
|
||||
public const string GPA_ttoBL = "t_tratamiento_BL";
|
||||
public const string GPA_ttoCH = "t_tratamiento_CH";
|
||||
public const string GPA_ttoVPap = "t_tratamiento_VPap";
|
||||
public const string GPA_ttoLPap = "t_tratamiento_LPap";
|
||||
public const string GPA_ttoLC = "t_tratamiento_LC";
|
||||
public const string GPA_ttoLZI = "t_tratamiento_LZI";
|
||||
public const string GPA_ttoLPip = "t_tratamiento_LPip";
|
||||
public const string GPA_ttoLS = "t_tratamiento_LS";
|
||||
public const string GPA_vdespBarMan = "v_desp_BarMan";
|
||||
public const string GPA_vdespBarManMant = "v_desp_BarManMant";
|
||||
public const string GPA_vdespBarMMot = "v_desp_BarMMot";
|
||||
public const string GPA_vdespBarMC = "v_desp_BarMC";
|
||||
public const string GPA_vdespBarMAP = "v_desp_BarMAP";
|
||||
public const string GPA_vdespBarMix = "v_desp_BarMix";
|
||||
public const string GPA_vdespBalMan = "v_desp_BalMan";
|
||||
public const string GPA_vdespBalMC = "v_desp_BalMC";
|
||||
public const string GPA_vdespBalMAP = "v_desp_BalMAP";
|
||||
public const string GPA_vdespBalMix = "v_desp_BalMix";
|
||||
public const string GPA_vdespBL = "v_desp_BL";
|
||||
public const string GPA_vdespCH = "v_desp_CH";
|
||||
public const string GPA_vdespVPap = "v_desp_VPap";
|
||||
public const string GPA_vdespLPap = "v_desp_LPap";
|
||||
public const string GPA_vdespLC = "v_desp_LC";
|
||||
public const string GPA_vdespLZI = "v_desp_LZI";
|
||||
public const string GPA_vdespLPip = "v_desp_LPip";
|
||||
public const string GPA_vdespLS = "v_desp_LS";
|
||||
public const string GPA_umbral_reco = "umbral_recogida";
|
||||
/**
|
||||
* Define los nombres de las capas de recogida de la GDB general
|
||||
*/
|
||||
public const string GCR_cont = "conte";
|
||||
public const string GCR_inst = "instala";
|
||||
public const string GCR_desc = "descarg";
|
||||
/**
|
||||
* Define los nombres de los campos de recogida a leer en la GDB general
|
||||
*/
|
||||
public const string GAT_organica = "organica";
|
||||
public const string GAT_resto = "resto";
|
||||
public const string GAT_envase = "envase";
|
||||
public const string GAT_papel = "papel";
|
||||
public const string GAT_vidrio = "vidrio";
|
||||
public const string GAT_trasera = "trasera";
|
||||
public const string GAT_lateral = "lateral";
|
||||
public const string GAT_superior = "superior";
|
||||
public const string GAT_bilat = "bilat";
|
||||
public const string GAT_bolseo = "bolseo";
|
||||
public const string GAT_lavado = "lavado";
|
||||
/**
|
||||
* Define los nombres de los atributos de recogida a leer en la GDB general
|
||||
*/
|
||||
public const string GAR_id = "id";
|
||||
public const string GAR_nomrec = "nomrec";
|
||||
public const string GAR_lateral = "lateralidad";
|
||||
public const string GAR_frac = "frac";
|
||||
public const string GAR_capac = "capac";
|
||||
public const string GAR_uds = "uds";
|
||||
public const string GAR_kgrec = "kgrec";
|
||||
public const string GAR_kgrec_val = "kgrec_val";
|
||||
public const string GAR_is_lleno = "is_lleno";
|
||||
public const string GAR_is_campo = "is_campo";
|
||||
/**
|
||||
* Define los nombres de los atributos de la lateralidad de la carga de los vehículos de recogida de residuos.
|
||||
*/
|
||||
public const string GAL_amb = "ambos";
|
||||
public const string GAL_dcha = "derecha";
|
||||
public const string GAL_izq = "izquierda";
|
||||
/**
|
||||
* Define los nombres de los campos de la capa de sensores a leer en los datos de entrada
|
||||
*/
|
||||
public const string GSR_id = "id";
|
||||
public const string GSR_url = "url";
|
||||
public const string GSR_fecha = "fecha";
|
||||
public const string GSR_hora = "hora";
|
||||
public const string GSR_fechaf = "fecha_fin";
|
||||
public const string GSR_horaf = "hora_fin";
|
||||
/**
|
||||
* Define los nombres de los campos de los datos externos (CSV) a leer en los datos de entrada
|
||||
*/
|
||||
public const string GCR_id = "id";
|
||||
public const string GCR_llen = "llenado";
|
||||
public const string GCR_fecha = "fecha";
|
||||
/**
|
||||
* Define los nombres de los filtros de las consultas a la GDB general para la RECOGIDA
|
||||
*/
|
||||
public const string GFR_org = "organica";
|
||||
public const string GFR_rest = "resto";
|
||||
public const string GFR_env = "envases";
|
||||
public const string GFR_pap = "papel";
|
||||
public const string GFR_vid = "vidrio";
|
||||
public const string GFR_otr = "otra";
|
||||
public const string GFR_tra = "trasera";
|
||||
public const string GFR_lat = "lateral";
|
||||
public const string GFR_sup = "superior";
|
||||
public const string GFR_bi = "bilateral";
|
||||
public const string GFR_bol = "bolseo";
|
||||
public const string GFR_lav = "lavadp";
|
||||
public const string GFR_otra = "otra";
|
||||
/**
|
||||
* Define los nombres de los parámetros de recogida a la GDB general
|
||||
*/
|
||||
public const string GPR_vaciM = "t_vaciado_max";
|
||||
public const string GPR_vacim = "t_vaciado_min";
|
||||
public const string GPR_llegsalM = "t_llega_sale_max";
|
||||
public const string GPR_llegsalm = "t_llega_sale_min";
|
||||
public const string GPR_llegsal = "t_llega_sale";
|
||||
public const string GPR_descM = "t_descarga_max";
|
||||
public const string GPR_descm = "t_descarga_min";
|
||||
public const string GPR_desc = "t_descarga";
|
||||
public const string GPR_convM = "t_convenio_max";
|
||||
public const string GPR_convm = "t_convenio_min";
|
||||
public const string GPR_conv = "t_convenio";
|
||||
public const string GPR_descansoM = "t_descanso_max";
|
||||
public const string GPR_descansom = "t_descanso_min";
|
||||
public const string GPR_descanso = "t_descanso";
|
||||
public const string GPR_h_inicio = "hora_inicio";
|
||||
public const string GPR_dv_org = "dens_vehi_org";
|
||||
public const string GPR_dv_res = "dens_vehi_res";
|
||||
public const string GPR_dv_env = "dens_vehi_env";
|
||||
public const string GPR_dv_pap = "dens_vehi_pap";
|
||||
public const string GPR_dv_vid = "dens_vehi_vid";
|
||||
public const string GPR_dv_otr = "dens_vehi_otr";
|
||||
public const string GPR_dc_org = "dens_cont_org";
|
||||
public const string GPR_dc_res = "dens_cont_res";
|
||||
public const string GPR_dc_env = "dens_cont_env";
|
||||
public const string GPR_dc_pap = "dens_cont_pap";
|
||||
public const string GPR_dc_vid = "dens_cont_vid";
|
||||
public const string GPR_dc_otr = "dens_cont_otr";
|
||||
public const string GPR_anchv_3 = "anch_vehi_3";
|
||||
public const string GPR_anchv_2 = "anch_vehi_2";
|
||||
public const string GPR_anchv_s = "anch_vehi_s";
|
||||
public const string GPR_rgiro_3 = "radio_giro_3";
|
||||
public const string GPR_rgiro_2 = "radio_giro_2";
|
||||
public const string GPR_rgiro_s = "radio_giro_s";
|
||||
public const string GPR_tv_tra = "t_vaci_trasera";
|
||||
public const string GPR_tv_lat = "t_vaci_lateral";
|
||||
public const string GPR_tv_sup = "t_vaci_superior";
|
||||
public const string GPR_tv_bi = "t_vaci_bilateral";
|
||||
public const string GPR_tv_bol = "t_vaci_bolseo";
|
||||
public const string GPR_tv_lav = "t_vaci_lavado";
|
||||
public const string GPR_tv_otr = "t_vaci_otra";
|
||||
public const string GPR_kgmaxM = "kgmax_max";
|
||||
public const string GPR_kgmaxm = "kgmax_min";
|
||||
public const string GPR_carga_maxM = "carga_max_max";
|
||||
public const string GPR_carga_maxm = "carga_max_min";
|
||||
/**
|
||||
* Define los nombres de los símbolos que hay en la galería de VSM
|
||||
*/
|
||||
public const string GSV_auto = "auto";
|
||||
public const string GSV_bil = "bilat";
|
||||
public const string GSV_bol = "bolseo";
|
||||
public const string GSV_abi = "caja";
|
||||
public const string GSV_neu = "neumatic";
|
||||
public const string GSV_pil = "pilas";
|
||||
public const string GSV_lenv = "lat_env";
|
||||
public const string GSV_lpap = "lat_pap";
|
||||
public const string GSV_lvid = "lat_vid";
|
||||
public const string GSV_lorg = "lat_orga";
|
||||
public const string GSV_lrest = "lat_rest";
|
||||
public const string GSV_tenv = "tra_env";
|
||||
public const string GSV_tpap = "tra_pa";
|
||||
public const string GSV_tvid = "tra_vid";
|
||||
public const string GSV_torg = "tra_org";
|
||||
public const string GSV_trest = "tra_rest";
|
||||
public const string GSV_ienv = "iglu_env";
|
||||
public const string GSV_ipap = "iglu_pap";
|
||||
public const string GSV_ivid = "igul_vid";
|
||||
public const string GSV_sot = "soterrad";
|
||||
public const string GSV_esc = "ecalera";
|
||||
public const string GSV_fuen = "fuent";
|
||||
public const string GSV_jinf = "zon_inf";
|
||||
public const string GSV_pap = "papelera";
|
||||
public const string GSV_pniv = "paso_niv";
|
||||
public const string GSV_pip = "pippican";
|
||||
public const string GSV_san = "sanecan";
|
||||
public const string GSV_ace = "acera";
|
||||
public const string GSV_apar = "aparcamient";
|
||||
public const string GSV_bor = "bordillo";
|
||||
public const string GSV_hoj = "caida_hoja";
|
||||
public const string GSV_pea = "peatonal";
|
||||
public const string GSV_terr = "terriza";
|
||||
public const string GSV_oci = "ocio";
|
||||
public const string GSV_ofi = "organism_ofici";
|
||||
public const string GSV_par = "parque";
|
||||
public const string GSV_park = "parking";
|
||||
public const string GSV_pla = "playa";
|
||||
public const string GSV_pol = "polidep";
|
||||
public const string GSV_tur = "turistico";
|
||||
public const string GSV_sol = "solar";
|
||||
public const string GSV_sue = "uso_suelo";
|
||||
/**
|
||||
* Define los nombres de los campos de la red navegable que tiene que leer
|
||||
*/
|
||||
public const string GTC_onew = "cons_onew";
|
||||
public const string GTC_kph = "cons_kph";
|
||||
public const string GTC_fow = "cons_fow";
|
||||
public const string GTC_name = "cons_name";
|
||||
/**
|
||||
* Define los nombres de los atributos de la red navegable que tiene que leer
|
||||
*/
|
||||
public const string GTA_TF = "atr_TF";
|
||||
public const string GTA_FT = "atr_FT";
|
||||
public const string GTA_N = "atr_N";
|
||||
public const string GTA_pedes = "atr_pedes";
|
||||
|
||||
/**
|
||||
* Nombre de los campos que lee en limpieza
|
||||
*/
|
||||
public const string GTO_girmax ="Giro_max_vehiculo";
|
||||
public const string GTO_anch_peat ="Ancho_peat_def";
|
||||
public const string GTO_anch_ace = "Ancho_acera_def";
|
||||
public const string GTO_anch_aplin = "Ancho_ap_lin_def";
|
||||
public const string GTO_anch_apbat = "Ancho_ap_bat_def";
|
||||
public const string GTO_anch_bordlib = "Ancho_bord_lib_def";
|
||||
public const string GTO_desv_max = "Desv_max";
|
||||
public const string GTO_desv_max_abs = "Desv_max_abs";
|
||||
/**
|
||||
* Define el nombre para mandar a oliviatasks la configuración
|
||||
*/
|
||||
public const string SockConf = "CONFIG";
|
||||
/**
|
||||
* Define el nombre para responder oliviatasks que ok la configuración
|
||||
*/
|
||||
public const string SockConfOk = "CONFIG_OK";
|
||||
/**
|
||||
* Define el nombre para responder oliviatasks que nok la configuración
|
||||
*/
|
||||
public const string SockConfNOk = "CONFIG_NOK";
|
||||
/**
|
||||
* Define el nombre para pedir a oliviatasks el progreso
|
||||
*/
|
||||
public const string SockProgr = "PROGRESO";
|
||||
/**
|
||||
* Define el nombre para pedir a oliviatasks la tarea
|
||||
*/
|
||||
public const string SockTarea = "TAREA";
|
||||
/**
|
||||
* Define el nombre para pedir a oliviatasks que cancele
|
||||
*/
|
||||
public const string SockCanc = "CANCELA";
|
||||
/**
|
||||
* Define el nombre para responder el oliviatasks a que cancele
|
||||
*/
|
||||
public const string SockCancOk = "CANCELA_OK";
|
||||
/**
|
||||
* Define el nombre para pedir a oliviatasks los sectores, una vez se han calculado
|
||||
*/
|
||||
public const string SockSect = "SECTORES";
|
||||
/**
|
||||
* Define el nombre para pedir avisar oliviatasks de que ha finalizado la sectorización
|
||||
*/
|
||||
public const string SockSectFin = "SECTORES_FIN";
|
||||
/**
|
||||
* Define el nombre para pedir avisar oliviatasks de que ha finalizado la sectorización
|
||||
*/
|
||||
public const string SockFinOk = "FIN_OK";
|
||||
/**
|
||||
* Define el nombre para pedir avisar oliviatasks de que ha finalizado la sectorización
|
||||
*/
|
||||
public const string SockFinNOk = "FIN_NOK";
|
||||
/**
|
||||
* Define el nombre para pedir a oliviatasks los sectores, una vez se han calculado
|
||||
*/
|
||||
public const string SockPlanFin = "PLANIF_FIN";
|
||||
/**
|
||||
* Define el nombre para pedir a oliviatasks los sectores, una vez se han calculado
|
||||
*/
|
||||
public const string SockPlan = "PLANIF";
|
||||
/**
|
||||
* Define el nombre para mandar a oliviatasks la configuración para planificación, ya se ha hecho sectorización
|
||||
*/
|
||||
public const string SockConfPlan = "CONFIG_PLANIF";
|
||||
/**
|
||||
* Define el nombre para mandar a oliviatasks la configuración para planificación, ya se ha hecho sectorización
|
||||
*/
|
||||
public const string SockConfTodo = "CONFIG_TODO";
|
||||
//*************************************************************************************
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OliviaAddInPro.Model
|
||||
{
|
||||
enum TiposEjecucion
|
||||
{
|
||||
Ninguno,
|
||||
LimpiezaConfig,
|
||||
LimpiezaEjec,
|
||||
RecoConfig,
|
||||
RecoEjec,
|
||||
Maqueta,
|
||||
Config
|
||||
}
|
||||
static class OliviaGlob
|
||||
{
|
||||
/**
|
||||
* Paths de la configuración
|
||||
*/
|
||||
public struct Paths
|
||||
{
|
||||
public static string PathWork; //<Path del directorio de trabajo
|
||||
public static string PathCfg; //<Path de la configuración general
|
||||
public static string PathExeOlivia; //<Path del ejecutable de OliviaTask
|
||||
public static string PathTemp; //<Path temporal de generación de archivos intermedios
|
||||
public static string DirData; //<Dir donde están los shapefiles data y nw
|
||||
public static string PathData; //<Path del shp con datos a planificar, ya filtrados e intersecados con las zonas y niveles
|
||||
public static string PathNW; //<Path del shp con la red navegable
|
||||
public static string PathCartela; //<Path de la cartela que se emplea como plantilla para la generación de mapas en formato PDF
|
||||
//paths GDBs
|
||||
public static string PathGdbGen; //<Path de la gdb general de la que se extraen los datos de interés
|
||||
public static string PathGdbNw; //<Path de la gdb referente a la red de carreteras de TOMTOM
|
||||
public static string PathSimbVSM; //<Path de la galeria de estilos aplicada por VSM
|
||||
public static string PathSimbESRI; //<Path de la galeria de estilos de ESRI
|
||||
};
|
||||
|
||||
private static TiposEjecucion tipoEjec = TiposEjecucion.Ninguno;
|
||||
private static Limpieza limp = new Limpieza();
|
||||
|
||||
#region Properties
|
||||
public static TiposEjecucion TipoEjec
|
||||
{
|
||||
get { return tipoEjec; }
|
||||
set { tipoEjec = value; }
|
||||
}
|
||||
public static Limpieza Limp
|
||||
{
|
||||
get { return limp; }
|
||||
//set { limp = value; }
|
||||
}
|
||||
#endregion Properties
|
||||
}
|
||||
}
|
||||
|
|
@ -14,11 +14,10 @@
|
|||
<FileAlignment>512</FileAlignment>
|
||||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ArcGISFolder>$([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\ESRI\ArcGISPro', 'InstallDir', null, RegistryView.Registry64))</ArcGISFolder>
|
||||
<ArcGISFolder Condition="'$(ArcGISFolder)' == ''">$(registry:HKEY_CURRENT_USER\SOFTWARE\ESRI\ArcGISPro@InstallDir)</ArcGISFolder>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
|
|
@ -42,7 +41,6 @@
|
|||
<StartProgram>$(ArcGISFolder)\bin\ArcGISPro.exe</StartProgram>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
|
|
@ -132,9 +130,14 @@
|
|||
<Compile Include="Button\ButtonLimp.cs" />
|
||||
<Compile Include="Button\ButtonMaq.cs" />
|
||||
<Compile Include="Button\ButtonRec.cs" />
|
||||
<Compile Include="Helper\CheckedListItem.cs" />
|
||||
<Compile Include="Helper\HelperGdb.cs" />
|
||||
<Compile Include="Helper\HelperGlobal.cs" />
|
||||
<Compile Include="OptionsMenuItem.cs" />
|
||||
<Compile Include="Model\Comun.cs" />
|
||||
<Compile Include="Model\Limpieza.cs" />
|
||||
<Compile Include="Model\LimpiezaDef.cs" />
|
||||
<Compile Include="Model\OliviaDef.cs" />
|
||||
<Compile Include="ViewModel\OptionsMenuItem.cs" />
|
||||
<Compile Include="ViewModel\PaneLimpiezaSub4ViewModel.cs" />
|
||||
<Compile Include="ViewModel\PaneLimpiezaSub3ViewModel.cs" />
|
||||
<Compile Include="ViewModel\PaneLimpiezaSub2ViewModel.cs" />
|
||||
|
|
@ -165,7 +168,7 @@
|
|||
</Compile>
|
||||
<Compile Include="ViewModel\DockpaneRecogidaViewModel.cs" />
|
||||
<Compile Include="Module1.cs" />
|
||||
<Compile Include="OliviaGlob.cs" />
|
||||
<Compile Include="Model\OliviaGlob.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Resource1.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
|
|
|
|||
|
|
@ -1,31 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using ArcGIS.Desktop.Internal.Framework.Controls;
|
||||
|
||||
namespace OliviaAddInPro
|
||||
{
|
||||
enum TiposEjecucion
|
||||
{
|
||||
Ninguno,
|
||||
LimpiezaConfig,
|
||||
LimpiezaEjec,
|
||||
RecoConfig,
|
||||
RecoEjec,
|
||||
Maqueta,
|
||||
Config
|
||||
}
|
||||
static class OliviaGlob
|
||||
{
|
||||
public static TiposEjecucion tipEjec { get; set; } = TiposEjecucion.Ninguno;
|
||||
public static ErrorMessageDialog msg;
|
||||
|
||||
public static void ponMsg(String mensaje, MessageType tipo, String titulo="OLIVIA")
|
||||
{
|
||||
msg = new ErrorMessageDialog(titulo, mensaje, tipo);
|
||||
msg.ShowDialog();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -69,6 +69,15 @@ namespace OliviaAddInPro {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Busca una cadena traducida similar a No se ha encontrado ningún elemento en la tabla que cumpla con los criterios seleccionados..
|
||||
/// </summary>
|
||||
internal static string String_error_elems_tabla {
|
||||
get {
|
||||
return ResourceManager.GetString("String_error_elems_tabla", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Busca una cadena traducida similar a Ya existe una ejecución en marcha.
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -120,6 +120,9 @@
|
|||
<data name="String_ctrol" xml:space="preserve">
|
||||
<value>Control</value>
|
||||
</data>
|
||||
<data name="String_error_elems_tabla" xml:space="preserve">
|
||||
<value>No se ha encontrado ningún elemento en la tabla que cumpla con los criterios seleccionados.</value>
|
||||
</data>
|
||||
<data name="String_existe_ejec" xml:space="preserve">
|
||||
<value>Ya existe una ejecución en marcha</value>
|
||||
</data>
|
||||
|
|
|
|||
|
|
@ -29,11 +29,19 @@
|
|||
<Label x:Name="label_capalimp" Content="{Binding Path=LblCapaLimp, Mode = TwoWay}" Grid.Column="1" HorizontalAlignment="Left" Margin="13,0,0,0" VerticalAlignment="Top" Width="221" Height="30" Grid.ColumnSpan="3"/>
|
||||
</Grid>
|
||||
<Label Content="Tipo de Tratamiento" HorizontalAlignment="Left" Margin="15,0,0,0" VerticalAlignment="Top" FontWeight="DemiBold"/>
|
||||
<ComboBox x:Name="comboBox_tto" HorizontalAlignment="Left" Margin="20,0,0,0" VerticalAlignment="Top" Width="260" DropDownOpened="ComboBox_DropDownOpened"/>
|
||||
<ComboBox x:Name="comboBox_tto" ItemsSource="{Binding Path=TiposTto, Mode = TwoWay}" HorizontalAlignment="Left" Margin="20,0,0,0" VerticalAlignment="Top" Width="260" DropDownOpened="ComboBox_DropDownOpened"/>
|
||||
<Label Content="Ámbitos de Trabajo" HorizontalAlignment="Left" Margin="15,0,0,0" VerticalAlignment="Top" RenderTransformOrigin="-0.391,-0.203" FontWeight="DemiBold"/>
|
||||
<ComboBox x:Name="comboBox_ambitos" HorizontalAlignment="Left" Margin="20,0,0,0" VerticalAlignment="Top" Width="260"/>
|
||||
<ListBox x:Name="listBox_ambitos" HorizontalAlignment="Left" Height="100" Margin="20,2,0,0" VerticalAlignment="Top" Width="260"/>
|
||||
<CheckBox x:Name="checkBox_sentidocirc" Content="Respeta el sentido de circulación" HorizontalAlignment="Left" Margin="20,2,0,0" VerticalAlignment="Top"/>
|
||||
<ComboBox x:Name="comboBox_ambitos" ItemsSource="{Binding Path=OpsAmbs, Mode = TwoWay}" HorizontalAlignment="Left" Margin="20,0,0,0" VerticalAlignment="Top" Width="260"/>
|
||||
<ListBox x:Name="listBox_ambitos" ItemsSource="{Binding Path=Ambitos, Mode = TwoWay}" HorizontalAlignment="Left" Height="100" Margin="20,2,0,0" VerticalAlignment="Top" Width="260">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<ListBoxItem IsSelected="{Binding IsChecked}" IsEnabled="{Binding IsEnabled}">
|
||||
<CheckBox IsChecked="{Binding IsChecked}" Content="{Binding Path=Item}" />
|
||||
</ListBoxItem>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
<CheckBox x:Name="checkBox_sentidocirc" Content="Respeta el sentido de circulación" HorizontalAlignment="Left" Margin="20,2,0,0" VerticalAlignment="Top"/>
|
||||
<Grid Margin="0,5,0,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="6*"/>
|
||||
|
|
|
|||
|
|
@ -16,7 +16,10 @@ using ArcGIS.Core.Data;
|
|||
using ArcGIS.Desktop.Core;
|
||||
using OliviaAddInPro.Helper;
|
||||
using OliviaAddInPro.View;
|
||||
|
||||
using OliviaAddInPro.Model;
|
||||
using ArcGIS.Core.Geometry;
|
||||
using ArcGIS.Desktop.Mapping;
|
||||
using ArcGIS.Desktop.Internal.Framework.Controls;
|
||||
|
||||
namespace OliviaAddInPro
|
||||
{
|
||||
|
|
@ -35,43 +38,78 @@ namespace OliviaAddInPro
|
|||
e.Handled = !PanelGlobal.IsValid(((TextBox)sender).Text + e.Text,0,9999);
|
||||
}
|
||||
|
||||
private ArcGIS.Core.Geometry.Geometry selecGeom(FeatureClass fc, out string _texto, bool multisel)
|
||||
{
|
||||
ArcGIS.Core.Geometry.Geometry geomsal = null;
|
||||
string texto = "";
|
||||
|
||||
if (fc != null)
|
||||
{
|
||||
//saca la ventana de selección de campo
|
||||
ShowProWndSelectFields selfwnd = new ShowProWndSelectFields(fc, multisel);
|
||||
if (selfwnd.SelFieldVals.Count > 0)
|
||||
{
|
||||
geomsal = HelperGdb.GetGeomSel(fc, selfwnd.SelField, selfwnd.SelFieldVals).Result;
|
||||
texto = HelperGdb.TextoSal;
|
||||
}
|
||||
}
|
||||
if (geomsal==null)
|
||||
{
|
||||
texto = Resource1.String_selec_capa;
|
||||
if (HelperGdb.OutStr.Length > 0)
|
||||
HelperGlobal.ponMsg(HelperGdb.OutStr, MessageType.Error);
|
||||
}
|
||||
|
||||
_texto = texto;
|
||||
return geomsal;
|
||||
}
|
||||
|
||||
private void button_caparestr_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
FeatureClass fc = HelperGdb.OpenFtClassDialog(HelperGdb.TiposOpenFileDlg.OpenFtrClassPolygon);
|
||||
bool ok = false;
|
||||
string texto="";
|
||||
if (fc != null)
|
||||
{
|
||||
//texto = fc.GetName();
|
||||
//saca la ventana de selección de campo
|
||||
ShowProWndSelectFields selfwnd = new ShowProWndSelectFields(fc, true);
|
||||
if(selfwnd.SelAttributes.Count>0)
|
||||
{
|
||||
ok = true;
|
||||
//HelperGdb.GetGeomSel(it.Path, selfwnd.SelField, selfwnd.SelAttributes, out texto);
|
||||
}
|
||||
}
|
||||
if (!ok)
|
||||
{
|
||||
texto = Resource1.String_selec_capa;
|
||||
}
|
||||
|
||||
OliviaGlob.Limp.GeomRestr = selecGeom(fc, out texto, true);
|
||||
|
||||
label_caparestr.Content = texto;
|
||||
HelperGdb.Free(fc);
|
||||
}
|
||||
|
||||
private void button_capaniv_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
FeatureClass fc = HelperGdb.OpenFtClassDialog(HelperGdb.TiposOpenFileDlg.OpenFtrClassPolygon);
|
||||
string texto = "";
|
||||
|
||||
OliviaGlob.Limp.GeomNiv = selecGeom(fc, out texto, true);
|
||||
|
||||
label_capaniv.Content = texto;
|
||||
HelperGdb.Free(fc);
|
||||
|
||||
}
|
||||
|
||||
private void button_capazon_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
FeatureClass fc = HelperGdb.OpenFtClassDialog(HelperGdb.TiposOpenFileDlg.OpenFtrClassPolygon);
|
||||
string texto = "";
|
||||
|
||||
OliviaGlob.Limp.GeomZon = selecGeom(fc, out texto, true);
|
||||
|
||||
label_capazon.Content = texto;
|
||||
HelperGdb.Free(fc);
|
||||
|
||||
}
|
||||
|
||||
private void button_capainst_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
||||
FeatureClass fc = HelperGdb.OpenFtClassDialog(HelperGdb.TiposOpenFileDlg.OpenFtrClassPoint);
|
||||
string texto = "";
|
||||
ArcGIS.Core.Geometry.Geometry geomsal = selecGeom(fc, out texto, false);
|
||||
if (geomsal != null && geomsal is MapPoint mp)
|
||||
{
|
||||
OliviaGlob.Limp.CoordsInstal = mp.Coordinate2D;
|
||||
}
|
||||
label_capainst.Content = texto;
|
||||
HelperGdb.Free(fc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
</Grid.ColumnDefinitions>
|
||||
<Label Content="Nº de sectores" HorizontalAlignment="Left" Margin="15,0,0,0" VerticalAlignment="Top" Width="90" Height="30"/>
|
||||
<xctk:IntegerUpDown x:Name="spinner_nsect" Value="{Binding Path=NumSect, Mode = TwoWay}" Grid.Column="1" Height="20" Width="70" FormatString="N0" Increment="1" Maximum="20" Minimum="1" Margin="17,4,2,6" AllowTextInput ="False"/>
|
||||
<CheckBox x:Name="checkBox_sectauto" Grid.Column="2" Margin="9,6,9,-1" Content="Automático" IsChecked="{Binding Path=CheckSectAuto, Mode = TwoWay}"/>
|
||||
<CheckBox x:Name="checkBox_sectauto" Grid.Column="2" Margin="9,6,9,-1" Content="Automático" IsChecked="{Binding Path=CheckSectAuto, Mode = TwoWay}" Checked="checkBox_sectauto_Checked"/>
|
||||
</Grid>
|
||||
<CheckBox x:Name="checkBox_ajustsect" Margin="18,5,0,0" Content="Ajustar sectores a jornada" IsChecked="{Binding Path=CheckAjustSect, Mode = TwoWay}"/>
|
||||
</StackPanel>
|
||||
|
|
|
|||
|
|
@ -25,5 +25,17 @@ namespace OliviaAddInPro
|
|||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void checkBox_sectauto_Checked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if(checkBox_sectauto.IsChecked ?? true)
|
||||
{
|
||||
spinner_nsect.IsEnabled = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
spinner_nsect.IsEnabled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,24 +6,20 @@
|
|||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:extensions="clr-namespace:ArcGIS.Desktop.Extensions;assembly=ArcGIS.Desktop.Extensions"
|
||||
mc:Ignorable="d" Height="300" Width="243.123"
|
||||
WindowStartupLocation="CenterOwner" Icon="OliviaIconPro.ico" ResizeMode="NoResize" Closed="ProWindow_Closed" Closing="ProWindow_Closing"
|
||||
d:DataContext="{Binding Path=ui.ShowProWndSelectFields}"
|
||||
>
|
||||
WindowStartupLocation="CenterOwner" Icon="OliviaIconPro.ico" ResizeMode="NoResize" Closed="ProWindow_Closed" Closing="ProWindow_Closing">
|
||||
<controls:ProWindow.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<extensions:DesignOnlyResourceDictionary Source="pack://application:,,,/ArcGIS.Desktop.Framework;component\Themes\Default.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary>
|
||||
</controls:ProWindow.Resources>
|
||||
<StackPanel HorizontalAlignment="Left" Height="272" VerticalAlignment="Top" Width="233" Margin="0,0,0,-1.6">
|
||||
<Label Margin="15,0,0,0" Content="Campo"/>
|
||||
<ComboBox Margin="10,5,9.6,0"
|
||||
ItemsSource="{Binding Path=Fields, Mode=TwoWay}" Name="comboBoxFields" SelectedItem="{Binding Path=SelField, Mode = TwoWay}" SelectionChanged="comboBoxFields_SelectionChanged"/>
|
||||
ItemsSource="{Binding Path=Fields}" Name="comboBoxFields" SelectedItem="{Binding Path=SelField, Mode = TwoWay}" SelectedIndex="{Binding Path=SelIndx, Mode = TwoWay}" SelectionChanged="comboBoxFields_SelectionChanged"/>
|
||||
<Label Margin="15,0,0,0" Content="Atributo"/>
|
||||
<ListBox Margin="10,5,9.6,0" Height="127" ItemsSource="{Binding Path=Attributes}" Name="listBoxAttributes" SelectedItem="{Binding Path=SelAttributes, Mode = TwoWay}" SelectionMode="{Binding SelMode}"/>
|
||||
<ListBox Margin="10,5,9.6,0" Height="127" ItemsSource="{Binding Path=Attributes}" Name="listBoxAttributes" SelectionMode="{Binding SelMode}"/>
|
||||
<Button Margin="167,25,9.6,0" Content="Aceptar" Opacity="0.75" Click="Button_Click"/>
|
||||
|
||||
</StackPanel>
|
||||
|
||||
</controls:ProWindow>
|
||||
</controls:ProWindow>
|
||||
|
|
@ -27,22 +27,35 @@ namespace OliviaAddInPro.View
|
|||
private bool ok = false;
|
||||
public FeatureClass fc = null;
|
||||
public string err_st = string.Empty;
|
||||
public ProWndSelectFields()
|
||||
|
||||
public ProWndSelectFields(FeatureClass _fc, ShowProWndSelectFields proWndSelFlds)
|
||||
{
|
||||
InitializeComponent();
|
||||
fc = _fc;
|
||||
DataContext = proWndSelFlds;
|
||||
/*ObservableCollection<string> attribs_st = HelperGdb.GetFields(fc).Result;
|
||||
comboBoxFields.ItemsSource = attribs_st;
|
||||
listBoxAttributes.ItemsSource = attribs_st;*/
|
||||
|
||||
}
|
||||
|
||||
private void comboBoxFields_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
if(comboBoxFields.SelectedIndex>0)
|
||||
int selindx = comboBoxFields.SelectedIndex;
|
||||
if (selindx >= 0)
|
||||
{
|
||||
ObservableCollection<string> attribs_st =
|
||||
HelperGdb.GetAttributes(fc, comboBoxFields.SelectedItem.ToString()).Result;
|
||||
if (attribs_st.Count==0)
|
||||
string att = comboBoxFields.Items.GetItemAt(selindx).ToString();
|
||||
ObservableCollection<string> elems;
|
||||
elems = HelperGdb.GetFieldVals(fc, att, listBoxAttributes.SelectionMode == SelectionMode.Extended).Result;
|
||||
|
||||
if (elems.Count == 0)
|
||||
{
|
||||
OliviaGlob.ponMsg(HelperGdb.out_st, MessageType.Error);
|
||||
if (HelperGdb.OutStr.Length > 0)
|
||||
HelperGlobal.ponMsg(HelperGdb.OutStr, MessageType.Error);
|
||||
else
|
||||
HelperGlobal.ponMsg(Resource1.String_error_elems_tabla, MessageType.Warning);
|
||||
}
|
||||
listBoxAttributes.ItemsSource = attribs_st;
|
||||
listBoxAttributes.ItemsSource = elems;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ using ArcGIS.Desktop.Framework.Contracts;
|
|||
using ArcGIS.Desktop.Framework.Dialogs;
|
||||
using ArcGIS.Desktop.Framework.Threading.Tasks;
|
||||
using ArcGIS.Desktop.Mapping;
|
||||
using OliviaAddInPro.Model;
|
||||
|
||||
|
||||
namespace OliviaAddInPro
|
||||
|
|
@ -49,7 +50,7 @@ namespace OliviaAddInPro
|
|||
if (isVisible == false && !firstTimeShow)
|
||||
{
|
||||
//avisa de cerrar la ventana
|
||||
OliviaGlob.tipEjec = TiposEjecucion.Ninguno;
|
||||
OliviaGlob.TipoEjec = TiposEjecucion.Ninguno;
|
||||
}
|
||||
if (firstTimeShow)
|
||||
firstTimeShow = false;
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ using ArcGIS.Desktop.Framework.Contracts;
|
|||
using ArcGIS.Desktop.Framework.Dialogs;
|
||||
using ArcGIS.Desktop.Framework.Threading.Tasks;
|
||||
using ArcGIS.Desktop.Mapping;
|
||||
using OliviaAddInPro.Model;
|
||||
|
||||
|
||||
namespace OliviaAddInPro
|
||||
|
|
@ -45,7 +46,7 @@ namespace OliviaAddInPro
|
|||
if (isVisible == false && !firstTimeShow)
|
||||
{
|
||||
//avisa de cerrar la ventana
|
||||
OliviaGlob.tipEjec = TiposEjecucion.Ninguno;
|
||||
OliviaGlob.TipoEjec = TiposEjecucion.Ninguno;
|
||||
}
|
||||
if (firstTimeShow)
|
||||
firstTimeShow = false;
|
||||
|
|
|
|||
|
|
@ -15,11 +15,22 @@ using ArcGIS.Desktop.Framework.Contracts;
|
|||
using ArcGIS.Desktop.Framework.Dialogs;
|
||||
using ArcGIS.Desktop.Framework.Threading.Tasks;
|
||||
using ArcGIS.Desktop.Mapping;
|
||||
using System.Collections.ObjectModel;
|
||||
using OliviaAddInPro.Model;
|
||||
using OliviaAddInPro.Helper;
|
||||
|
||||
namespace OliviaAddInPro
|
||||
{
|
||||
internal class PaneLimpiezaSub1ViewModel : PanelViewModelBase
|
||||
{
|
||||
|
||||
private ObservableCollection<string> tiposTto;
|
||||
private int selTto = -1;
|
||||
private ObservableCollection<string> opsAmbs;
|
||||
private int selOpAmb = -1;
|
||||
private ObservableCollection<CheckedListItem<string>> ambitos;
|
||||
|
||||
|
||||
public PaneLimpiezaSub1ViewModel ()
|
||||
{
|
||||
lblCapaLimp = Resource1.String_selec_capa;
|
||||
|
|
@ -27,6 +38,10 @@ namespace OliviaAddInPro
|
|||
textVeloDespl = 10;
|
||||
lblUdsTimeTto = "min";
|
||||
lblUdsVeloDespl = "km/h";
|
||||
|
||||
tiposTto = new ObservableCollection<string>(LimpiezaDef.tipos_tto_str);
|
||||
ambitos = new ObservableCollection<CheckedListItem<string>>();
|
||||
|
||||
}
|
||||
|
||||
#region Properties
|
||||
|
|
@ -68,8 +83,79 @@ namespace OliviaAddInPro
|
|||
get { return lblUdsTimeTto; }
|
||||
set { base.SetProperty(ref lblUdsTimeTto, value, () => LblUdsTimeTto); }
|
||||
}
|
||||
|
||||
public ObservableCollection<string> TiposTto
|
||||
{
|
||||
get { return tiposTto; }
|
||||
set
|
||||
{
|
||||
tiposTto = value;
|
||||
base.NotifyPropertyChanged("TiposTto");
|
||||
}
|
||||
}
|
||||
public int SelTto
|
||||
{
|
||||
get { return selTto; }
|
||||
set
|
||||
{
|
||||
selTto = value;
|
||||
base.NotifyPropertyChanged("SelTto");
|
||||
}
|
||||
}
|
||||
public ObservableCollection<string> OpsAmbs
|
||||
{
|
||||
get { return opsAmbs; }
|
||||
set
|
||||
{
|
||||
opsAmbs = value;
|
||||
base.NotifyPropertyChanged("OpsAmbs");
|
||||
}
|
||||
}
|
||||
public int SelOpAmb
|
||||
{
|
||||
get { return selOpAmb; }
|
||||
set
|
||||
{
|
||||
selOpAmb = value;
|
||||
base.NotifyPropertyChanged("SelOpAmb");
|
||||
}
|
||||
}
|
||||
public ObservableCollection<CheckedListItem<string>> Ambitos
|
||||
{
|
||||
get { return ambitos; }
|
||||
set
|
||||
{
|
||||
ambitos = value;
|
||||
base.NotifyPropertyChanged("OpsAmbs");
|
||||
}
|
||||
}
|
||||
#endregion Properties
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Clase para la lista de ámbitos, relaciona el tipo de ámbito con su texto
|
||||
*/
|
||||
internal class AmbitsList
|
||||
{
|
||||
private LimpiezaDef.AmbitsTra mi_amb_i;
|
||||
private string mi_amb_str;
|
||||
|
||||
public AmbitsList(LimpiezaDef.AmbitsTra amb_i, string amb_str)
|
||||
{
|
||||
this.mi_amb_i = amb_i;
|
||||
this.mi_amb_str = amb_str;
|
||||
}
|
||||
public LimpiezaDef.AmbitsTra amb_i
|
||||
{
|
||||
get { return mi_amb_i; }
|
||||
set { mi_amb_i = value; }
|
||||
}
|
||||
public string amb_str
|
||||
{
|
||||
get { return mi_amb_str; }
|
||||
set { mi_amb_str = value; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,19 +12,21 @@ using System.Windows.Controls;
|
|||
using ArcGIS.Desktop.Mapping;
|
||||
using ArcGIS.Desktop.Core;
|
||||
using ArcGIS.Desktop.Internal.Framework.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using ArcGIS.Desktop.Internal.Core;
|
||||
|
||||
namespace OliviaAddInPro.View
|
||||
{
|
||||
internal class ShowProWndSelectFields : ArcGIS.Desktop.Framework.Contracts.Button
|
||||
public class ShowProWndSelectFields : ArcGIS.Desktop.Framework.Contracts.Button
|
||||
{
|
||||
|
||||
private ProWndSelectFields _prowndselectfields = null;
|
||||
private ObservableCollection<string> fields = new ObservableCollection<string>();
|
||||
private ObservableCollection<string> attributes = new ObservableCollection<string>();
|
||||
private ObservableCollection<string> selAttributes = new ObservableCollection<string>();
|
||||
private ObservableCollection<string> selFieldVal = new ObservableCollection<string>();
|
||||
private int selIndx = -1;
|
||||
private string selField = string.Empty;
|
||||
private bool multiSelAtt = true;
|
||||
private string pathLyr = string.Empty;
|
||||
private FeatureClass ftClass = null;
|
||||
public string err_st=string.Empty;
|
||||
|
||||
|
|
@ -39,13 +41,14 @@ namespace OliviaAddInPro.View
|
|||
fields = HelperGdb.GetFields(ftClass).Result;
|
||||
if (fields.Count == 0)
|
||||
{
|
||||
OliviaGlob.ponMsg(HelperGdb.out_st, MessageType.Error);
|
||||
if (HelperGdb.OutStr.Length > 0)
|
||||
HelperGlobal.ponMsg(HelperGdb.OutStr, MessageType.Error);
|
||||
else
|
||||
HelperGlobal.ponMsg(Resource1.String_error_elems_tabla, MessageType.Warning);
|
||||
}
|
||||
else
|
||||
{
|
||||
attributes.Clear();
|
||||
selAttributes.Clear();
|
||||
selField = string.Empty;
|
||||
muestra();
|
||||
}
|
||||
}
|
||||
|
|
@ -54,17 +57,19 @@ namespace OliviaAddInPro.View
|
|||
//already open?
|
||||
if (_prowndselectfields != null)
|
||||
return;
|
||||
_prowndselectfields = new ProWndSelectFields();
|
||||
_prowndselectfields = new ProWndSelectFields(ftClass, this);
|
||||
_prowndselectfields.Owner = FrameworkApplication.Current.MainWindow;
|
||||
_prowndselectfields.fc = ftClass;
|
||||
//_prowndselectfields.Closed += (o, e) => { _prowndselectfields = null; };
|
||||
|
||||
bool? res = _prowndselectfields.ShowDialog();
|
||||
if (res ?? false)
|
||||
if (res ?? true)
|
||||
{
|
||||
selAttributes.Clear();
|
||||
selField = string.Empty;
|
||||
}
|
||||
foreach (var it in _prowndselectfields.listBoxAttributes.SelectedItems)
|
||||
{
|
||||
SelFieldVals.Add(it.ToString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
#endregion Methods
|
||||
|
||||
|
|
@ -87,13 +92,22 @@ namespace OliviaAddInPro.View
|
|||
base.NotifyPropertyChanged("Attributes");
|
||||
}
|
||||
}
|
||||
public ObservableCollection<string> SelAttributes
|
||||
public ObservableCollection<string> SelFieldVals
|
||||
{
|
||||
get { return selAttributes; }
|
||||
get { return selFieldVal; }
|
||||
set
|
||||
{
|
||||
selAttributes = value;
|
||||
base.NotifyPropertyChanged("SelAttributes");
|
||||
selFieldVal = value;
|
||||
base.NotifyPropertyChanged("SelFieldVal");
|
||||
}
|
||||
}
|
||||
public int SelIndx
|
||||
{
|
||||
get { return selIndx; }
|
||||
set
|
||||
{
|
||||
selIndx = value;
|
||||
base.NotifyPropertyChanged("SelIndx");
|
||||
}
|
||||
}
|
||||
public string SelField
|
||||
|
|
|
|||
Loading…
Reference in New Issue