Compare commits
4 Commits
develop
...
Gerardo/St
| Author | SHA1 | Date |
|---|---|---|
|
|
e9faefdafd | |
|
|
6d7d2f7033 | |
|
|
4628ea88e4 | |
|
|
f94b4e3a2e |
|
|
@ -30,13 +30,13 @@ namespace OliviaAddInPro
|
|||
if (OliviaGlob.TipoView == TiposEjecucion.Ninguno)
|
||||
{
|
||||
///Comprueba que existe la red navegable configurada
|
||||
if (!OliviaGlob.CompruebaNwYCampos())
|
||||
/*if (!OliviaGlob.CompruebaNwYCampos())
|
||||
{
|
||||
HelperGlobal.ponMsg("No se encuentra red navegable, cambie Configuración: " + HelperGdb.OutStr,
|
||||
System.Windows.MessageBoxImage.Warning);
|
||||
}
|
||||
else
|
||||
{
|
||||
{*/
|
||||
OliviaGlob.SetFlagTipEjec(TiposEjecucion.Limp);
|
||||
OliviaGlob.ViewSetFlagTipEjec(TiposEjecucion.Limp);
|
||||
|
||||
|
|
@ -44,7 +44,7 @@ namespace OliviaAddInPro
|
|||
OliviaGlob.Limp = new Limpieza();
|
||||
DockpaneLimpiezaViewModel.Reset();
|
||||
DockpaneLimpiezaViewModel.Show();
|
||||
}
|
||||
//}
|
||||
}
|
||||
else if(OliviaGlob.ViewIsProps())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -28,13 +28,13 @@ namespace OliviaAddInPro
|
|||
if (OliviaGlob.TipoView == TiposEjecucion.Ninguno)
|
||||
{
|
||||
///Comprueba que existe la red navegable configurada
|
||||
if (!OliviaGlob.CompruebaNwYCampos())
|
||||
/*if (!OliviaGlob.CompruebaNwYCampos())
|
||||
{
|
||||
HelperGlobal.ponMsg("No se encuentra red navegable, cambie Configuración: " + HelperGdb.OutStr,
|
||||
System.Windows.MessageBoxImage.Warning);
|
||||
}
|
||||
else
|
||||
{
|
||||
{*/
|
||||
OliviaGlob.SetFlagTipEjec(TiposEjecucion.Reco);
|
||||
OliviaGlob.ViewSetFlagTipEjec(TiposEjecucion.Reco);
|
||||
|
||||
|
|
@ -42,7 +42,7 @@ namespace OliviaAddInPro
|
|||
OliviaGlob.Reco = new Recogida();
|
||||
DockpaneRecogidaViewModel.Reset();
|
||||
DockpaneRecogidaViewModel.Show();
|
||||
}
|
||||
//}
|
||||
}
|
||||
else if (OliviaGlob.ViewIsProps())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ArcGIS defaultAssembly="OliviaAddInPro.dll" defaultNamespace="OliviaAddInPro" xmlns="http://schemas.esri.com/DADF/Registry" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.esri.com/DADF/Registry file:///C:/Program%20Files/ArcGIS/Pro/bin/ArcGIS.Desktop.Framework.xsd">
|
||||
<AddInInfo id="{10742570-cf59-42f2-bea2-2a38002a06ee}" version="3.2" desktopVersion="3.0.3.36057">
|
||||
<AddInInfo id="{10742570-cf59-42f2-bea2-2a38002a06ee}" version="3.3" desktopVersion="3.0.3.36057">
|
||||
<Name>OliviaAddInPro</Name>
|
||||
<Description>AddIn de Optimización de la Limpieza Viaria para ArcGIs Pro</Description>
|
||||
<Image>Images\AddinDesktop32.png</Image>
|
||||
<Author>VSM</Author>
|
||||
<Company>VSM - Narvaling</Company>
|
||||
<Date>18/04/2023 12:00:00, 2023</Date>
|
||||
<Date>09/11/2023 12:00:00, 2023</Date>
|
||||
<Subject>Framework</Subject>
|
||||
<!-- Note subject can be one or more of these topics:
|
||||
Content, Framework, Editing, Geodatabase, Geometry, Geoprocessing, Layouts, Map Authoring, Map Exploration -->
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ using System.Threading;
|
|||
using ArcGIS.Core.Data.Exceptions;
|
||||
using Microsoft.Win32;
|
||||
using Microsoft.WindowsAPICodePack.Dialogs;
|
||||
using System.Security.Cryptography;
|
||||
|
||||
namespace OliviaAddInPro.Helper
|
||||
{
|
||||
|
|
@ -1444,7 +1445,7 @@ namespace OliviaAddInPro.Helper
|
|||
if (!System.IO.Directory.Exists(outpath))
|
||||
System.IO.Directory.CreateDirectory(outpath);
|
||||
FeatureClass fc = null;
|
||||
bool debug = true;
|
||||
bool debug = false;
|
||||
/////////////////////////////////////////////////////////
|
||||
//Prepara una where_clause con las entidades que cumplen el filtro
|
||||
//Abre la featureclass
|
||||
|
|
@ -2807,6 +2808,69 @@ namespace OliviaAddInPro.Helper
|
|||
{
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
public static bool ExplodeAll(string pahtFc)
|
||||
{
|
||||
/*
|
||||
var ft = GetFtClassSync(pahtFc);
|
||||
var ids=ft.Select(new ArcGIS.Core.Data.QueryFilter() { WhereClause = "true" }, SelectionType.ObjectID, SelectionOption.Normal).GetObjectIDs().ToList();
|
||||
|
||||
var explodeFeatures = new EditOperation();
|
||||
explodeFeatures.Name = "Explode Features";
|
||||
|
||||
//Take a multipart and convert it into one feature per part
|
||||
//Provide a list of ids to convert multiple
|
||||
explodeFeatures.Explode(ft, ids, true);
|
||||
|
||||
//Execute to execute the operation
|
||||
//Must be called within QueuedTask.Run
|
||||
if (!explodeFeatures.IsEmpty)
|
||||
{
|
||||
var result = explodeFeatures.Execute(); //Execute and ExecuteAsync will return true if the operation was successful and false if not
|
||||
}
|
||||
return true;
|
||||
//or use async flavor
|
||||
//await explodeFeatures.ExecuteAsync();
|
||||
*/
|
||||
return true;
|
||||
}
|
||||
/*
|
||||
* Añadir columna calculada
|
||||
*/
|
||||
public static bool CalculateFieldsSync(string fcname, string field, string sqlquery)
|
||||
{
|
||||
bool res = false;
|
||||
|
||||
var args = Geoprocessing.MakeValueArray(fcname, field, sqlquery, "ARCADE");
|
||||
|
||||
// run the tool
|
||||
try
|
||||
{
|
||||
var gpres = Geoprocessing.ExecuteToolAsync("management.CalculateField", args);
|
||||
|
||||
while (!gpres.IsCompleted && !gpres.IsCanceled && !gpres.IsFaulted)
|
||||
Thread.Sleep(10);
|
||||
if (gpres.IsFaulted)
|
||||
{
|
||||
var gpResult = gpres.Result;
|
||||
string msg;
|
||||
if (gpResult.ErrorMessages != null)
|
||||
msg = gpResult.ErrorMessages.First().Text;
|
||||
else
|
||||
msg = "Errores al calcular campo "+ field;
|
||||
}
|
||||
else
|
||||
{
|
||||
res = true; //ha ido bien
|
||||
}
|
||||
gpres.Dispose();
|
||||
return res;
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -17,11 +17,16 @@ namespace OliviaAddInPro.Model
|
|||
*/
|
||||
public struct CamposNW
|
||||
{
|
||||
public static string cons_onew; //<Campo que indica el sentido
|
||||
public static string cons_kph; //<Campo que indica la velocidad en kph
|
||||
public static string cons_name; //<Campo que indica el nombre de la calle
|
||||
public static string cons_fow; //Campo que indica el tipo de vial, si es peatonal o no
|
||||
public static string cons_onewFT="_sen_ft"; //<Campo que indica el sentido
|
||||
public static string cons_onewTF="_sen_tf"; //<Campo que indica el sentido
|
||||
|
||||
public static string cons_kph="_vel"; //<Campo que indica la velocidad en kph
|
||||
public static string cons_name="_dir"; //<Campo que indica el nombre de la calle
|
||||
public static string cons_fow="_pea"; //Campo que indica el tipo de vial, si es peatonal o no
|
||||
public static string cons_evit = "_evita"; //Campo que indica si el vial es evitable
|
||||
public static OliviaConfNW config; //configuracion para sacar capmos por defecto
|
||||
};
|
||||
|
||||
/**
|
||||
* Nombre de los Atributos de la cartografía de la red navegable que se consultan para la exportación
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -11,9 +11,12 @@ using System.Windows;
|
|||
using Xceed.Wpf.Toolkit.PropertyGrid;
|
||||
using Xceed.Wpf.Toolkit.PropertyGrid.Editors;
|
||||
using Xceed.Wpf.Toolkit.PropertyGrid.Attributes;
|
||||
using static OliviaAddInPro.Model.OliviaConf;
|
||||
|
||||
namespace OliviaAddInPro.Model
|
||||
{
|
||||
|
||||
|
||||
[CategoryOrder("General", 1)]
|
||||
[CategoryOrder("Campos Limpieza", 2)]
|
||||
[CategoryOrder("Atributos Limpieza", 3)]
|
||||
|
|
@ -44,12 +47,30 @@ namespace OliviaAddInPro.Model
|
|||
[Description("Usa 'Kg por Defecto'")]
|
||||
UsaKgDef
|
||||
}
|
||||
[TypeConverter(typeof(EnumOpsNWToString))]
|
||||
public enum OpsNW
|
||||
{
|
||||
|
||||
nw_0,
|
||||
nw_1,
|
||||
nw_2,
|
||||
nw_3,
|
||||
nw_4,
|
||||
|
||||
}
|
||||
private string m2s(int min)
|
||||
{
|
||||
var val = min;
|
||||
int horas = val / 60;
|
||||
return string.Format("{0}:{1:D2}", horas, val - (horas * 60));
|
||||
}
|
||||
public OliviaConfNW GetOliviaConfNW()
|
||||
{
|
||||
int i = (int)Tipo_eje_via;
|
||||
if (ListaNw != null && ListaNw.Count() > i)
|
||||
return ListaNw[i];
|
||||
return null;
|
||||
}
|
||||
private int s2m(string str, int defec)
|
||||
{
|
||||
var match = Regex.Match(str, @"^([0-9]*):([0-9]*)");
|
||||
|
|
@ -66,14 +87,13 @@ namespace OliviaAddInPro.Model
|
|||
}
|
||||
return defec;
|
||||
}
|
||||
|
||||
public OliviaConf()
|
||||
{
|
||||
Ip = "127.0.0.1";
|
||||
Puerto = 19995;
|
||||
TiempoOutSocket = 20;
|
||||
}
|
||||
|
||||
}
|
||||
#region PropiedadesOcultas
|
||||
#region parametrosConexion
|
||||
/**
|
||||
|
|
@ -174,7 +194,8 @@ namespace OliviaAddInPro.Model
|
|||
|
||||
#endregion
|
||||
#region ParametrosReco_Ocultos
|
||||
|
||||
[Browsable(false)]
|
||||
public List<OliviaConfNW> ListaNw { get; set; }
|
||||
[Browsable(false)]
|
||||
public int t_vaciado_max { get; set; }
|
||||
[Browsable(false)]
|
||||
|
|
@ -219,6 +240,14 @@ namespace OliviaAddInPro.Model
|
|||
[Editor(typeof(PropertyGridFilePickerLine), typeof(PropertyGridFilePickerLine))]
|
||||
public string Path_Eje_via { get; set; }
|
||||
|
||||
[Category("General")]
|
||||
[DisplayName("Tipo Red de carreteras")]
|
||||
[PropertyOrder(1)]
|
||||
[Description("Tipo de Red de carreteras que se usa para la navegación")]
|
||||
[RefreshProperties(System.ComponentModel.RefreshProperties.All)]
|
||||
//[Editor(typeof(PropertyGridFilePickerLine), typeof(PropertyGridFilePickerLine))]
|
||||
public OpsNW Tipo_eje_via { get; set; }
|
||||
|
||||
[Category("General")]
|
||||
[PropertyOrder(2)]
|
||||
[DisplayName("Buffer de exportación (m)")]
|
||||
|
|
@ -1327,9 +1356,55 @@ namespace OliviaAddInPro.Model
|
|||
public string atr_suelo { get; set; }
|
||||
#endregion
|
||||
|
||||
}
|
||||
public class EnumOpsNWToString : TypeConverter
|
||||
{
|
||||
public static List<OliviaConfNW> ListaNw { get; set; }
|
||||
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
|
||||
{
|
||||
return (sourceType.Equals(typeof(OpsNW)));
|
||||
}
|
||||
|
||||
public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
|
||||
{
|
||||
return (destinationType.Equals(typeof(String)));
|
||||
}
|
||||
|
||||
public override object ConvertFrom(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value)
|
||||
{
|
||||
return base.ConvertFrom(context, culture, value);
|
||||
}
|
||||
|
||||
public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType)
|
||||
{
|
||||
if (!destinationType.Equals(typeof(String)))
|
||||
{
|
||||
throw new ArgumentException("Can only convert to string.", "destinationType");
|
||||
}
|
||||
|
||||
if (!value.GetType().Equals(typeof(OpsNW)))
|
||||
{
|
||||
throw new ArgumentException("Can only convert an instance of enum.", "value");
|
||||
}
|
||||
int i = 0;
|
||||
|
||||
if (int.TryParse(value.ToString().Substring(3), out i) && ListaNw != null && i < ListaNw.Count())
|
||||
{
|
||||
var aux = ListaNw[i];
|
||||
if (aux == null)
|
||||
|
||||
return "";
|
||||
else
|
||||
return aux.nombre;
|
||||
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
}
|
||||
public class EnumToStringUsingDescription : TypeConverter
|
||||
{
|
||||
|
||||
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
|
||||
{
|
||||
return (sourceType.Equals(typeof(Enum)));
|
||||
|
|
|
|||
|
|
@ -0,0 +1,27 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace OliviaAddInPro.Model
|
||||
{
|
||||
[Serializable]
|
||||
public class OliviaConfNW
|
||||
{
|
||||
public OliviaConfNW()
|
||||
{
|
||||
}
|
||||
|
||||
public string nombre { get; set; }
|
||||
public string campo_velocidad { get; set; }
|
||||
public string campo_nombre { get; set; }
|
||||
public string campo_sentidoFT { get; set; }
|
||||
public string campo_sentidoTf { get; set; }
|
||||
public string campo_peatonal { get; set; }
|
||||
|
||||
public bool comprueba_elevacion { get; set; }
|
||||
public bool revisa_topologia { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -160,7 +160,8 @@ namespace OliviaAddInPro.Model
|
|||
public const string GG_hini = "h_inicio";
|
||||
public const string GG_trafic = "trafico";
|
||||
public const string GG_ais = "aislados";
|
||||
|
||||
public const string GG_elev = "elevacion";
|
||||
public const string GG_topo = "reviTopo";
|
||||
/**
|
||||
* Define las propiedades de limpieza a enviar a oliviatasks
|
||||
*/
|
||||
|
|
@ -599,6 +600,16 @@ namespace OliviaAddInPro.Model
|
|||
* 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";
|
||||
|
||||
|
||||
//atributos network por defecto------------------------------------------------------------------------------
|
||||
public const string cons_camp_sentido_tf = "_sen_ft"; //<Campo que indica el sentido 0 1
|
||||
public const string cons_camp_sentido_ft = "_sen_tf"; //<Campo que indica el sentido 0 1
|
||||
public const string cons__camp_vel= "_vel"; //<Campo que indica la velocidad en kph
|
||||
public const string cons_name="_nom"; //<Campo que indica el nombre de la calle
|
||||
public const string cons_peat="_peat"; //Campo que indica el tipo de vial, si es peatonal o no
|
||||
public const string cons_ev = "_ev"; //Campo que indica si hay que intentar evitar o no (0-1)
|
||||
//-----------------------------------------------------------------------------------------------------------
|
||||
//*************************************************************************************
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -273,13 +273,14 @@ namespace OliviaAddInPro.Model
|
|||
if (ft == null)
|
||||
return false;
|
||||
HelperGdb.Free(ft);
|
||||
int NCAMPS = 4;
|
||||
int NCAMPS = 5;
|
||||
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;
|
||||
camps[0] = ComunDef.CamposNW.cons_onewFT;
|
||||
camps[1] = ComunDef.CamposNW.cons_onewTF;
|
||||
camps[2] = ComunDef.CamposNW.cons_kph;
|
||||
camps[3] = ComunDef.CamposNW.cons_name;
|
||||
camps[4] = ComunDef.CamposNW.cons_fow;
|
||||
return HelperGdb.CheckFileds(OliviaGlob.Paths.PathGdbNw, camps) == 0;
|
||||
}
|
||||
|
||||
|
|
@ -493,6 +494,7 @@ namespace OliviaAddInPro.Model
|
|||
LimpiezaDef.Parametros.h_inicio = c.hora_inicio;
|
||||
LimpiezaDef.Parametros.reduc_traf = c.reduc_traf;
|
||||
LimpiezaDef.Parametros.igno_ais = c.Igno_ais;
|
||||
|
||||
LimpiezaDef.Parametros.ancho_viaM = c.ancho_via_max;
|
||||
LimpiezaDef.Parametros.ancho_viam = c.ancho_via_min;
|
||||
LimpiezaDef.Parametros.ancho_via = c.ancho_via;
|
||||
|
|
@ -620,16 +622,16 @@ namespace OliviaAddInPro.Model
|
|||
|
||||
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;
|
||||
/*ComunDef.CamposNW.cons_onew = c.cons_onew;
|
||||
ComunDef.CamposNW.cons_kph = "_vel";
|
||||
ComunDef.CamposNW.cons_fow = "_peat";
|
||||
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;
|
||||
|
||||
ComunDef.CamposNW.config = c.GetOliviaConfNW();
|
||||
ComunDef.CamposCom.camp_oid = c.id;
|
||||
ComunDef.CamposCom.consulta_sector = c.consulta_sector;
|
||||
ComunDef.CamposCom.consulta_secuen = c.consulta_secuen;
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ using System.Threading.Tasks;
|
|||
using System.IO;
|
||||
using Newtonsoft.Json;
|
||||
using Microsoft.Win32;
|
||||
using static OliviaAddInPro.Model.OliviaConf;
|
||||
|
||||
namespace OliviaAddInPro.Services
|
||||
{
|
||||
|
|
@ -43,9 +44,9 @@ namespace OliviaAddInPro.Services
|
|||
}
|
||||
if(res==null)
|
||||
res = Default();
|
||||
|
||||
EnumOpsNWToString.ListaNw = res.ListaNw;
|
||||
//pilla la IP
|
||||
if(res.Ip.CompareTo("0.0.0.0")==0)
|
||||
if (res.Ip.CompareTo("0.0.0.0")==0)
|
||||
{
|
||||
//coge la IP local
|
||||
res.Ip = OliviaGlob.Conexion.Ip;
|
||||
|
|
@ -396,7 +397,30 @@ namespace OliviaAddInPro.Services
|
|||
c.Giro_max_vehiculo = 175.0000000;
|
||||
c.Desv_max = 0.1500000;
|
||||
c.Desv_max_abs = 1800.0000000;
|
||||
|
||||
c.Tipo_eje_via = OpsNW.nw_1;
|
||||
c.ListaNw = new List<OliviaConfNW>();
|
||||
c.ListaNw.Add(new OliviaConfNW()
|
||||
{
|
||||
nombre= "TomTom",
|
||||
campo_velocidad= "$feature.KPH",
|
||||
campo_nombre= "$feature.NAME",
|
||||
campo_peatonal= "IIf( $feature.FOW == 14 || $feature.ONEWAY == 'N', 1, 0)",
|
||||
campo_sentidoFT= "IIF($feature.ONEWAY== 'FT' || $feature.ONEWAY == '', 1 , 0)",
|
||||
campo_sentidoTf= "IIF($feature.ONEWAY == 'TF' || $feature.ONEWAY == '', 1, 0)",
|
||||
comprueba_elevacion=true,
|
||||
revisa_topologia=false
|
||||
});
|
||||
c.ListaNw.Add(new OliviaConfNW()
|
||||
{
|
||||
nombre = "StreetMapPremiun",
|
||||
campo_velocidad = "max($feature.FT_RST_SPE, $feature.TF_RST_SPE)",
|
||||
campo_nombre = "$feature.FULL_STREE",
|
||||
campo_peatonal = "IIF( $feature.FT_RST_AUT == 'Y' && $feature.TF_RST_AUT == 'Y', 1, 0)",
|
||||
campo_sentidoFT = "IIf( $feature.FT_RST_AUT == 'N', 1, 0)",
|
||||
campo_sentidoTf = "IIf( $feature.TF_RST_AUT == 'N', 1, 0)",
|
||||
comprueba_elevacion = false,
|
||||
revisa_topologia = true
|
||||
});
|
||||
return c;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -366,7 +366,12 @@ namespace OliviaAddInPro.Services
|
|||
ErrStr = Resource1.String_cancel_progreso;
|
||||
return false;
|
||||
}
|
||||
|
||||
//prepara campos estandar
|
||||
if(!EstandarizaCamposNW(OliviaGlob.Paths.DirData+com.NombreShpExportNw))
|
||||
{
|
||||
ErrStr = "Error al estandarizar campos red navegable: " + HelperGdb.OutStr;
|
||||
return false;
|
||||
}
|
||||
com.ProgrSrc.IncMessage(40, "Finalizada Exportación. Conectando con Olivia Tasks.");//100%
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
|
@ -376,6 +381,65 @@ namespace OliviaAddInPro.Services
|
|||
}
|
||||
return true;
|
||||
}
|
||||
bool EstandarizaCamposNW(string pathNW)
|
||||
{
|
||||
HelperGdb.FieldToAdd[] fields = new HelperGdb.FieldToAdd[6];
|
||||
//campo SECTOR
|
||||
int i = 0;
|
||||
fields[i].Name = ComunDef.CamposNW.cons_kph;
|
||||
fields[i].Alias = ComunDef.CamposNW.cons_kph;
|
||||
fields[i].Tipo = "FLOAT";
|
||||
fields[i].Length = 0;
|
||||
|
||||
i++;
|
||||
|
||||
fields[i].Name = ComunDef.CamposNW.cons_fow;
|
||||
fields[i].Alias = ComunDef.CamposNW.cons_fow;
|
||||
fields[i].Tipo = "LONG";
|
||||
fields[i].Length = 0;
|
||||
i++;
|
||||
fields[i].Name = ComunDef.CamposNW.cons_onewFT;
|
||||
fields[i].Alias = ComunDef.CamposNW.cons_onewFT;
|
||||
fields[i].Tipo = "LONG";
|
||||
fields[i].Length = 0;
|
||||
|
||||
i++;
|
||||
fields[i].Name = ComunDef.CamposNW.cons_onewTF;
|
||||
fields[i].Alias = ComunDef.CamposNW.cons_onewTF;
|
||||
fields[i].Tipo = "LONG";
|
||||
fields[i].Length = 0;
|
||||
|
||||
i++;
|
||||
fields[i].Name = ComunDef.CamposNW.cons_evit;
|
||||
fields[i].Alias = ComunDef.CamposNW.cons_evit;
|
||||
fields[i].Tipo = "LONG";
|
||||
fields[i].Length = 0;
|
||||
i++;
|
||||
|
||||
fields[i].Name = ComunDef.CamposNW.cons_name;
|
||||
fields[i].Alias = ComunDef.CamposNW.cons_name;
|
||||
fields[i].Tipo = "TEXT";
|
||||
fields[i].Length = 128;
|
||||
|
||||
|
||||
|
||||
if (!HelperGdb.AddFieldsSync(pathNW, fields))
|
||||
return false;
|
||||
if (!HelperGdb.CalculateFieldsSync(pathNW, ComunDef.CamposNW.cons_kph, ComunDef.CamposNW.config.campo_velocidad))
|
||||
return false;
|
||||
|
||||
if (!HelperGdb.CalculateFieldsSync(pathNW, ComunDef.CamposNW.cons_name, ComunDef.CamposNW.config.campo_nombre))
|
||||
return false;
|
||||
if (!HelperGdb.CalculateFieldsSync(pathNW, ComunDef.CamposNW.cons_fow, ComunDef.CamposNW.config.campo_peatonal))
|
||||
return false;
|
||||
if (!HelperGdb.CalculateFieldsSync(pathNW, ComunDef.CamposNW.cons_onewTF, ComunDef.CamposNW.config.campo_sentidoTf))
|
||||
return false;
|
||||
if (!HelperGdb.CalculateFieldsSync(pathNW, ComunDef.CamposNW.cons_onewFT, ComunDef.CamposNW.config.campo_sentidoFT))
|
||||
return false;
|
||||
if (!HelperGdb.CalculateFieldsSync(pathNW, ComunDef.CamposNW.cons_evit, "0"))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
/**
|
||||
* Actualiza la capa dada añadiendo una columna de sector y una de secuencia
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -80,6 +80,8 @@ namespace OliviaAddInPro.Services.LanzaSrv
|
|||
GeneralDef.EjecGeoParamSep + GeneralDef.GG_coox + GeneralDef.EjecGeoParamIgual + limp.CoordsInstal.X + " " +//coordenadas
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GG_cooy + GeneralDef.EjecGeoParamIgual + limp.CoordsInstal.Y + " " +//coordenadas
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GG_ais + GeneralDef.EjecGeoParamIgual + (limp.IgnoAis ? 1 : 0) + " " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GG_elev + GeneralDef.EjecGeoParamIgual + (ComunDef.CamposNW.config.comprueba_elevacion ? 1 : 0) + " " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GG_topo + GeneralDef.EjecGeoParamIgual + (ComunDef.CamposNW.config.revisa_topologia ? 1 : 0) + " " +
|
||||
//campos del dbf de limpieza para leer
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GAA_obser + GeneralDef.EjecGeoParamIgual + LimpiezaDef.Campos.consulta_observ + " " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GAA_anch_tip + GeneralDef.EjecGeoParamIgual + LimpiezaDef.Campos.consulta_anch_tip + " " +
|
||||
|
|
|
|||
|
|
@ -61,6 +61,7 @@ namespace OliviaAddInPro.Services.LanzaSrv
|
|||
{
|
||||
str_cfg = str_cfg +
|
||||
//campos de la red navegable
|
||||
/*
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GTC_onew + GeneralDef.EjecGeoParamIgual + ComunDef.CamposNW.cons_onew + " " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GTC_kph + GeneralDef.EjecGeoParamIgual + ComunDef.CamposNW.cons_kph + " " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GTC_fow + GeneralDef.EjecGeoParamIgual + ComunDef.CamposNW.cons_fow + " " +
|
||||
|
|
@ -69,6 +70,7 @@ namespace OliviaAddInPro.Services.LanzaSrv
|
|||
GeneralDef.EjecGeoParamSep + GeneralDef.GTA_FT + GeneralDef.EjecGeoParamIgual + ComunDef.AtributosNW.atr_FT + " " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GTA_N + GeneralDef.EjecGeoParamIgual + ComunDef.AtributosNW.atr_N + " " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GTA_pedes + GeneralDef.EjecGeoParamIgual + ComunDef.AtributosNW.atr_pedes + " " +
|
||||
*/
|
||||
//nombre del tratamiento
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GG_strtto + GeneralDef.EjecGeoParamIgual + NombreTratamiento + " " +
|
||||
//paths de archivos
|
||||
|
|
|
|||
|
|
@ -91,6 +91,8 @@ namespace OliviaAddInPro.Services.LanzaSrv
|
|||
GeneralDef.EjecGeoParamSep + GeneralDef.GR_sens_fechaf + GeneralDef.EjecGeoParamIgual + "0 " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GR_sens_modo + GeneralDef.EjecGeoParamIgual + "0 " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GG_ais + GeneralDef.EjecGeoParamIgual + (reco.IgnoAis?1:0) + " " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GG_elev + GeneralDef.EjecGeoParamIgual + (ComunDef.CamposNW.config.comprueba_elevacion ? 1 : 0) + " " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GG_topo + GeneralDef.EjecGeoParamIgual + (ComunDef.CamposNW.config.revisa_topologia ? 1 : 0) + " " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GR_lateral + GeneralDef.EjecGeoParamIgual + reco.TipoLate + " " +
|
||||
//mima de la nw
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GTO_mima_xmin + GeneralDef.EjecGeoParamIgual + reco.MimaNw.XMin + " " +
|
||||
|
|
|
|||
Loading…
Reference in New Issue