modos de viaje
parent
bb62863fab
commit
9273611e3f
|
|
@ -10,8 +10,9 @@ namespace OliviaAddInPro.Model
|
|||
//*************************************************************************************
|
||||
//Enums y structs generales
|
||||
public static int BuffExport = 1000;
|
||||
//public static int MaxCaracteresBBDD = 10;
|
||||
|
||||
//public static int MaxCaracteresBBDD = 10;
|
||||
public static OliviaConfMV configMV; //configuracion para modos de viaje
|
||||
/**
|
||||
* Nombre de los campos de la cartografía de la red navegable que se consultan para la exportación
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -66,6 +66,8 @@ namespace OliviaAddInPro.Model
|
|||
Respuesta<bool> res = new Respuesta<bool> { Value=false};
|
||||
Respuesta<TiposEjecucion> res2 = new Respuesta<TiposEjecucion> (){ Value = TiposEjecucion.FinEjecNOk };
|
||||
Serv.TipoMv = TipoMV;
|
||||
|
||||
|
||||
res = Serv.Ejecuta(modo);
|
||||
if (res.Value)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -12,6 +12,10 @@ namespace OliviaAddInPro.Model
|
|||
{
|
||||
public OliviaConfMV()
|
||||
{
|
||||
nombre = "default";
|
||||
filtro_omitir = "";
|
||||
campo_prioridad = "0";
|
||||
|
||||
}
|
||||
|
||||
public string nombre { get; set; }
|
||||
|
|
|
|||
|
|
@ -340,7 +340,13 @@ namespace OliviaAddInPro.Services
|
|||
//////////////////////////////////////
|
||||
///
|
||||
//Hace el filtro con la geometría final
|
||||
filtroEspacial = HelperGdb.CreateFiler(String.Empty, geom_export);
|
||||
//ComunDef.configMV
|
||||
var where = String.Empty;
|
||||
if (!String.IsNullOrEmpty(ComunDef.configMV.filtro_omitir))
|
||||
{
|
||||
where = "not(" + ComunDef.configMV.filtro_omitir + ")";
|
||||
}
|
||||
filtroEspacial = HelperGdb.CreateFiler(where, geom_export);
|
||||
if (filtroEspacial == null)
|
||||
{
|
||||
ErrStr = "Error al crear el filtro de exportacion de la red navegable";
|
||||
|
|
@ -477,7 +483,7 @@ namespace OliviaAddInPro.Services
|
|||
if (!HelperGdb.CalculateFieldsSync(pathNW, ComunDef.CamposNW.cons_ele_f, ComunDef.CamposNW.config.campo_elevacion_from))
|
||||
return false;
|
||||
|
||||
if (!HelperGdb.CalculateFieldsSync(pathNW, ComunDef.CamposNW.cons_evit, "0"))
|
||||
if (!HelperGdb.CalculateFieldsSync(pathNW, ComunDef.CamposNW.cons_evit, ComunDef.configMV.campo_prioridad))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
using ArcGIS.Core.Geometry;
|
||||
using ArcGIS.Core.Internal.CIM;
|
||||
using ArcGIS.Desktop.Framework.Threading.Tasks;*/
|
||||
using ActiproSoftware.Windows.Extensions;
|
||||
using OliviaAddInPro.Helper;
|
||||
using OliviaAddInPro.Model;
|
||||
using System;
|
||||
|
|
@ -32,6 +33,15 @@ namespace OliviaAddInPro.Services
|
|||
*/
|
||||
public Respuesta<bool> Ejecuta(ModosEjec modo)
|
||||
{
|
||||
var modos_viaje = ConfigServ.Serv.Leer().ListaMV;
|
||||
if (modos_viaje != null && modos_viaje.Count > TipoMv)
|
||||
{
|
||||
ComunDef.configMV = modos_viaje[TipoMv];
|
||||
}
|
||||
else
|
||||
{
|
||||
ComunDef.configMV = new OliviaConfMV();
|
||||
}
|
||||
var res = new Respuesta<bool>()
|
||||
{
|
||||
Value = false
|
||||
|
|
@ -110,9 +120,11 @@ namespace OliviaAddInPro.Services
|
|||
{
|
||||
|
||||
var conf=ConfigServ.Serv.Leer();
|
||||
if(conf.ListaMV==null || conf.ListaMV.Count<=0 )
|
||||
return new ObservableCollection<string>();
|
||||
return (ObservableCollection<string>)conf.ListaMV.Select(c => c.nombre);
|
||||
var res = new ObservableCollection<string>();
|
||||
if (conf.ListaMV==null || conf.ListaMV.Count<=0 )
|
||||
return res;
|
||||
res.AddRange(conf.ListaMV.Select(c => c.nombre));
|
||||
return res;
|
||||
}
|
||||
/**
|
||||
* Comprueba lo necesario para ver si hay campos para la planificación
|
||||
|
|
|
|||
|
|
@ -220,6 +220,7 @@ namespace OliviaAddInPro
|
|||
limpServ = new LimpiezaServ(null); //no hace falta instancia limp
|
||||
textAnchoVia = LimpiezaDef.Parametros.ancho_via.ToString();
|
||||
tiposMv = limpServ.GetNombreModosViajes();
|
||||
tipoMv = -1;
|
||||
}
|
||||
/**
|
||||
* Realiza las comprobaciones para cuando se ha abierto una capa
|
||||
|
|
|
|||
|
|
@ -92,6 +92,8 @@ namespace OliviaAddInPro
|
|||
err_str = "No se ha seleccionado ningún Tipo de Tratamiento";
|
||||
return false;
|
||||
}
|
||||
limp.TipoMV = _subPanel1ViewModel.TipoMv;
|
||||
|
||||
limp.TipoTto = _subPanel1ViewModel.TipoTto;
|
||||
limp.TipoTtoStr = LimpiezaDef.tto_gdb[_subPanel1ViewModel.TipoTto];
|
||||
//lee el/los ámbito seleccionado
|
||||
|
|
|
|||
|
|
@ -112,6 +112,7 @@ namespace OliviaAddInPro
|
|||
err_str = "No se ha seleccionado ningún Tipo de Fracción";
|
||||
return false;
|
||||
}
|
||||
reco.TipoMV = _subPanel1ViewModel.TipoMv;
|
||||
reco.TipoFracStr = RecogidaDef.tipos_fracc_str[reco.TipoFrac];
|
||||
reco.TipoTto = reco.TipoFrac;
|
||||
reco.TipoTtoStr = RecogidaDef.tipos_fracc_str[reco.TipoFrac];
|
||||
|
|
|
|||
Loading…
Reference in New Issue