Compare commits
No commits in common. "f1444fd25a9b347723fc6c91048b5341f77351df" and "e9faefdafdd7b2ceb13f21c1925b3b5f9af1bdb0" have entirely different histories.
f1444fd25a
...
e9faefdafd
|
|
@ -1,12 +1,12 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?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">
|
<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.4" desktopVersion="3.0.3.36057">
|
<AddInInfo id="{10742570-cf59-42f2-bea2-2a38002a06ee}" version="3.3" desktopVersion="3.0.3.36057">
|
||||||
<Name>OliviaAddInPro</Name>
|
<Name>OliviaAddInPro</Name>
|
||||||
<Description>AddIn de Optimización de la Limpieza Viaria para ArcGIs Pro</Description>
|
<Description>AddIn de Optimización de la Limpieza Viaria para ArcGIs Pro</Description>
|
||||||
<Image>Images\AddinDesktop32.png</Image>
|
<Image>Images\AddinDesktop32.png</Image>
|
||||||
<Author>VSM</Author>
|
<Author>VSM</Author>
|
||||||
<Company>VSM - Narvaling</Company>
|
<Company>VSM - Narvaling</Company>
|
||||||
<Date>27/11/2023 12:00:00, 2023</Date>
|
<Date>09/11/2023 12:00:00, 2023</Date>
|
||||||
<Subject>Framework</Subject>
|
<Subject>Framework</Subject>
|
||||||
<!-- Note subject can be one or more of these topics:
|
<!-- Note subject can be one or more of these topics:
|
||||||
Content, Framework, Editing, Geodatabase, Geometry, Geoprocessing, Layouts, Map Authoring, Map Exploration -->
|
Content, Framework, Editing, Geodatabase, Geometry, Geoprocessing, Layouts, Map Authoring, Map Exploration -->
|
||||||
|
|
|
||||||
|
|
@ -24,8 +24,6 @@ namespace OliviaAddInPro.Model
|
||||||
public static string cons_name="_dir"; //<Campo que indica el nombre de la calle
|
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_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 string cons_evit = "_evita"; //Campo que indica si el vial es evitable
|
||||||
public static string cons_ele_f = "_elev_f"; //altura from
|
|
||||||
public static string cons_ele_t = "_elev_t"; //altura to
|
|
||||||
public static OliviaConfNW config; //configuracion para sacar capmos por defecto
|
public static OliviaConfNW config; //configuracion para sacar capmos por defecto
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -94,13 +94,8 @@ namespace OliviaAddInPro.Model
|
||||||
TiempoOutSocket = 20;
|
TiempoOutSocket = 20;
|
||||||
|
|
||||||
}
|
}
|
||||||
#region PropiedadesOcultas
|
#region PropiedadesOcultas
|
||||||
#region parametrosConexion
|
#region parametrosConexion
|
||||||
/**
|
|
||||||
* Version de las configuraciones
|
|
||||||
*/
|
|
||||||
[Browsable(false)]
|
|
||||||
public string Version { get; set; }
|
|
||||||
/**
|
/**
|
||||||
* IP donde va a realizar la conexión a OliviaTask, se inicializa al arrancar con la local
|
* IP donde va a realizar la conexión a OliviaTask, se inicializa al arrancar con la local
|
||||||
*/
|
*/
|
||||||
|
|
@ -623,25 +618,21 @@ namespace OliviaAddInPro.Model
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 06CambosNW
|
#region 06CambosNW
|
||||||
[Browsable(false)]
|
|
||||||
[Category("Campos Red Navegable")]
|
[Category("Campos Red Navegable")]
|
||||||
[DisplayName("Sentido de la vía")]
|
[DisplayName("Sentido de la vía")]
|
||||||
[Description("Nombre del campo que indica si la vía es de doble sentido o no")]
|
[Description("Nombre del campo que indica si la vía es de doble sentido o no")]
|
||||||
public string cons_onew { get; set; }
|
public string cons_onew { get; set; }
|
||||||
|
|
||||||
[Browsable(false)]
|
|
||||||
[Category("Campos Red Navegable")]
|
[Category("Campos Red Navegable")]
|
||||||
[DisplayName("Velocidad de la vía")]
|
[DisplayName("Velocidad de la vía")]
|
||||||
[Description("Nombre del campo que indica la velociad máxima permitida de la vía")]
|
[Description("Nombre del campo que indica la velociad máxima permitida de la vía")]
|
||||||
public string cons_kph { get; set; }
|
public string cons_kph { get; set; }
|
||||||
|
|
||||||
[Browsable(false)]
|
|
||||||
[Category("Campos Red Navegable")]
|
[Category("Campos Red Navegable")]
|
||||||
[DisplayName("Tipo de vía")]
|
[DisplayName("Tipo de vía")]
|
||||||
[Description("Nombre del campo que indica el tipo de la vía (usado para ver si es vía peatonal).")]
|
[Description("Nombre del campo que indica el tipo de la vía (usado para ver si es vía peatonal).")]
|
||||||
public string cons_fow { get; set; }
|
public string cons_fow { get; set; }
|
||||||
|
|
||||||
[Browsable(false)]
|
|
||||||
[Category("Campos Red Navegable")]
|
[Category("Campos Red Navegable")]
|
||||||
[DisplayName("Nombre de la vía")]
|
[DisplayName("Nombre de la vía")]
|
||||||
[Description("Nombre del campo que indica el nombre de la vía")]
|
[Description("Nombre del campo que indica el nombre de la vía")]
|
||||||
|
|
@ -649,28 +640,24 @@ namespace OliviaAddInPro.Model
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 07AtrNw
|
#region 07AtrNw
|
||||||
[Browsable(false)]
|
|
||||||
[Category("Atributos Red Navegable")]
|
[Category("Atributos Red Navegable")]
|
||||||
[PropertyOrder(1)]
|
[PropertyOrder(1)]
|
||||||
[DisplayName("To-From")]
|
[DisplayName("To-From")]
|
||||||
[Description("Valor del campo 'Sentido de la vía' que indica sentido de la vía To-From")]
|
[Description("Valor del campo 'Sentido de la vía' que indica sentido de la vía To-From")]
|
||||||
public string atr_TF { get; set; }
|
public string atr_TF { get; set; }
|
||||||
|
|
||||||
[Browsable(false)]
|
|
||||||
[Category("Atributos Red Navegable")]
|
[Category("Atributos Red Navegable")]
|
||||||
[PropertyOrder(2)]
|
[PropertyOrder(2)]
|
||||||
[DisplayName("From-To")]
|
[DisplayName("From-To")]
|
||||||
[Description("Valor del campo 'Sentido de la vía' que indica sentido de la vía From-To")]
|
[Description("Valor del campo 'Sentido de la vía' que indica sentido de la vía From-To")]
|
||||||
public string atr_FT { get; set; }
|
public string atr_FT { get; set; }
|
||||||
|
|
||||||
[Browsable(false)]
|
|
||||||
[Category("Atributos Red Navegable")]
|
[Category("Atributos Red Navegable")]
|
||||||
[PropertyOrder(3)]
|
[PropertyOrder(3)]
|
||||||
[DisplayName("Sin circulación")]
|
[DisplayName("Sin circulación")]
|
||||||
[Description("Valor del campo 'Sentido de la vía' que indica no circulación")]
|
[Description("Valor del campo 'Sentido de la vía' que indica no circulación")]
|
||||||
public string atr_N { get; set; }
|
public string atr_N { get; set; }
|
||||||
|
|
||||||
[Browsable(false)]
|
|
||||||
[Category("Atributos Red Navegable")]
|
[Category("Atributos Red Navegable")]
|
||||||
[PropertyOrder(4)]
|
[PropertyOrder(4)]
|
||||||
[DisplayName("Peatonal")]
|
[DisplayName("Peatonal")]
|
||||||
|
|
|
||||||
|
|
@ -20,8 +20,7 @@ namespace OliviaAddInPro.Model
|
||||||
public string campo_sentidoFT { get; set; }
|
public string campo_sentidoFT { get; set; }
|
||||||
public string campo_sentidoTf { get; set; }
|
public string campo_sentidoTf { get; set; }
|
||||||
public string campo_peatonal { get; set; }
|
public string campo_peatonal { get; set; }
|
||||||
public string campo_elevacion_to { get; set; }
|
|
||||||
public string campo_elevacion_from { get; set; }
|
|
||||||
public bool comprueba_elevacion { get; set; }
|
public bool comprueba_elevacion { get; set; }
|
||||||
public bool revisa_topologia { get; set; }
|
public bool revisa_topologia { get; set; }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ namespace OliviaAddInPro.Services
|
||||||
public const string OlvRegKey = "SOFTWARE\\Narvaling\\Olivia_3_1";
|
public const string OlvRegKey = "SOFTWARE\\Narvaling\\Olivia_3_1";
|
||||||
public const string OlvRegName = "workdir";
|
public const string OlvRegName = "workdir";
|
||||||
public const string OlvConfigName = "olv.conf";
|
public const string OlvConfigName = "olv.conf";
|
||||||
public const string VersionConfiguracion = "1.1.0.0";
|
|
||||||
public static ConfigServ Serv
|
public static ConfigServ Serv
|
||||||
{
|
{
|
||||||
get {
|
get {
|
||||||
|
|
@ -42,9 +42,8 @@ namespace OliviaAddInPro.Services
|
||||||
var ee = e;
|
var ee = e;
|
||||||
res = null;
|
res = null;
|
||||||
}
|
}
|
||||||
if(res==null || res.Version==null || res.Version != VersionConfiguracion)
|
if(res==null)
|
||||||
res = Default();
|
res = Default();
|
||||||
|
|
||||||
EnumOpsNWToString.ListaNw = res.ListaNw;
|
EnumOpsNWToString.ListaNw = res.ListaNw;
|
||||||
//pilla la IP
|
//pilla la IP
|
||||||
if (res.Ip.CompareTo("0.0.0.0")==0)
|
if (res.Ip.CompareTo("0.0.0.0")==0)
|
||||||
|
|
@ -170,8 +169,8 @@ namespace OliviaAddInPro.Services
|
||||||
{
|
{
|
||||||
c.path_work = "C:\\Olivia\\";
|
c.path_work = "C:\\Olivia\\";
|
||||||
}
|
}
|
||||||
|
|
||||||
c.Version = VersionConfiguracion;
|
|
||||||
c.PathGdbGen = @"%dir_work%gdb\\BASE DE DATOS.gdb";
|
c.PathGdbGen = @"%dir_work%gdb\\BASE DE DATOS.gdb";
|
||||||
c.PathSimbVSM = @"%dir_work%styles\\Simbologia.style";
|
c.PathSimbVSM = @"%dir_work%styles\\Simbologia.style";
|
||||||
c.PathSimbESRI = @"%dir_work%styles\\ESRI.style";
|
c.PathSimbESRI = @"%dir_work%styles\\ESRI.style";
|
||||||
|
|
@ -408,9 +407,7 @@ namespace OliviaAddInPro.Services
|
||||||
campo_peatonal= "IIf( $feature.FOW == 14 || $feature.ONEWAY == 'N', 1, 0)",
|
campo_peatonal= "IIf( $feature.FOW == 14 || $feature.ONEWAY == 'N', 1, 0)",
|
||||||
campo_sentidoFT= "IIF($feature.ONEWAY== 'FT' || $feature.ONEWAY == '', 1 , 0)",
|
campo_sentidoFT= "IIF($feature.ONEWAY== 'FT' || $feature.ONEWAY == '', 1 , 0)",
|
||||||
campo_sentidoTf= "IIF($feature.ONEWAY == 'TF' || $feature.ONEWAY == '', 1, 0)",
|
campo_sentidoTf= "IIF($feature.ONEWAY == 'TF' || $feature.ONEWAY == '', 1, 0)",
|
||||||
campo_elevacion_from= "$feature.F_ELEV",
|
comprueba_elevacion=true,
|
||||||
campo_elevacion_to= "$feature.T_ELEV",
|
|
||||||
comprueba_elevacion =true,
|
|
||||||
revisa_topologia=false
|
revisa_topologia=false
|
||||||
});
|
});
|
||||||
c.ListaNw.Add(new OliviaConfNW()
|
c.ListaNw.Add(new OliviaConfNW()
|
||||||
|
|
@ -421,8 +418,6 @@ namespace OliviaAddInPro.Services
|
||||||
campo_peatonal = "IIF( $feature.FT_RST_AUT == 'Y' && $feature.TF_RST_AUT == 'Y', 1, 0)",
|
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_sentidoFT = "IIf( $feature.FT_RST_AUT == 'N', 1, 0)",
|
||||||
campo_sentidoTf = "IIf( $feature.TF_RST_AUT == 'N', 1, 0)",
|
campo_sentidoTf = "IIf( $feature.TF_RST_AUT == 'N', 1, 0)",
|
||||||
campo_elevacion_from = "IIf( $feature.F_ZLEV != null, $feature.F_ZLEV, 0)",
|
|
||||||
campo_elevacion_to = "IIf( $feature.T_ZLEV != null, $feature.T_ZLEV, 0)",
|
|
||||||
comprueba_elevacion = false,
|
comprueba_elevacion = false,
|
||||||
revisa_topologia = true
|
revisa_topologia = true
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -383,33 +383,21 @@ namespace OliviaAddInPro.Services
|
||||||
}
|
}
|
||||||
bool EstandarizaCamposNW(string pathNW)
|
bool EstandarizaCamposNW(string pathNW)
|
||||||
{
|
{
|
||||||
HelperGdb.FieldToAdd[] fields = new HelperGdb.FieldToAdd[8];
|
HelperGdb.FieldToAdd[] fields = new HelperGdb.FieldToAdd[6];
|
||||||
//campo SECTOR
|
//campo SECTOR
|
||||||
int i = 0;
|
int i = 0;
|
||||||
fields[i].Name = ComunDef.CamposNW.cons_kph;
|
fields[i].Name = ComunDef.CamposNW.cons_kph;
|
||||||
fields[i].Alias = ComunDef.CamposNW.cons_kph;
|
fields[i].Alias = ComunDef.CamposNW.cons_kph;
|
||||||
fields[i].Tipo = "FLOAT";
|
fields[i].Tipo = "FLOAT";
|
||||||
fields[i].Length = 0;
|
fields[i].Length = 0;
|
||||||
i++;
|
|
||||||
|
|
||||||
fields[i].Name = ComunDef.CamposNW.cons_ele_f;
|
|
||||||
fields[i].Alias = ComunDef.CamposNW.cons_ele_f;
|
|
||||||
fields[i].Tipo = "FLOAT";
|
|
||||||
fields[i].Length = 0;
|
|
||||||
i++;
|
i++;
|
||||||
|
|
||||||
fields[i].Name = ComunDef.CamposNW.cons_ele_t;
|
|
||||||
fields[i].Alias = ComunDef.CamposNW.cons_ele_t;
|
|
||||||
fields[i].Tipo = "FLOAT";
|
|
||||||
fields[i].Length = 0;
|
|
||||||
i++;
|
|
||||||
|
|
||||||
fields[i].Name = ComunDef.CamposNW.cons_fow;
|
fields[i].Name = ComunDef.CamposNW.cons_fow;
|
||||||
fields[i].Alias = ComunDef.CamposNW.cons_fow;
|
fields[i].Alias = ComunDef.CamposNW.cons_fow;
|
||||||
fields[i].Tipo = "LONG";
|
fields[i].Tipo = "LONG";
|
||||||
fields[i].Length = 0;
|
fields[i].Length = 0;
|
||||||
i++;
|
i++;
|
||||||
|
|
||||||
fields[i].Name = ComunDef.CamposNW.cons_onewFT;
|
fields[i].Name = ComunDef.CamposNW.cons_onewFT;
|
||||||
fields[i].Alias = ComunDef.CamposNW.cons_onewFT;
|
fields[i].Alias = ComunDef.CamposNW.cons_onewFT;
|
||||||
fields[i].Tipo = "LONG";
|
fields[i].Tipo = "LONG";
|
||||||
|
|
@ -432,8 +420,8 @@ namespace OliviaAddInPro.Services
|
||||||
fields[i].Alias = ComunDef.CamposNW.cons_name;
|
fields[i].Alias = ComunDef.CamposNW.cons_name;
|
||||||
fields[i].Tipo = "TEXT";
|
fields[i].Tipo = "TEXT";
|
||||||
fields[i].Length = 128;
|
fields[i].Length = 128;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (!HelperGdb.AddFieldsSync(pathNW, fields))
|
if (!HelperGdb.AddFieldsSync(pathNW, fields))
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -448,12 +436,6 @@ namespace OliviaAddInPro.Services
|
||||||
return false;
|
return false;
|
||||||
if (!HelperGdb.CalculateFieldsSync(pathNW, ComunDef.CamposNW.cons_onewFT, ComunDef.CamposNW.config.campo_sentidoFT))
|
if (!HelperGdb.CalculateFieldsSync(pathNW, ComunDef.CamposNW.cons_onewFT, ComunDef.CamposNW.config.campo_sentidoFT))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (!HelperGdb.CalculateFieldsSync(pathNW, ComunDef.CamposNW.cons_ele_t, ComunDef.CamposNW.config.campo_elevacion_to))
|
|
||||||
return false;
|
|
||||||
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, "0"))
|
||||||
return false;
|
return false;
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue