635 lines
27 KiB
C#
635 lines
27 KiB
C#
using ArcGIS.Desktop.Internal.Core;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using OliviaAddInPro.Services;
|
|
using ArcGIS.Core.Geometry;
|
|
using ArcGIS.Desktop.Framework.Threading.Tasks;
|
|
using OliviaAddInPro.Helper;
|
|
|
|
using System.Net;
|
|
using System.Net.Sockets;
|
|
using System.IO;
|
|
using System.Diagnostics;
|
|
|
|
namespace OliviaAddInPro.Model
|
|
{
|
|
[Flags]
|
|
/**
|
|
*
|
|
*/
|
|
public enum TiposEjecucion
|
|
{
|
|
Ninguno = 0,
|
|
Limp=1,
|
|
Reco=2,
|
|
Props = 4,//está editando propiedades
|
|
Config = 8, //está configurando la ventana de limpieza o recogida por primera vez
|
|
EjecSecto=16,//está ejecutando por primera vez
|
|
EjecPlanif = 32,//está ejecutando después de haber planificado ya al menos una primera vez
|
|
FinEjecOk = 64, //ha terminado de ejecutar Bien
|
|
FinEjecNOk = 128,//ha terminado de ejecutar y ha habido errores
|
|
Config2 =256,//está configurando la ventana de limpieza o recogida después de haber sectorizado
|
|
//ya al menos una primera vez
|
|
//se pone este estado cuando ha terminado ya la primera vez
|
|
}
|
|
|
|
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 PathManualOlivia; //<Path del Manual de Olivia
|
|
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
|
|
|
|
//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
|
|
|
|
//paths import
|
|
public static string PathGdbImport; //<Path de la gdb en la que se guardan los resultados
|
|
public static string PathGuardCsv; //<Path para guardar CSV de la planificación
|
|
};
|
|
public struct Conexion
|
|
{
|
|
/**
|
|
* IP donde va a realizar la conexión a OliviaTask, se inicializa al arrancar con la local
|
|
*/
|
|
public static string Ip;
|
|
/**
|
|
* Puerto local donde va a realizar la conexión a OliviaTask, se inicializa al arrancar
|
|
*/
|
|
public static int Puerto;
|
|
/**
|
|
* Time out de la conexión con OliviaTask, en seg
|
|
*/
|
|
public static int TiempoOutSocket;
|
|
};
|
|
/**
|
|
* Nombre de las capas que se van a necesitar para la exportación de datos
|
|
*/
|
|
public struct Capas
|
|
{
|
|
public static string pathEjeVia;
|
|
public static string ftclass_ejes; //<Nombre de la capa de ejes de carretera
|
|
public static string ftclass_muni; //<Nombre de la capa de municipios de TOMTOM
|
|
};
|
|
private static TiposEjecucion tipoEjec;
|
|
public static Limpieza limp;
|
|
private static Recogida reco;
|
|
|
|
#region Properties
|
|
public static TiposEjecucion TipoEjec
|
|
{
|
|
get { return tipoEjec; }
|
|
set { tipoEjec = value; }
|
|
}
|
|
|
|
public static TiposEjecucion TipoView
|
|
{ get; set; }
|
|
|
|
public static Limpieza Limp
|
|
{
|
|
get { return limp; }
|
|
set { limp = value; }
|
|
}
|
|
public static Recogida Reco
|
|
{
|
|
get { return reco; }
|
|
set { reco = value; }
|
|
}
|
|
public static SpatialReference SpatRef { get; set; } = null;
|
|
public static MarchandoUnaDe progrDialog { get; set; } = null;
|
|
#endregion Properties
|
|
|
|
public static void Inicia()
|
|
{
|
|
tipoEjec = TiposEjecucion.Ninguno;
|
|
TipoView= TiposEjecucion.Ninguno;
|
|
IniDefault();
|
|
LimpiezaDef.iniciaLimpDef();
|
|
RecogidaDef.iniciaRecoDef();
|
|
progrDialog = new MarchandoUnaDe();
|
|
limp = new Limpieza();
|
|
reco = new Recogida();
|
|
SpatRef = ArcGIS.Core.Geometry.SpatialReferenceBuilder.CreateSpatialReference(GeneralDef.SpatRefDef);
|
|
|
|
Respuesta<bool> resp = coge_ip();
|
|
if (!resp.Value && resp.HasError)
|
|
{
|
|
HelperGlobal.ponMsg(resp.Error.First());
|
|
}
|
|
resp = comprueba_dlls();
|
|
if (!resp.Value && resp.HasError)
|
|
{
|
|
HelperGlobal.ponMsg(resp.Error.First());
|
|
}
|
|
}
|
|
|
|
public static bool IsLimp()
|
|
{
|
|
return HasFlagTipEjec(TiposEjecucion.Limp);
|
|
}
|
|
public static bool IsReco()
|
|
{
|
|
return HasFlagTipEjec(TiposEjecucion.Reco);
|
|
}
|
|
public static bool IsProps()
|
|
{
|
|
return HasFlagTipEjec(TiposEjecucion.Props);
|
|
}
|
|
public static bool IsConfig2()
|
|
{
|
|
return HasFlagTipEjec(TiposEjecucion.Config2);
|
|
}
|
|
public static bool HasFlagTipEjec(TiposEjecucion flag)
|
|
{
|
|
return (OliviaGlob.TipoEjec & flag) == flag;
|
|
}
|
|
public static void SetFlagTipEjec(TiposEjecucion flag)
|
|
{
|
|
//pone el tipo de ejecución igual al flag
|
|
OliviaGlob.TipoEjec = flag;
|
|
}
|
|
public static void AddFlagTipEjec(TiposEjecucion flag)
|
|
{
|
|
//añade el flag al tipo de ejecución
|
|
OliviaGlob.TipoEjec = OliviaGlob.TipoEjec | flag;
|
|
}
|
|
public static void RemoveFlagTipEjec(TiposEjecucion flag)
|
|
{
|
|
//quita el flag al tipo de ejecución
|
|
OliviaGlob.TipoEjec = OliviaGlob.TipoEjec & ~flag;
|
|
}
|
|
|
|
|
|
public static bool ViewIsLimp()
|
|
{
|
|
return ViewIsHasFlagTipEjec(TiposEjecucion.Limp);
|
|
}
|
|
public static bool ViewIsReco()
|
|
{
|
|
return ViewIsHasFlagTipEjec(TiposEjecucion.Reco);
|
|
}
|
|
public static bool ViewIsProps()
|
|
{
|
|
return ViewIsHasFlagTipEjec(TiposEjecucion.Props);
|
|
}
|
|
public static bool ViewIsHasFlagTipEjec(TiposEjecucion flag)
|
|
{
|
|
return (OliviaGlob.TipoView & flag) == flag;
|
|
}
|
|
public static void ViewSetFlagTipEjec(TiposEjecucion flag)
|
|
{
|
|
//pone el tipo de ejecución igual al flag
|
|
OliviaGlob.TipoView = flag;
|
|
}
|
|
public static void ViewAddFlagTipEjec(TiposEjecucion flag)
|
|
{
|
|
//añade el flag al tipo de ejecución
|
|
OliviaGlob.TipoView = OliviaGlob.TipoEjec | flag;
|
|
}
|
|
public static void ViewRemoveFlagTipEjec(TiposEjecucion flag)
|
|
{
|
|
//quita el flag al tipo de ejecución
|
|
OliviaGlob.TipoView = OliviaGlob.TipoEjec & ~flag;
|
|
}
|
|
/**
|
|
* Habilita Sh=true
|
|
* o Deshabilita sh=false
|
|
* el pane correspondiente
|
|
*/
|
|
public static void ShowHidePane(bool sh)
|
|
{
|
|
if (OliviaGlob.IsLimp())
|
|
{
|
|
if (sh)
|
|
{
|
|
DockpaneLimpiezaViewModel.Show();
|
|
//SetFlagTipEjec(TiposEjecucion.Limp);
|
|
ViewSetFlagTipEjec(TiposEjecucion.Limp);
|
|
}
|
|
else
|
|
{
|
|
DockpaneLimpiezaViewModel.Hide_();
|
|
|
|
}
|
|
}
|
|
else if (OliviaGlob.IsReco())
|
|
{
|
|
if (sh)
|
|
{
|
|
DockpaneRecogidaViewModel.Show();
|
|
//SetFlagTipEjec(TiposEjecucion.Reco);
|
|
ViewSetFlagTipEjec(TiposEjecucion.Reco);
|
|
}
|
|
else
|
|
{
|
|
DockpaneRecogidaViewModel.Hide_();
|
|
}
|
|
}
|
|
else if (OliviaGlob.IsProps())
|
|
{
|
|
if (sh)
|
|
{
|
|
DockpaneConfigViewModel.Show();
|
|
SetFlagTipEjec(TiposEjecucion.Props);
|
|
ViewSetFlagTipEjec(TiposEjecucion.Props);
|
|
}
|
|
else
|
|
{
|
|
DockpaneConfigViewModel.Hide_();
|
|
}
|
|
}
|
|
else
|
|
{
|
|
//SetFlagTipEjec(TiposEjecucion.Ninguno);
|
|
ViewSetFlagTipEjec(TiposEjecucion.Ninguno);
|
|
}
|
|
if (!sh)
|
|
ViewSetFlagTipEjec(TiposEjecucion.Ninguno);
|
|
}
|
|
|
|
/**
|
|
* Comprueba que está configurada la red navegable e incluye los campos necesarios
|
|
*/
|
|
public static bool CompruebaNwYCampos()
|
|
{
|
|
ArcGIS.Core.Data.FeatureClass ft = HelperGdb.GetFtClass(OliviaGlob.Paths.PathGdbNw);
|
|
if (ft == null)
|
|
return false;
|
|
|
|
int NCAMPS = 4;
|
|
string[] camps;
|
|
camps = new string[NCAMPS];
|
|
camps[0] = ComunDef.CamposNW.cons_onew;
|
|
camps[1] = ComunDef.CamposNW.cons_kph;
|
|
camps[2] = ComunDef.CamposNW.cons_name;
|
|
camps[3] = ComunDef.CamposNW.cons_fow;
|
|
return HelperGdb.CheckFileds(OliviaGlob.Paths.PathGdbNw, camps) == 0;
|
|
}
|
|
|
|
/**
|
|
* Comprueba que no es null y existe
|
|
*/
|
|
public static bool CompruebaExistePath(string path)
|
|
{
|
|
if (string.IsNullOrEmpty(path))
|
|
return false;
|
|
|
|
var dir = Path.GetDirectoryName(path);
|
|
if (string.IsNullOrEmpty(dir) || !Directory.Exists(path))
|
|
return false;
|
|
|
|
return true;
|
|
}
|
|
|
|
/**
|
|
* Devuelve una lista de las ips locales
|
|
*/
|
|
public static string[] dame_local_ips()
|
|
{
|
|
IPHostEntry host;
|
|
List<string> host_str = new List<string>();
|
|
|
|
if (!System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable())
|
|
{
|
|
return null;
|
|
}
|
|
|
|
host = Dns.GetHostEntry(Dns.GetHostName());
|
|
foreach (var ip in host.AddressList)
|
|
{
|
|
if (ip.AddressFamily == AddressFamily.InterNetwork)
|
|
{
|
|
host_str.Add(ip.ToString());
|
|
}
|
|
}
|
|
return host_str.ToArray();
|
|
}
|
|
|
|
/**
|
|
* Coge la ip local para la comunicación con OliviaTask
|
|
*/
|
|
static Respuesta<bool> coge_ip()
|
|
{
|
|
Respuesta<bool> resp = new Respuesta<bool>();
|
|
try
|
|
{
|
|
string[] ips = OliviaGlob.dame_local_ips();
|
|
if (ips != null && ips.Length > 0)
|
|
Conexion.Ip = ips[0];
|
|
else
|
|
Conexion.Ip = "127.0.0.1";
|
|
resp.Value = true;
|
|
return resp;
|
|
}
|
|
catch (Exception)
|
|
{
|
|
resp.Error.Add("Error al leer IP local");
|
|
resp.Value = false;
|
|
return resp;
|
|
}
|
|
}
|
|
|
|
/**
|
|
* La primera vez copia las dlls necesarias en el directorio del arcmap
|
|
*/
|
|
static Respuesta<bool> comprueba_dlls()
|
|
{
|
|
Respuesta<bool> resp = new Respuesta<bool>();
|
|
string path_dll_dest = null, dll = null;
|
|
try
|
|
{
|
|
//comprueba utiles.dll
|
|
dll = "utiles.dll";
|
|
|
|
//path_dll_dest = Path.Combine(System.IO.Path.GetDirectoryName(System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName), dll);
|
|
//path_dll_dest = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, dll);
|
|
//path_dll_dest = Path.Combine(System.Reflection.Assembly.GetExecutingAssembly().Location, dll);
|
|
//path_dll_dest = Path.Combine(System.Windows.Application.Current.StartupUri.AbsoluteUri, dll);
|
|
//path_dll_dest=System.Reflection.Assembly.GetEntryAssembly().CodeBase;
|
|
//path_dll_dest = System.Reflection.AssemblyName.GetAssemblyName();
|
|
path_dll_dest = Path.Combine(System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location), dll);
|
|
if (!File.Exists(path_dll_dest))
|
|
{
|
|
resp.Error.Add("No se encuentran las librerías necesarias, compruebe la instalación");
|
|
resp.Value = false;
|
|
return resp;
|
|
}
|
|
resp.Value = true;
|
|
return resp;
|
|
}
|
|
catch (Exception)
|
|
{
|
|
resp.Error.Add("Error al comprobar las dll");
|
|
resp.Value = false;
|
|
return resp;
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Abre el pdf del manual de ayuda
|
|
*/
|
|
public static void OpenManual()
|
|
{
|
|
string[] archivos = null;
|
|
|
|
try
|
|
{
|
|
if (!File.Exists(OliviaGlob.Paths.PathManualOlivia))
|
|
HelperGlobal.ponMsg("No se encuentra el archivo " + OliviaGlob.Paths.PathManualOlivia);
|
|
else
|
|
{
|
|
System.Diagnostics.Process.Start(OliviaGlob.Paths.PathManualOlivia);
|
|
}
|
|
}
|
|
catch (Exception)
|
|
{
|
|
HelperGlobal.ponMsg("Error al abrir el manual de ayuda " + OliviaGlob.Paths.PathManualOlivia);
|
|
return;
|
|
}
|
|
}
|
|
/**
|
|
* Inicializa los nombres por defecto de las variables, para debug por si no hay instalador
|
|
*/
|
|
public static void IniDefault()
|
|
{
|
|
var c = ConfigServ.Serv.Leer();
|
|
Paths.PathCfg = "";
|
|
Paths.PathWork = c.path_work;
|
|
Paths.PathExeOlivia = c.path_exe;
|
|
Paths.PathManualOlivia = c.path_manual;
|
|
Paths.DirData = c.path_data;
|
|
Paths.PathTemp = c.path_temp;
|
|
c.PathCartela = c.PathCartela;
|
|
|
|
Paths.PathGdbImport = c.Path_Gdb_Import;
|
|
Paths.PathGuardCsv = c.Path_Guarda_Csv;
|
|
|
|
HelperGlobal.create_folder(Paths.DirData);
|
|
HelperGlobal.create_folder(Paths.PathTemp);
|
|
|
|
Paths.PathGdbGen = c.PathGdbGen;
|
|
Paths.PathGdbNw = c.Path_Eje_via;
|
|
Paths.PathSimbVSM = c.PathSimbVSM;
|
|
Paths.PathSimbESRI = c.PathSimbESRI;
|
|
Conexion.Puerto = c.Puerto;
|
|
//Conexion.Ip = c.Ip; //la lee en el momento
|
|
Conexion.TiempoOutSocket = c.TiempoOutSocket;
|
|
|
|
///////////////////////////////////////
|
|
//Capas, consultas y filtros GENERALES
|
|
//Capas.ftclass_ejes = c.eje_via;
|
|
//Capas.ftclass_muni = c.municipios;
|
|
Capas.pathEjeVia = c.Path_Eje_via;
|
|
///////////////////////////////////////
|
|
//Capas, consultas, atributos y filtros de LIMPIEZA
|
|
LimpiezaDef.Campos.consulta_entidad = c.cons_tip_ent;
|
|
LimpiezaDef.Campos.consulta_mecan = c.cons_mecaniz;
|
|
LimpiezaDef.Campos.consulta_observ = c.cons_obser;
|
|
LimpiezaDef.Campos.consulta_anch_tip = c.cons_anch_tip;
|
|
LimpiezaDef.Campos.consulta_tipolo = c.cons_tipolo;
|
|
LimpiezaDef.Campos.consulta_sector = c.consulta_sector;
|
|
LimpiezaDef.Campos.consulta_secuen = c.consulta_secuen;
|
|
|
|
LimpiezaDef.Atributos.atr_esca = c.atr_esca;
|
|
LimpiezaDef.Atributos.atr_fuent = c.atr_fuent;
|
|
LimpiezaDef.Atributos.atr_infan = c.atr_infan;
|
|
LimpiezaDef.Atributos.atr_pape = c.atr_pape;
|
|
LimpiezaDef.Atributos.atr_paso_niv = c.atr_paso_niv;
|
|
LimpiezaDef.Atributos.atr_pipi = c.atr_pipi;
|
|
LimpiezaDef.Atributos.atr_sane = c.atr_sane;
|
|
LimpiezaDef.Atributos.atr_acera = c.atr_acera;
|
|
LimpiezaDef.Atributos.atr_aparc = c.atr_aparc;
|
|
LimpiezaDef.Atributos.atr_bord = c.atr_bord;
|
|
LimpiezaDef.Atributos.atr_hoja = c.atr_hoja;
|
|
LimpiezaDef.Atributos.atr_peat = c.atr_peat;
|
|
LimpiezaDef.Atributos.atr_terri = c.atr_terri;
|
|
LimpiezaDef.Atributos.atr_ocio = c.atr_ocio;
|
|
LimpiezaDef.Atributos.atr_org_ofi = c.atr_org_ofi;
|
|
LimpiezaDef.Atributos.atr_parq = c.atr_parq;
|
|
LimpiezaDef.Atributos.atr_park = c.atr_park;
|
|
LimpiezaDef.Atributos.atr_play = c.atr_play;
|
|
LimpiezaDef.Atributos.atr_polid = c.atr_polid;
|
|
LimpiezaDef.Atributos.atr_turis = c.atr_turis;
|
|
LimpiezaDef.Atributos.atr_solar = c.atr_solar;
|
|
LimpiezaDef.Atributos.atr_suelo = c.atr_suelo;
|
|
LimpiezaDef.Atributos.atr_ap_lin = c.atr_ap_lin;
|
|
LimpiezaDef.Atributos.atr_ap_bat = c.atr_ap_bat;
|
|
|
|
//para el grupo PARAMETROS de LIMPIEZA
|
|
LimpiezaDef.Parametros.t_ttoM = c.t_tratamiento_max;
|
|
LimpiezaDef.Parametros.t_ttom = c.t_tratamiento_min;
|
|
LimpiezaDef.Parametros.v_despM = c.v_desplaz_max;
|
|
LimpiezaDef.Parametros.v_despm = c.v_desplaz_min;
|
|
LimpiezaDef.Parametros.t_cardescM = c.t_carga_desc_max;
|
|
LimpiezaDef.Parametros.t_cardescm = c.t_carga_desc_min;
|
|
LimpiezaDef.Parametros.t_cardesc = c.t_carga_desc;
|
|
LimpiezaDef.Parametros.t_despM = c.t_carga_desc_max;
|
|
LimpiezaDef.Parametros.t_despm = c.t_carga_desc_min;
|
|
LimpiezaDef.Parametros.t_desp = c.t_desplaz;
|
|
LimpiezaDef.Parametros.t_convM = c.t_convenio_max;
|
|
LimpiezaDef.Parametros.t_convm = c.t_convenio_min;
|
|
LimpiezaDef.Parametros.t_conv = c.t_convenio;
|
|
LimpiezaDef.Parametros.t_descansoM = c.t_descanso_max;
|
|
LimpiezaDef.Parametros.t_descansom = c.t_descanso_min;
|
|
LimpiezaDef.Parametros.t_descanso = c.t_descanso;
|
|
LimpiezaDef.Parametros.h_inicio = c.hora_inicio;
|
|
LimpiezaDef.Parametros.ancho_viaM = c.ancho_via_max;
|
|
LimpiezaDef.Parametros.ancho_viam = c.ancho_via_min;
|
|
LimpiezaDef.Parametros.ancho_via = c.ancho_via;
|
|
LimpiezaDef.Parametros.ttoBarMan = c.t_tratamiento_BarMan;
|
|
LimpiezaDef.Parametros.ttoBarManMant = c.t_tratamiento_BarManMant;
|
|
LimpiezaDef.Parametros.ttoBarMMot = c.t_tratamiento_BarMMot;
|
|
LimpiezaDef.Parametros.ttoBarMC = c.t_tratamiento_BarMC;
|
|
LimpiezaDef.Parametros.ttoBarMAP = c.t_tratamiento_BarMAP;
|
|
LimpiezaDef.Parametros.ttoBarMix = c.t_tratamiento_BarMix;
|
|
LimpiezaDef.Parametros.ttoBalMan = c.t_tratamiento_BalMan;
|
|
LimpiezaDef.Parametros.ttoBalMC = c.t_tratamiento_BalMC;
|
|
LimpiezaDef.Parametros.ttoBalMAP = c.t_tratamiento_BalMAP;
|
|
LimpiezaDef.Parametros.ttoBalMix = c.t_tratamiento_BalMix;
|
|
LimpiezaDef.Parametros.ttoBL = c.t_tratamiento_BL;
|
|
LimpiezaDef.Parametros.ttoCH = c.t_tratamiento_CH;
|
|
LimpiezaDef.Parametros.ttoVPap = c.t_tratamiento_VPap;
|
|
LimpiezaDef.Parametros.ttoLPap = c.t_tratamiento_LPap;
|
|
LimpiezaDef.Parametros.ttoLC = c.t_tratamiento_LC;
|
|
LimpiezaDef.Parametros.ttoLZI = c.t_tratamiento_LZI;
|
|
LimpiezaDef.Parametros.ttoLPip = c.t_tratamiento_LPip;
|
|
LimpiezaDef.Parametros.ttoLS = c.t_tratamiento_LS;
|
|
LimpiezaDef.Parametros.vdespBarMan = c.v_desp_BarMan;
|
|
LimpiezaDef.Parametros.vdespBarManMant = c.v_desp_BarManMant;
|
|
LimpiezaDef.Parametros.vdespBarMMot = c.v_desp_BarMMot;
|
|
LimpiezaDef.Parametros.vdespBarMC = c.v_desp_BarMC;
|
|
LimpiezaDef.Parametros.vdespBarMAP = c.v_desp_BarMAP;
|
|
LimpiezaDef.Parametros.vdespBarMix = c.v_desp_BarMix;
|
|
LimpiezaDef.Parametros.vdespBalMan = c.v_desp_BalMan;
|
|
LimpiezaDef.Parametros.vdespBalMC = c.v_desp_BalMC;
|
|
LimpiezaDef.Parametros.vdespBalMAP = c.v_desp_BalMAP;
|
|
LimpiezaDef.Parametros.vdespBalMix = c.v_desp_BalMix;
|
|
LimpiezaDef.Parametros.vdespBL = c.v_desp_BL;
|
|
LimpiezaDef.Parametros.vdespCH = c.v_desp_CH;
|
|
LimpiezaDef.Parametros.vdespVPap = c.v_desp_VPap;
|
|
LimpiezaDef.Parametros.vdespLPap = c.v_desp_LPap;
|
|
LimpiezaDef.Parametros.vdespLC = c.v_desp_LC;
|
|
LimpiezaDef.Parametros.vdespLZI = c.v_desp_LZI;
|
|
LimpiezaDef.Parametros.vdespLPip = c.v_desp_LPip;
|
|
LimpiezaDef.Parametros.vdespLS = c.v_desp_LS;
|
|
LimpiezaDef.Parametros.umbral_reco = 80;
|
|
|
|
LimpiezaDef.OtrosParam.giro_max = c.Giro_max_vehiculo;
|
|
LimpiezaDef.OtrosParam.anch_peat = c.Ancho_peat_def;
|
|
LimpiezaDef.OtrosParam.anch_ace = c.Ancho_acera_def;
|
|
LimpiezaDef.OtrosParam.anch_aplin = c.Ancho_ap_lin_def;
|
|
LimpiezaDef.OtrosParam.anch_apbat = c.Ancho_ap_bat_def;
|
|
LimpiezaDef.OtrosParam.anch_bordlib = c.Ancho_bord_lib_def;
|
|
LimpiezaDef.OtrosParam.desv_max = c.Desv_max;
|
|
LimpiezaDef.OtrosParam.desv_max_abs = c.Desv_max_abs;
|
|
|
|
|
|
//Capas, consultas, atributos y filtros de RECOGIDA
|
|
|
|
RecogidaDef.campos_def.cons_id = c.id;
|
|
RecogidaDef.campos_def.cons_nomrec = c.nomrec;
|
|
RecogidaDef.campos_def.cons_lateral = c.lateralidad;
|
|
RecogidaDef.campos_def.cons_fracc = c.frac;
|
|
RecogidaDef.campos_def.cons_capac = c.capac;
|
|
RecogidaDef.campos_def.cons_uds = c.uds;
|
|
RecogidaDef.campos_def.cons_kgrec = c.kgrec;
|
|
RecogidaDef.kgrec_cont = c.kgrec_val;
|
|
|
|
//Rellena los tipos de fracción
|
|
RecogidaDef.tipos_fracc_str[(int)RecogidaDef.TiposFracción.Organica] = c.organica;
|
|
RecogidaDef.tipos_fracc_str[(int)RecogidaDef.TiposFracción.Resto] = c.resto;
|
|
RecogidaDef.tipos_fracc_str[(int)RecogidaDef.TiposFracción.Envases] = c.envase;
|
|
RecogidaDef.tipos_fracc_str[(int)RecogidaDef.TiposFracción.Papel] = c.papel;
|
|
RecogidaDef.tipos_fracc_str[(int)RecogidaDef.TiposFracción.Vidrio] = c.vidrio;
|
|
//Rellena los tipos de carga
|
|
RecogidaDef.tipos_carg_str[(int)RecogidaDef.TiposCarga.Trasera] = c.trasera;
|
|
RecogidaDef.tipos_carg_str[(int)RecogidaDef.TiposCarga.Lateral] = c.lateral;
|
|
RecogidaDef.tipos_carg_str[(int)RecogidaDef.TiposCarga.Superior] = c.superior;
|
|
RecogidaDef.tipos_carg_str[(int)RecogidaDef.TiposCarga.Bilateral] = c.bilat;
|
|
RecogidaDef.tipos_carg_str[(int)RecogidaDef.TiposCarga.BolseoPtaPta] = c.bolseo;
|
|
RecogidaDef.tipos_carg_str[(int)RecogidaDef.TiposCarga.Lavado] = c.lavado;
|
|
|
|
RecogidaDef.lleno = c.is_lleno;
|
|
RecogidaDef.kgrec_camp = c.is_campo;
|
|
|
|
RecogidaDef.Parametros.t_vaciM = c.t_vaciado_max;
|
|
RecogidaDef.Parametros.t_vacim = c.t_vaciado_min;
|
|
RecogidaDef.Parametros.t_llegsalM = c.t_llega_sale_max;
|
|
RecogidaDef.Parametros.t_llegsalm = c.t_llega_sale_min;
|
|
RecogidaDef.Parametros.t_llegsal = c.t_llega_sale;
|
|
RecogidaDef.Parametros.t_descM = c.t_descarga_max;
|
|
RecogidaDef.Parametros.t_descm = c.t_descarga_min;
|
|
RecogidaDef.Parametros.t_desc = c.t_descarga;
|
|
RecogidaDef.Parametros.t_convM = c.t_convenio_max;
|
|
RecogidaDef.Parametros.t_convm = c.t_convenio_min;
|
|
RecogidaDef.Parametros.t_conv = c.t_convenio;
|
|
RecogidaDef.Parametros.t_descansoM = c.t_descanso_max;
|
|
RecogidaDef.Parametros.t_descansom = c.t_descanso_min;
|
|
RecogidaDef.Parametros.t_descanso = c.t_descanso;
|
|
RecogidaDef.Parametros.h_inicio = c.hora_inicio;
|
|
RecogidaDef.Parametros.dens_vehi_org = c.dens_vehi_org;
|
|
RecogidaDef.Parametros.dens_vehi_res = c.dens_vehi_res;
|
|
RecogidaDef.Parametros.dens_vehi_env = c.dens_vehi_env;
|
|
RecogidaDef.Parametros.dens_vehi_pap = c.dens_vehi_pap;
|
|
RecogidaDef.Parametros.dens_vehi_vid = c.dens_vehi_vid;
|
|
RecogidaDef.Parametros.dens_vehi_otr = c.dens_vehi_otr;
|
|
RecogidaDef.Parametros.dens_cont_org = c.dens_cont_org;
|
|
RecogidaDef.Parametros.dens_cont_res = c.dens_cont_res;
|
|
RecogidaDef.Parametros.dens_cont_env = c.dens_cont_env;
|
|
RecogidaDef.Parametros.dens_cont_pap = c.dens_cont_pap;
|
|
RecogidaDef.Parametros.dens_cont_vid = c.dens_cont_vid;
|
|
RecogidaDef.Parametros.dens_cont_otr = c.dens_cont_otr;
|
|
RecogidaDef.Parametros.anch_vehi_3 = c.anch_vehi_3;
|
|
RecogidaDef.Parametros.anch_vehi_2 = c.anch_vehi_2;
|
|
RecogidaDef.Parametros.anch_vehi_s = c.anch_vehi_s;
|
|
RecogidaDef.Parametros.rad_giro_3 = c.radio_giro_3;
|
|
RecogidaDef.Parametros.rad_giro_2 = c.radio_giro_2;
|
|
RecogidaDef.Parametros.rad_giro_s = c.radio_giro_s;
|
|
RecogidaDef.Parametros.t_vaci_tra = c.t_vaci_trasera;
|
|
RecogidaDef.Parametros.t_vaci_lat = c.t_vaci_lateral;
|
|
RecogidaDef.Parametros.t_vaci_sup = c.t_vaci_superior;
|
|
RecogidaDef.Parametros.t_vaci_bi = c.t_vaci_bilateral;
|
|
RecogidaDef.Parametros.t_vaci_bol = c.t_vaci_bolseo;
|
|
RecogidaDef.Parametros.t_vaci_lav = c.t_vaci_lavado;
|
|
RecogidaDef.Parametros.t_vaci_otr = c.t_vaci_otra;
|
|
RecogidaDef.Parametros.kgmaxM = c.kgmax_max;
|
|
RecogidaDef.Parametros.kgmaxm = c.kgmax_min;
|
|
RecogidaDef.Parametros.carga_maxM = c.carga_max_max;
|
|
RecogidaDef.Parametros.carga_maxm = c.carga_max_min;
|
|
|
|
//Atributos LATERALIDAD
|
|
RecogidaDef.tipos_lateralidad[(int)RecogidaDef.Lateralidad.Ambos] = c.ambos;
|
|
RecogidaDef.tipos_lateralidad[(int)RecogidaDef.Lateralidad.Dcha] = c.derecha;
|
|
RecogidaDef.tipos_lateralidad[(int)RecogidaDef.Lateralidad.Izqda] = c.izquierda;
|
|
|
|
ComunDef.BuffExport = c.buffer_export;
|
|
//Campos de la red navegable que se leen
|
|
ComunDef.CamposNW.cons_onew = c.cons_onew;
|
|
ComunDef.CamposNW.cons_kph = c.cons_kph;
|
|
ComunDef.CamposNW.cons_fow = c.cons_fow;
|
|
ComunDef.CamposNW.cons_name = c.cons_name;
|
|
//Atributos de la red navegable que se leen
|
|
ComunDef.AtributosNW.atr_TF = c.atr_TF;
|
|
ComunDef.AtributosNW.atr_FT = c.atr_FT;
|
|
ComunDef.AtributosNW.atr_N = c.atr_N;
|
|
ComunDef.AtributosNW.atr_pedes = c.atr_pedes;
|
|
|
|
}
|
|
}
|
|
}
|