Compare commits
No commits in common. "bf4fffcaffde0f84d2e9b56e0f4bd207547474cb" and "3f57544e9d494eb7ac1e44ff260fc897c8e401cd" have entirely different histories.
bf4fffcaff
...
3f57544e9d
|
|
@ -30,13 +30,13 @@ namespace OliviaAddInPro
|
||||||
if (OliviaGlob.TipoView == TiposEjecucion.Ninguno)
|
if (OliviaGlob.TipoView == TiposEjecucion.Ninguno)
|
||||||
{
|
{
|
||||||
///Comprueba que existe la red navegable configurada
|
///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,
|
HelperGlobal.ponMsg("No se encuentra red navegable, cambie Configuración: " + HelperGdb.OutStr,
|
||||||
System.Windows.MessageBoxImage.Warning);
|
System.Windows.MessageBoxImage.Warning);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{*/
|
||||||
OliviaGlob.SetFlagTipEjec(TiposEjecucion.Limp);
|
OliviaGlob.SetFlagTipEjec(TiposEjecucion.Limp);
|
||||||
OliviaGlob.ViewSetFlagTipEjec(TiposEjecucion.Limp);
|
OliviaGlob.ViewSetFlagTipEjec(TiposEjecucion.Limp);
|
||||||
|
|
||||||
|
|
@ -44,7 +44,7 @@ namespace OliviaAddInPro
|
||||||
OliviaGlob.Limp = new Limpieza();
|
OliviaGlob.Limp = new Limpieza();
|
||||||
DockpaneLimpiezaViewModel.Reset();
|
DockpaneLimpiezaViewModel.Reset();
|
||||||
DockpaneLimpiezaViewModel.Show();
|
DockpaneLimpiezaViewModel.Show();
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
else if(OliviaGlob.ViewIsProps())
|
else if(OliviaGlob.ViewIsProps())
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -28,13 +28,13 @@ namespace OliviaAddInPro
|
||||||
if (OliviaGlob.TipoView == TiposEjecucion.Ninguno)
|
if (OliviaGlob.TipoView == TiposEjecucion.Ninguno)
|
||||||
{
|
{
|
||||||
///Comprueba que existe la red navegable configurada
|
///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,
|
HelperGlobal.ponMsg("No se encuentra red navegable, cambie Configuración: " + HelperGdb.OutStr,
|
||||||
System.Windows.MessageBoxImage.Warning);
|
System.Windows.MessageBoxImage.Warning);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{*/
|
||||||
OliviaGlob.SetFlagTipEjec(TiposEjecucion.Reco);
|
OliviaGlob.SetFlagTipEjec(TiposEjecucion.Reco);
|
||||||
OliviaGlob.ViewSetFlagTipEjec(TiposEjecucion.Reco);
|
OliviaGlob.ViewSetFlagTipEjec(TiposEjecucion.Reco);
|
||||||
|
|
||||||
|
|
@ -42,7 +42,7 @@ namespace OliviaAddInPro
|
||||||
OliviaGlob.Reco = new Recogida();
|
OliviaGlob.Reco = new Recogida();
|
||||||
DockpaneRecogidaViewModel.Reset();
|
DockpaneRecogidaViewModel.Reset();
|
||||||
DockpaneRecogidaViewModel.Show();
|
DockpaneRecogidaViewModel.Show();
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
else if (OliviaGlob.ViewIsProps())
|
else if (OliviaGlob.ViewIsProps())
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -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="4.0" desktopVersion="3.0.3.36057">
|
<AddInInfo id="{10742570-cf59-42f2-bea2-2a38002a06ee}" version="3.4" 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>12/04/2024 12:00:00, 2024</Date>
|
<Date>27/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 -->
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,6 @@ using ArcGIS.Core.Data.Exceptions;
|
||||||
using Microsoft.Win32;
|
using Microsoft.Win32;
|
||||||
using Microsoft.WindowsAPICodePack.Dialogs;
|
using Microsoft.WindowsAPICodePack.Dialogs;
|
||||||
using System.Security.Cryptography;
|
using System.Security.Cryptography;
|
||||||
using ArcGIS.Desktop.Internal.Mapping;
|
|
||||||
|
|
||||||
namespace OliviaAddInPro.Helper
|
namespace OliviaAddInPro.Helper
|
||||||
{
|
{
|
||||||
|
|
@ -707,7 +706,7 @@ namespace OliviaAddInPro.Helper
|
||||||
{
|
{
|
||||||
if (filt == null)
|
if (filt == null)
|
||||||
filt = new ArcGIS.Core.Data.QueryFilter();
|
filt = new ArcGIS.Core.Data.QueryFilter();
|
||||||
sel = fc.Select(filt, ArcGIS.Core.Data.SelectionType.ObjectID, SelectionOption.Normal);
|
sel = fc.Select(filt, SelectionType.ObjectID, SelectionOption.Normal);
|
||||||
long nsel = sel.GetCount();
|
long nsel = sel.GetCount();
|
||||||
IReadOnlyList<long> ids_ = sel.GetObjectIDs();
|
IReadOnlyList<long> ids_ = sel.GetObjectIDs();
|
||||||
ids = ids_.ToList();
|
ids = ids_.ToList();
|
||||||
|
|
@ -738,7 +737,7 @@ namespace OliviaAddInPro.Helper
|
||||||
{
|
{
|
||||||
if (filt == null)
|
if (filt == null)
|
||||||
filt = new ArcGIS.Core.Data.QueryFilter();
|
filt = new ArcGIS.Core.Data.QueryFilter();
|
||||||
sel = fc.Select(filt, ArcGIS.Core.Data.SelectionType.ObjectID, SelectionOption.Normal);
|
sel = fc.Select(filt, SelectionType.ObjectID, SelectionOption.Normal);
|
||||||
var nsel = sel.GetCount();
|
var nsel = sel.GetCount();
|
||||||
IReadOnlyList<long> ids_ = sel.GetObjectIDs();
|
IReadOnlyList<long> ids_ = sel.GetObjectIDs();
|
||||||
ids = ids_.ToList();
|
ids = ids_.ToList();
|
||||||
|
|
@ -1184,16 +1183,6 @@ namespace OliviaAddInPro.Helper
|
||||||
geomIni = GeometryEngine.Instance.ConvexHull(geomIni);
|
geomIni = GeometryEngine.Instance.ConvexHull(geomIni);
|
||||||
return geomIni;
|
return geomIni;
|
||||||
}
|
}
|
||||||
public static ArcGIS.Core.Geometry.Geometry GetGeomUnique(String path, ArcGIS.Core.Data.QueryFilter filtro)
|
|
||||||
{
|
|
||||||
FeatureClass fc = GetFtClassSync(path);
|
|
||||||
if (fc == null)
|
|
||||||
{
|
|
||||||
OutStr = "Error al abrir Feature Class:" + path;
|
|
||||||
return null; ;
|
|
||||||
}
|
|
||||||
return GetGeomUnique(fc, filtro);
|
|
||||||
}
|
|
||||||
/*
|
/*
|
||||||
* A partir de una capa recorre todos los elementos que cumplen el filtro y los une en una única geometría
|
* A partir de una capa recorre todos los elementos que cumplen el filtro y los une en una única geometría
|
||||||
*/
|
*/
|
||||||
|
|
@ -1205,7 +1194,6 @@ namespace OliviaAddInPro.Helper
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var geom = new List<ArcGIS.Core.Geometry.Geometry>();
|
var geom = new List<ArcGIS.Core.Geometry.Geometry>();
|
||||||
|
|
||||||
using (RowCursor rowCursor = fclss.Search(filtro))
|
using (RowCursor rowCursor = fclss.Search(filtro))
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
@ -1214,10 +1202,7 @@ namespace OliviaAddInPro.Helper
|
||||||
using (Row row = rowCursor.Current)
|
using (Row row = rowCursor.Current)
|
||||||
{
|
{
|
||||||
if (row is Feature ft)
|
if (row is Feature ft)
|
||||||
{
|
geom.Add(ft.GetShape());
|
||||||
geom.Add(ft.GetShape());
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
geomsal = GeometryEngine.Instance.Union(geom);
|
geomsal = GeometryEngine.Instance.Union(geom);
|
||||||
|
|
@ -1358,7 +1343,7 @@ namespace OliviaAddInPro.Helper
|
||||||
//realiza consulta
|
//realiza consulta
|
||||||
n = 0;
|
n = 0;
|
||||||
//fc.GetDefinition().GetFields().First().Name kfadpskfpasp
|
//fc.GetDefinition().GetFields().First().Name kfadpskfpasp
|
||||||
using (Selection sel = fc.Select(new ArcGIS.Core.Data.QueryFilter { WhereClause = consulta }, ArcGIS.Core.Data.SelectionType.ObjectID, SelectionOption.Normal))
|
using (Selection sel = fc.Select(new ArcGIS.Core.Data.QueryFilter { WhereClause = consulta }, SelectionType.ObjectID, SelectionOption.Normal))
|
||||||
n = sel.GetCount();
|
n = sel.GetCount();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1389,7 +1374,7 @@ namespace OliviaAddInPro.Helper
|
||||||
{
|
{
|
||||||
//realiza consulta
|
//realiza consulta
|
||||||
n = 0;
|
n = 0;
|
||||||
using (Selection sel = fc.Select(new ArcGIS.Core.Data.QueryFilter { WhereClause = consulta }, ArcGIS.Core.Data.SelectionType.ObjectID, SelectionOption.Normal))
|
using (Selection sel = fc.Select(new ArcGIS.Core.Data.QueryFilter { WhereClause = consulta }, SelectionType.ObjectID, SelectionOption.Normal))
|
||||||
n = sel.GetCount();
|
n = sel.GetCount();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1479,13 +1464,10 @@ namespace OliviaAddInPro.Helper
|
||||||
if (debug)
|
if (debug)
|
||||||
HelperGlobal.ponMsg("fc " + fc.GetName() + " tipo " + fc.GetType().Name);
|
HelperGlobal.ponMsg("fc " + fc.GetName() + " tipo " + fc.GetType().Name);
|
||||||
/////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////
|
||||||
/////TODO comprobar que el object id no está indexado en la capa de nw, cómo hacerlo indexado
|
|
||||||
///https://pro.arcgis.com/en/pro-app/3.0/tool-reference/data-management/add-attribute-index.htm
|
|
||||||
///
|
|
||||||
//Añade a la lista los ids que cumplen el filtro espacial
|
//Añade a la lista los ids que cumplen el filtro espacial
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var aux = fc.Select(filter, ArcGIS.Core.Data.SelectionType.ObjectID, SelectionOption.Normal);
|
var aux = fc.Select(filter, SelectionType.ObjectID, SelectionOption.Normal);
|
||||||
var aux2 = aux.GetObjectIDs();
|
var aux2 = aux.GetObjectIDs();
|
||||||
//ids = fc.Select(filter, SelectionType.ObjectID, SelectionOption.Normal).GetObjectIDs().ToList();
|
//ids = fc.Select(filter, SelectionType.ObjectID, SelectionOption.Normal).GetObjectIDs().ToList();
|
||||||
ids = aux2.ToList();
|
ids = aux2.ToList();
|
||||||
|
|
@ -1768,49 +1750,11 @@ namespace OliviaAddInPro.Helper
|
||||||
ArcGIS.Core.Geometry.Geometry geomBuff = null;
|
ArcGIS.Core.Geometry.Geometry geomBuff = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
//GeometryEngine.Instance.Buffer(geom.)
|
geomBuff = GeometryEngine.Instance.Buffer(geom, buffer);
|
||||||
//geomBuff= GeometryEngine.Instance.ConvexHull(geom);
|
|
||||||
//convierte las unidades del buffer a las unidades de la geometría
|
|
||||||
double buff_aux = buffer;
|
|
||||||
//comprueba que la geometría tenga unidades de metros para aplicar el buffer
|
|
||||||
if (geom.SpatialReference.Unit.FactoryCode != (int)ArcGIS.Core.Geometry.UnitTypeCode.Meters)
|
|
||||||
{
|
|
||||||
switch (geom.SpatialReference.Unit.FactoryCode)
|
|
||||||
{
|
|
||||||
case (int)ArcGIS.Core.Geometry.UnitTypeCode.Degrees://9102
|
|
||||||
//360º = 40.075 km
|
|
||||||
buff_aux = 360 * buffer / 40075000;
|
|
||||||
break;
|
|
||||||
case (int)ArcGIS.Core.Geometry.UnitTypeCode.Radians:
|
|
||||||
//2pi
|
|
||||||
buff_aux = 2 * Math.PI * buffer / 40075000;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
if (geom.SpatialReference.Unit.UnitType == ArcGIS.Core.Geometry.UnitType.Linear)
|
|
||||||
{
|
|
||||||
//es de tipo lineal pero otras unidades que no son metros
|
|
||||||
buff_aux = ArcGIS.Core.Geometry.LinearUnit.Meters.ConvertTo(buffer, (ArcGIS.Core.Geometry.LinearUnit)geom.SpatialReference.Unit);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
resp.Error = new List<string>();
|
|
||||||
resp.Error.Add("Error al aplicar buffer, la geometría del polígono de entrada es de tipo " + geom.SpatialReference.Unit.Name);
|
|
||||||
geomBuff = null;
|
|
||||||
buff_aux = 0;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(resp.Error.IsNullOrEmpty())
|
|
||||||
geomBuff = GeometryEngine.Instance.Buffer(geom, buff_aux);
|
|
||||||
}
|
}
|
||||||
catch( Exception e)
|
catch
|
||||||
{
|
{
|
||||||
//resp.HasError = true;
|
|
||||||
if (resp.Error.IsNullOrEmpty())
|
|
||||||
resp.Error = new List<string>();
|
|
||||||
resp.Error.Add(e.Message);
|
|
||||||
return resp;
|
|
||||||
}
|
}
|
||||||
resp.Value = geomBuff;
|
resp.Value = geomBuff;
|
||||||
return resp;
|
return resp;
|
||||||
|
|
@ -1855,7 +1799,7 @@ namespace OliviaAddInPro.Helper
|
||||||
}
|
}
|
||||||
while (repite);*/
|
while (repite);*/
|
||||||
buffer = buff;
|
buffer = buff;
|
||||||
geom_pto = HelperGdb.BufferGeom((ArcGIS.Core.Geometry.Geometry)pto.ToMapPoint(geom.SpatialReference),buffer).Value; //GeometryEngine.Instance.Buffer(pto.ToMapPoint(), buffer);
|
geom_pto = GeometryEngine.Instance.Buffer(pto.ToMapPoint(), buffer);
|
||||||
if (geom_pto == null || geom_pto.IsEmpty)
|
if (geom_pto == null || geom_pto.IsEmpty)
|
||||||
{
|
{
|
||||||
resp.Value = null;
|
resp.Value = null;
|
||||||
|
|
@ -2412,7 +2356,7 @@ namespace OliviaAddInPro.Helper
|
||||||
/**
|
/**
|
||||||
* Importa el shp en la gdb y el dataset, como una featureclass
|
* Importa el shp en la gdb y el dataset, como una featureclass
|
||||||
*/
|
*/
|
||||||
public static Respuesta<bool> ImportShp(string nom_shp, string Gdb_dataset, string namefc, ArcGIS.Core.Geometry.SpatialReference spatref=null)
|
public static Respuesta<bool> ImportShp(string nom_shp, string Gdb_dataset, string namefc)
|
||||||
{
|
{
|
||||||
var res = new Respuesta<bool> { Value = false };
|
var res = new Respuesta<bool> { Value = false };
|
||||||
string[] args = { nom_shp, Gdb_dataset, namefc };
|
string[] args = { nom_shp, Gdb_dataset, namefc };
|
||||||
|
|
@ -2420,8 +2364,7 @@ namespace OliviaAddInPro.Helper
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if(spatref==null)
|
ArcGIS.Core.Geometry.SpatialReference spatref = GetSpatRef(nom_shp);
|
||||||
spatref = GetSpatRef(nom_shp);
|
|
||||||
var environments = Geoprocessing.MakeEnvironmentArray(outputCoordinateSystem: spatref);
|
var environments = Geoprocessing.MakeEnvironmentArray(outputCoordinateSystem: spatref);
|
||||||
//CancelableProgressorSource cps = new CancelableProgressorSource();
|
//CancelableProgressorSource cps = new CancelableProgressorSource();
|
||||||
var _cts = new System.Threading.CancellationTokenSource();
|
var _cts = new System.Threading.CancellationTokenSource();
|
||||||
|
|
|
||||||
|
|
@ -51,9 +51,9 @@ namespace OliviaAddInPro.Model
|
||||||
public enum OpsNW
|
public enum OpsNW
|
||||||
{
|
{
|
||||||
|
|
||||||
nw_0, //TomTom
|
nw_0,
|
||||||
nw_1, //Streetmap
|
nw_1,
|
||||||
nw_2, //
|
nw_2,
|
||||||
nw_3,
|
nw_3,
|
||||||
nw_4,
|
nw_4,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -275,7 +275,7 @@ namespace OliviaAddInPro.Model
|
||||||
if (ft == null)
|
if (ft == null)
|
||||||
return false;
|
return false;
|
||||||
HelperGdb.Free(ft);
|
HelperGdb.Free(ft);
|
||||||
/*int NCAMPS = 5;
|
int NCAMPS = 5;
|
||||||
string[] camps;
|
string[] camps;
|
||||||
camps = new string[NCAMPS];
|
camps = new string[NCAMPS];
|
||||||
camps[0] = ComunDef.CamposNW.cons_onewFT;
|
camps[0] = ComunDef.CamposNW.cons_onewFT;
|
||||||
|
|
@ -283,8 +283,7 @@ namespace OliviaAddInPro.Model
|
||||||
camps[2] = ComunDef.CamposNW.cons_kph;
|
camps[2] = ComunDef.CamposNW.cons_kph;
|
||||||
camps[3] = ComunDef.CamposNW.cons_name;
|
camps[3] = ComunDef.CamposNW.cons_name;
|
||||||
camps[4] = ComunDef.CamposNW.cons_fow;
|
camps[4] = ComunDef.CamposNW.cons_fow;
|
||||||
return HelperGdb.CheckFileds(OliviaGlob.Paths.PathGdbNw, camps) == 0;*/
|
return HelperGdb.CheckFileds(OliviaGlob.Paths.PathGdbNw, camps) == 0;
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -405,13 +405,9 @@ namespace OliviaAddInPro.Model
|
||||||
int n, i_def, icar, iveh;
|
int n, i_def, icar, iveh;
|
||||||
|
|
||||||
//Rellena las opciones de carga máxima por vehículo
|
//Rellena las opciones de carga máxima por vehículo
|
||||||
//////////////////////////////////////////////////
|
|
||||||
//Carga Trasera
|
|
||||||
////////////////////////////////////////////////
|
|
||||||
//Trasera-satelite
|
//Trasera-satelite
|
||||||
n = 4;
|
n = 4;
|
||||||
i_def = 2;
|
i_def = 2;
|
||||||
//Rellena volumenes
|
|
||||||
info[0] = 2;
|
info[0] = 2;
|
||||||
info[1] = 3;
|
info[1] = 3;
|
||||||
info[2] = 5;
|
info[2] = 5;
|
||||||
|
|
@ -429,7 +425,6 @@ namespace OliviaAddInPro.Model
|
||||||
//Trasera-2 ejes
|
//Trasera-2 ejes
|
||||||
n = 6;
|
n = 6;
|
||||||
i_def = 2;
|
i_def = 2;
|
||||||
//Rellena volumenes
|
|
||||||
info[0] = 8;
|
info[0] = 8;
|
||||||
info[1] = 10;
|
info[1] = 10;
|
||||||
info[2] = 12;
|
info[2] = 12;
|
||||||
|
|
@ -452,7 +447,6 @@ namespace OliviaAddInPro.Model
|
||||||
//Trasera-3ejes
|
//Trasera-3ejes
|
||||||
n = 4;
|
n = 4;
|
||||||
i_def = 3;
|
i_def = 3;
|
||||||
//Rellena volumenes
|
|
||||||
info[0] = 18;
|
info[0] = 18;
|
||||||
info[1] = 20;
|
info[1] = 20;
|
||||||
info[2] = 22;
|
info[2] = 22;
|
||||||
|
|
@ -460,9 +454,6 @@ namespace OliviaAddInPro.Model
|
||||||
rellena_carg((int)RecogidaDef.TiposCarga.Trasera,
|
rellena_carg((int)RecogidaDef.TiposCarga.Trasera,
|
||||||
(int)RecogidaDef.TiposVehic.Ejes3, n, i_def, info);
|
(int)RecogidaDef.TiposVehic.Ejes3, n, i_def, info);
|
||||||
|
|
||||||
//////////////////////////////////////////////////
|
|
||||||
//Carga Lateral
|
|
||||||
////////////////////////////////////////////////
|
|
||||||
//Lateral-satelite, no hay
|
//Lateral-satelite, no hay
|
||||||
rellena_carg((int)RecogidaDef.TiposCarga.Lateral,
|
rellena_carg((int)RecogidaDef.TiposCarga.Lateral,
|
||||||
(int)RecogidaDef.TiposVehic.Satelite, 0, 0, null);
|
(int)RecogidaDef.TiposVehic.Satelite, 0, 0, null);
|
||||||
|
|
@ -470,7 +461,6 @@ namespace OliviaAddInPro.Model
|
||||||
//Lateral - 2 ejes
|
//Lateral - 2 ejes
|
||||||
n = 2;
|
n = 2;
|
||||||
i_def = 1;
|
i_def = 1;
|
||||||
//Rellena volumenes
|
|
||||||
info[0] = 15;
|
info[0] = 15;
|
||||||
info[1] = 17;
|
info[1] = 17;
|
||||||
rellena_carg((int)RecogidaDef.TiposCarga.Lateral,
|
rellena_carg((int)RecogidaDef.TiposCarga.Lateral,
|
||||||
|
|
@ -486,7 +476,6 @@ namespace OliviaAddInPro.Model
|
||||||
//Lateral - 3 ejes
|
//Lateral - 3 ejes
|
||||||
n = 3;
|
n = 3;
|
||||||
i_def = 2;
|
i_def = 2;
|
||||||
//Rellena volumenes
|
|
||||||
info[0] = 21;
|
info[0] = 21;
|
||||||
info[1] = 23;
|
info[1] = 23;
|
||||||
info[2] = 26;
|
info[2] = 26;
|
||||||
|
|
@ -497,13 +486,9 @@ namespace OliviaAddInPro.Model
|
||||||
rellena_carg((int)RecogidaDef.TiposCarga.Superior,
|
rellena_carg((int)RecogidaDef.TiposCarga.Superior,
|
||||||
(int)RecogidaDef.TiposVehic.Satelite, 0, 0, null);
|
(int)RecogidaDef.TiposVehic.Satelite, 0, 0, null);
|
||||||
|
|
||||||
//////////////////////////////////////////////////
|
|
||||||
//Carga Superior
|
|
||||||
////////////////////////////////////////////////
|
|
||||||
//Superior - 2 ejes
|
//Superior - 2 ejes
|
||||||
n = 2;
|
n = 2;
|
||||||
i_def = 0;
|
i_def = 0;
|
||||||
//Rellena volumenes
|
|
||||||
info[0] = 16;
|
info[0] = 16;
|
||||||
info[1] = 17;
|
info[1] = 17;
|
||||||
rellena_carg((int)RecogidaDef.TiposCarga.Superior,
|
rellena_carg((int)RecogidaDef.TiposCarga.Superior,
|
||||||
|
|
@ -512,7 +497,6 @@ namespace OliviaAddInPro.Model
|
||||||
//Superior - 3 ejes
|
//Superior - 3 ejes
|
||||||
n = 3;
|
n = 3;
|
||||||
i_def = 2;
|
i_def = 2;
|
||||||
//Rellena volumenes
|
|
||||||
info[0] = 20;
|
info[0] = 20;
|
||||||
info[1] = 23;
|
info[1] = 23;
|
||||||
info[2] = 25;
|
info[2] = 25;
|
||||||
|
|
@ -523,9 +507,47 @@ namespace OliviaAddInPro.Model
|
||||||
rellena_carg((int)RecogidaDef.TiposCarga.Bilateral,
|
rellena_carg((int)RecogidaDef.TiposCarga.Bilateral,
|
||||||
(int)RecogidaDef.TiposVehic.Satelite, 0, 0, null);
|
(int)RecogidaDef.TiposVehic.Satelite, 0, 0, null);
|
||||||
|
|
||||||
//////////////////////////////////////////////////
|
//Bilateral - 2 ejes
|
||||||
//Carga Bilateral
|
n = 3;
|
||||||
////////////////////////////////////////////////
|
i_def = 1;
|
||||||
|
info[0] = 14;
|
||||||
|
info[1] = 16;
|
||||||
|
info[2] = 18;
|
||||||
|
rellena_carg((int)RecogidaDef.TiposCarga.Bilateral,
|
||||||
|
(int)RecogidaDef.TiposVehic.Ejes2, n, i_def, info);
|
||||||
|
|
||||||
|
//Bilateral - 3 ejes
|
||||||
|
n = 3;
|
||||||
|
i_def = 1;
|
||||||
|
info[0] = 20;
|
||||||
|
info[1] = 23;
|
||||||
|
info[2] = 26;
|
||||||
|
rellena_carg((int)RecogidaDef.TiposCarga.Bilateral,
|
||||||
|
(int)RecogidaDef.TiposVehic.Ejes3, n, i_def, info);
|
||||||
|
|
||||||
|
//Bolseo - todas, no hay
|
||||||
|
//Lavado - todas, no hay
|
||||||
|
//Otra - todas, no hay
|
||||||
|
for (icar = (int)RecogidaDef.TiposCarga.BolseoPtaPta; icar < (int)RecogidaDef.TiposCarga.N; icar++)
|
||||||
|
{
|
||||||
|
for (iveh = (int)RecogidaDef.TiposVehic.Ejes3; iveh < (int)RecogidaDef.TiposVehic.N; iveh++)
|
||||||
|
{
|
||||||
|
rellena_carg(icar, iveh, 0, 0, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////
|
||||||
|
//Barcelona new
|
||||||
|
rellena_offsets_bcn();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void rellena_offsets_bcn()
|
||||||
|
{
|
||||||
|
int[] info = new int[10];
|
||||||
|
int n, i_def;
|
||||||
|
////////////////////////////////////////////////////////
|
||||||
|
//Barcelona new
|
||||||
|
|
||||||
//Bilateral - satelite
|
//Bilateral - satelite
|
||||||
n = 1;
|
n = 1;
|
||||||
i_def = 0;
|
i_def = 0;
|
||||||
|
|
@ -555,50 +577,6 @@ namespace OliviaAddInPro.Model
|
||||||
info[0] = -2050;
|
info[0] = -2050;
|
||||||
rellena_carg_offset((int)RecogidaDef.TiposCarga.Bilateral,
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Bilateral,
|
||||||
(int)RecogidaDef.TiposVehic.Satelite, (int)RecogidaDef.TiposFracción.Vidrio, n, info);
|
(int)RecogidaDef.TiposVehic.Satelite, (int)RecogidaDef.TiposFracción.Vidrio, n, info);
|
||||||
//Bilateral - 2 ejes
|
|
||||||
n = 3;
|
|
||||||
i_def = 1;
|
|
||||||
//Rellena volumenes
|
|
||||||
info[0] = 14;
|
|
||||||
info[1] = 16;
|
|
||||||
info[2] = 18;
|
|
||||||
rellena_carg((int)RecogidaDef.TiposCarga.Bilateral,
|
|
||||||
(int)RecogidaDef.TiposVehic.Ejes2, n, i_def, info);
|
|
||||||
|
|
||||||
//Bilateral - 3 ejes
|
|
||||||
n = 3;
|
|
||||||
i_def = 1;
|
|
||||||
//Rellena volumenes
|
|
||||||
info[0] = 20;
|
|
||||||
info[1] = 23;
|
|
||||||
info[2] = 26;
|
|
||||||
rellena_carg((int)RecogidaDef.TiposCarga.Bilateral,
|
|
||||||
(int)RecogidaDef.TiposVehic.Ejes3, n, i_def, info);
|
|
||||||
|
|
||||||
//Bolseo - todas, no hay
|
|
||||||
//Lavado - todas, no hay
|
|
||||||
//Otra - todas, no hay
|
|
||||||
for (icar = (int)RecogidaDef.TiposCarga.BolseoPtaPta; icar < (int)RecogidaDef.TiposCarga.N; icar++)
|
|
||||||
{
|
|
||||||
for (iveh = (int)RecogidaDef.TiposVehic.Ejes3; iveh < (int)RecogidaDef.TiposVehic.N; iveh++)
|
|
||||||
{
|
|
||||||
rellena_carg(icar, iveh, 0, 0, null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////
|
|
||||||
//Rellena offsets
|
|
||||||
rellena_offsets_bcn();
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void rellena_offsets_bcn()
|
|
||||||
{
|
|
||||||
int[] info = new int[10];
|
|
||||||
int n, i_def;
|
|
||||||
////////////////////////////////////////////////////////
|
|
||||||
//Barcelona revisado abril 24
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
//Trasera - satélite - organico, resto
|
//Trasera - satélite - organico, resto
|
||||||
|
|
@ -839,12 +817,19 @@ namespace OliviaAddInPro.Model
|
||||||
(int)RecogidaDef.TiposVehic.Ejes3, (int)RecogidaDef.TiposFracción.Vidrio, n, info);
|
(int)RecogidaDef.TiposVehic.Ejes3, (int)RecogidaDef.TiposFracción.Vidrio, n, info);
|
||||||
|
|
||||||
//Bilateral - 2 ejes - papel
|
//Bilateral - 2 ejes - papel
|
||||||
info[0] = 1540;
|
info[0] = 1820;
|
||||||
info[1] = 1760;
|
info[1] = 2080;
|
||||||
info[2] = 1980;
|
info[2] = 2340;
|
||||||
rellena_carg_offset((int)RecogidaDef.TiposCarga.Bilateral,
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Bilateral,
|
||||||
(int)RecogidaDef.TiposVehic.Ejes2, (int)RecogidaDef.TiposFracción.Papel, n, info);
|
(int)RecogidaDef.TiposVehic.Ejes2, (int)RecogidaDef.TiposFracción.Papel, n, info);
|
||||||
|
|
||||||
|
//Bilateral - 2 ejes - vidrio
|
||||||
|
info[0] = -140;
|
||||||
|
info[1] = -160;
|
||||||
|
info[2] = -180;
|
||||||
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Bilateral,
|
||||||
|
(int)RecogidaDef.TiposVehic.Ejes2, (int)RecogidaDef.TiposFracción.Vidrio, n, info);
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
//Bilateral - 3 ejes - resto, org
|
//Bilateral - 3 ejes - resto, org
|
||||||
n = 3;
|
n = 3;
|
||||||
|
|
|
||||||
|
|
@ -28,16 +28,11 @@ namespace OliviaAddInPro.Model
|
||||||
/**
|
/**
|
||||||
* Tipo modo de viaje
|
* Tipo modo de viaje
|
||||||
*/
|
*/
|
||||||
public int TipoMV { get; set; } = -1;
|
public int TipoMV { get; set; } = 1;
|
||||||
/**
|
/**
|
||||||
* Capa de ámbitos
|
* Capa de ámbitos
|
||||||
*/
|
*/
|
||||||
public string CapaElems { get; set; } = string.Empty;
|
public string CapaElems { get; set; } = string.Empty;
|
||||||
/**
|
|
||||||
* Capa de ámbitos de referencia.
|
|
||||||
* Cuando se hace tratamiento con ejes de calle, se guarda la capa de referencia
|
|
||||||
*/
|
|
||||||
public string CapaElemsRef { get; set; } = string.Empty;
|
|
||||||
/**
|
/**
|
||||||
* Capa de ámbitos después de haber planificado
|
* Capa de ámbitos después de haber planificado
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
|
||||||
[assembly: AssemblyConfiguration("")]
|
[assembly: AssemblyConfiguration("")]
|
||||||
[assembly: AssemblyCompany("VSM - Narvaling")]
|
[assembly: AssemblyCompany("VSM - Narvaling")]
|
||||||
[assembly: AssemblyProduct("OliviaAddInPro")]
|
[assembly: AssemblyProduct("OliviaAddInPro")]
|
||||||
[assembly: AssemblyCopyright("Copyright © VSM 2024")]
|
[assembly: AssemblyCopyright("Copyright © VSM 2023")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
|
@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("4.0.0.0")]
|
[assembly: AssemblyVersion("3.2.0.0")]
|
||||||
[assembly: AssemblyFileVersion("4.0.0.0")]
|
[assembly: AssemblyFileVersion("3.2.0.0")]
|
||||||
|
|
|
||||||
|
|
@ -16,10 +16,10 @@ namespace OliviaAddInPro.Services
|
||||||
private static string pathConfigDef = "C:\\Olivia";
|
private static string pathConfigDef = "C:\\Olivia";
|
||||||
private static ConfigServ configServ=null;
|
private static ConfigServ configServ=null;
|
||||||
private static string nameDirWork = "%dir_work%";
|
private static string nameDirWork = "%dir_work%";
|
||||||
public const string OlvRegKey = "SOFTWARE\\Narvaling\\Olivia_4_0";
|
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.2.0.0";
|
public const string VersionConfiguracion = "1.1.0.2";
|
||||||
public static ConfigServ Serv
|
public static ConfigServ Serv
|
||||||
{
|
{
|
||||||
get {
|
get {
|
||||||
|
|
@ -309,7 +309,7 @@ namespace OliviaAddInPro.Services
|
||||||
c.v_desp_LS=0;
|
c.v_desp_LS=0;
|
||||||
|
|
||||||
//Reco
|
//Reco
|
||||||
c.id= "_ID";
|
c.id= "ID";
|
||||||
c.nomrec= "NOMB_TIP_REC";
|
c.nomrec= "NOMB_TIP_REC";
|
||||||
c.lateralidad= "LATERALIDAD";
|
c.lateralidad= "LATERALIDAD";
|
||||||
c.frac= "FRACCION";
|
c.frac= "FRACCION";
|
||||||
|
|
@ -354,13 +354,13 @@ namespace OliviaAddInPro.Services
|
||||||
c.dens_vehi_org=500;
|
c.dens_vehi_org=500;
|
||||||
c.dens_vehi_res=500;
|
c.dens_vehi_res=500;
|
||||||
c.dens_vehi_env=120;
|
c.dens_vehi_env=120;
|
||||||
c.dens_vehi_pap=360;
|
c.dens_vehi_pap=250;
|
||||||
c.dens_vehi_vid=350;
|
c.dens_vehi_vid=350;
|
||||||
c.dens_vehi_otr=100;
|
c.dens_vehi_otr=100;
|
||||||
c.dens_cont_org=200;
|
c.dens_cont_org=150;
|
||||||
c.dens_cont_res=100;
|
c.dens_cont_res=100;
|
||||||
c.dens_cont_env=28;
|
c.dens_cont_env=28;
|
||||||
c.dens_cont_pap=75;
|
c.dens_cont_pap=90;
|
||||||
c.dens_cont_vid=250;
|
c.dens_cont_vid=250;
|
||||||
c.dens_cont_otr=100;
|
c.dens_cont_otr=100;
|
||||||
c.anch_vehi_3=2.4000000;
|
c.anch_vehi_3=2.4000000;
|
||||||
|
|
@ -398,16 +398,16 @@ namespace OliviaAddInPro.Services
|
||||||
c.Giro_max_vehiculo = 175.0000000;
|
c.Giro_max_vehiculo = 175.0000000;
|
||||||
c.Desv_max = 0.1500000;
|
c.Desv_max = 0.1500000;
|
||||||
c.Desv_max_abs = 1800.0000000;
|
c.Desv_max_abs = 1800.0000000;
|
||||||
c.Tipo_eje_via = OpsNW.nw_0;
|
c.Tipo_eje_via = OpsNW.nw_1;
|
||||||
c.ListaNw = new List<OliviaConfNW>();
|
c.ListaNw = new List<OliviaConfNW>();
|
||||||
c.ListaNw.Add(new OliviaConfNW()
|
c.ListaNw.Add(new OliviaConfNW()
|
||||||
{
|
{
|
||||||
nombre = "TomTom",
|
nombre = "TomTom",
|
||||||
campo_velocidad = "$feature.KPH",
|
campo_velocidad = "$feature.KPH",
|
||||||
campo_nombre = "$feature.NAME",
|
campo_nombre = "$feature.NAME",
|
||||||
campo_peatonal = "IIf( $feature.FOW == 14 || $feature.FOW == 15 || $feature.FOW == 19 || $feature.ONEWAY == 'N', 1, 0)",
|
campo_peatonal = "IIf( $feature.FOW == 14 || $feature.ONEWAY == 'N', 1, 0)",
|
||||||
campo_sentidoFT = "IIF($feature.ONEWAY== 'TF' || $feature.ONEWAY == 'N', 0 , 1)",
|
campo_sentidoFT = "IIF($feature.ONEWAY== 'FT' || $feature.ONEWAY == '', 1 , 0)",
|
||||||
campo_sentidoTf = "IIF($feature.ONEWAY == 'FT' || $feature.ONEWAY == 'N', 0, 1)",
|
campo_sentidoTf = "IIF($feature.ONEWAY == 'TF' || $feature.ONEWAY == '', 1, 0)",
|
||||||
campo_elevacion_from = "$feature.F_ELEV",
|
campo_elevacion_from = "$feature.F_ELEV",
|
||||||
campo_elevacion_to = "$feature.T_ELEV",
|
campo_elevacion_to = "$feature.T_ELEV",
|
||||||
comprueba_elevacion = true,
|
comprueba_elevacion = true,
|
||||||
|
|
@ -416,7 +416,6 @@ namespace OliviaAddInPro.Services
|
||||||
revisa_angulos = false,
|
revisa_angulos = false,
|
||||||
campo_angulos = "0"
|
campo_angulos = "0"
|
||||||
}); ;
|
}); ;
|
||||||
/*
|
|
||||||
c.ListaNw.Add(new OliviaConfNW()
|
c.ListaNw.Add(new OliviaConfNW()
|
||||||
{
|
{
|
||||||
nombre = "StreetMapPremiun",
|
nombre = "StreetMapPremiun",
|
||||||
|
|
@ -433,50 +432,40 @@ namespace OliviaAddInPro.Services
|
||||||
revisa_angulos = true,
|
revisa_angulos = true,
|
||||||
campo_angulos = "IIF($feature.ROAD_CLASS== '3 - Highway Ramp' || $feature.ROAD_CLASS== '6 - Major Road' || $feature.ROAD_CLASS == '1 - Surface Street', 90 , 0)"
|
campo_angulos = "IIF($feature.ROAD_CLASS== '3 - Highway Ramp' || $feature.ROAD_CLASS== '6 - Major Road' || $feature.ROAD_CLASS == '1 - Surface Street', 90 , 0)"
|
||||||
});
|
});
|
||||||
*/
|
|
||||||
c.ListaMV = new List<OliviaConfMV>();
|
c.ListaMV = new List<OliviaConfMV>();
|
||||||
c.ListaMV.Add(new OliviaConfMV()
|
c.ListaMV.Add(new OliviaConfMV()
|
||||||
{
|
{
|
||||||
nombre = "Default",
|
nombre = "Default",
|
||||||
filtro_omitir = "",
|
filtro_omitir = "",
|
||||||
campo_prioridad = "0",
|
campo_prioridad = "0"
|
||||||
vehiculo_def_reco = -1,
|
|
||||||
vehiculo_def_lim = -1
|
});
|
||||||
}) ;
|
|
||||||
c.ListaMV.Add(new OliviaConfMV()
|
c.ListaMV.Add(new OliviaConfMV()
|
||||||
{
|
{
|
||||||
nombre = "Peaton",
|
nombre = "Peaton",
|
||||||
filtro_omitir = "(FREEWAY <> 1 AND SLIPRD = 0)",
|
filtro_omitir = "",
|
||||||
campo_prioridad = "0",
|
campo_prioridad = "0"
|
||||||
vehiculo_def_reco = -1,
|
|
||||||
vehiculo_def_lim = 0
|
|
||||||
|
|
||||||
});
|
});
|
||||||
c.ListaMV.Add(new OliviaConfMV()
|
c.ListaMV.Add(new OliviaConfMV()
|
||||||
{
|
{
|
||||||
nombre = "Vehiculo pequeño",
|
nombre = "Vehiculo pequeño",
|
||||||
filtro_omitir = "(FREEWAY <> 1 AND SLIPRD = 0)",
|
filtro_omitir = "",
|
||||||
campo_prioridad = "IIF($feature.PRIVATERD>1 || ($feature.FOW>13 && $feature.FOW<16) , -2 , 0)",
|
campo_prioridad = "0"
|
||||||
vehiculo_def_reco = 2,
|
|
||||||
vehiculo_def_lim = 1
|
|
||||||
|
|
||||||
});
|
});
|
||||||
c.ListaMV.Add(new OliviaConfMV()
|
c.ListaMV.Add(new OliviaConfMV()
|
||||||
{
|
{
|
||||||
nombre = "Vehiculo mediano",
|
nombre = "Vehiculo mediano",
|
||||||
filtro_omitir = "(ONEWAY <> 'N' AND FOW NOT IN (14, 15, 19))",
|
filtro_omitir = "",
|
||||||
campo_prioridad = "IIF($feature.PRIVATERD>1 || $feature.RDCOND>1 , -2 , 0)",
|
campo_prioridad = "0"
|
||||||
vehiculo_def_reco = 1,
|
|
||||||
vehiculo_def_lim = -1
|
|
||||||
|
|
||||||
});
|
});
|
||||||
c.ListaMV.Add(new OliviaConfMV()
|
c.ListaMV.Add(new OliviaConfMV()
|
||||||
{
|
{
|
||||||
nombre = "Vehiculo grande",
|
nombre = "Vehiculo grande",
|
||||||
filtro_omitir = "(ONEWAY <> 'N' AND FOW NOT IN (14, 15, 19))",
|
filtro_omitir = "",
|
||||||
campo_prioridad = "IIF($feature.RDCOND>1,-3, (IIF($feature.PRIVATERD>1 , -2 , 0)))",
|
campo_prioridad = "0"
|
||||||
vehiculo_def_reco =0,
|
|
||||||
vehiculo_def_lim = -1
|
|
||||||
|
|
||||||
});
|
});
|
||||||
return c;
|
return c;
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@ using ArcGIS.Core.Internal.Data;
|
||||||
using ArcGIS.Desktop.Framework.Threading.Tasks;
|
using ArcGIS.Desktop.Framework.Threading.Tasks;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using ArcGIS.Core.Data.UtilityNetwork.Trace;
|
|
||||||
|
|
||||||
namespace OliviaAddInPro.Services
|
namespace OliviaAddInPro.Services
|
||||||
{
|
{
|
||||||
|
|
@ -74,7 +73,7 @@ namespace OliviaAddInPro.Services
|
||||||
//Comprueba que tiene las columnas necesarias para planificar
|
//Comprueba que tiene las columnas necesarias para planificar
|
||||||
if ((modo == ModosEjec.Planifica) && !CompruebaPlanif())
|
if ((modo == ModosEjec.Planifica) && !CompruebaPlanif())
|
||||||
{
|
{
|
||||||
ErrStr = "En la capa de ámbitos seleccionada no se encuentran columnas de SECTOR y/o SECUENCIA, necesarias para planificar, o bien han cambiado los datos configurados";
|
ErrStr = "En la capa de ámbitos seleccionada no se encuentran columnas de SECTOR y/o SECUENCIA, necesarias para planificar";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (com.ProgrSrc._ProgrSrc.Getcancelled())
|
if (com.ProgrSrc._ProgrSrc.Getcancelled())
|
||||||
|
|
@ -146,17 +145,8 @@ namespace OliviaAddInPro.Services
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
//mira spatialreference de los datos de entrada
|
//mira spatialreference de los datos de entrada
|
||||||
spatref = HelperGdb.GetSpatRefSync(com.CapaElemsRef);
|
spatRefData = geom_export.SpatialReference;
|
||||||
spatRefData = spatref;
|
|
||||||
if (spatref != null)
|
|
||||||
{
|
|
||||||
geom_export = HelperGdb.ReproyectaGeom(geom_export, spatref);
|
|
||||||
}
|
|
||||||
if (geom_export == null)
|
|
||||||
{
|
|
||||||
ErrStr = "Error al reproyectar geometría para la exportacion de los ámbitos";
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
//crea el filtro de exportación
|
//crea el filtro de exportación
|
||||||
filtroEspacial = HelperGdb.CreateFiler(com.ConsultaAmbs, geom_export);
|
filtroEspacial = HelperGdb.CreateFiler(com.ConsultaAmbs, geom_export);
|
||||||
if (filtroEspacial == null)
|
if (filtroEspacial == null)
|
||||||
|
|
@ -182,7 +172,7 @@ namespace OliviaAddInPro.Services
|
||||||
//Guarda el nombre
|
//Guarda el nombre
|
||||||
OliviaGlob.Paths.PathData = OliviaGlob.Paths.DirData + com.NombreShpExport;
|
OliviaGlob.Paths.PathData = OliviaGlob.Paths.DirData + com.NombreShpExport;
|
||||||
//exporta los datos de entrada
|
//exporta los datos de entrada
|
||||||
if (!HelperGdb.ExportShp2(com.CapaElems, filtroEspacial, com.NombreShpExport, OliviaGlob.Paths.DirData, com.ProgrSrc._ProgrSrc, spatref, 50))
|
if (!HelperGdb.ExportShp2(com.CapaElems, filtroEspacial, com.NombreShpExport, OliviaGlob.Paths.DirData, com.ProgrSrc._ProgrSrc, null, 50))
|
||||||
{
|
{
|
||||||
ErrStr = "Error al exportar los ámbitos: " + HelperGdb.OutStr;
|
ErrStr = "Error al exportar los ámbitos: " + HelperGdb.OutStr;
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -196,7 +186,7 @@ namespace OliviaAddInPro.Services
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////
|
||||||
///Comprueba si está la columna de ObjectId y si no, la crea
|
///Comprueba si está la columna de ObjectId y si no, la crea
|
||||||
if(!ComprCreaColOid(OliviaGlob.Paths.PathData, com.CapaElems, null))
|
if(!ComprCreaColOid(OliviaGlob.Paths.PathData, com.CapaElems, filtroEspacial))
|
||||||
{
|
{
|
||||||
ErrStr = "Error al exportar columna " + ComunDef.CamposCom.camp_oid;
|
ErrStr = "Error al exportar columna " + ComunDef.CamposCom.camp_oid;
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -348,17 +338,14 @@ namespace OliviaAddInPro.Services
|
||||||
//guarda la mima de la geometría de la red navegable a exportar
|
//guarda la mima de la geometría de la red navegable a exportar
|
||||||
com.MimaNw = geom_export.Extent;
|
com.MimaNw = geom_export.Extent;
|
||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
|
///
|
||||||
|
//Hace el filtro con la geometría final
|
||||||
|
//ComunDef.configMV
|
||||||
var where = String.Empty;
|
var where = String.Empty;
|
||||||
if (!String.IsNullOrEmpty(ComunDef.configMV.filtro_omitir))
|
if (!String.IsNullOrEmpty(ComunDef.configMV.filtro_omitir))
|
||||||
{
|
{
|
||||||
where = ComunDef.configMV.filtro_omitir;
|
where = ComunDef.configMV.filtro_omitir;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (com.ProgrSrc._ProgrSrc.Getcancelled())
|
|
||||||
{
|
|
||||||
ErrStr = Resource1.String_cancel_progreso;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
filtroEspacial = HelperGdb.CreateFiler(where, geom_export);
|
filtroEspacial = HelperGdb.CreateFiler(where, geom_export);
|
||||||
if (filtroEspacial == null)
|
if (filtroEspacial == null)
|
||||||
{
|
{
|
||||||
|
|
@ -366,6 +353,11 @@ namespace OliviaAddInPro.Services
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
if (com.ProgrSrc._ProgrSrc.Getcancelled())
|
||||||
|
{
|
||||||
|
ErrStr = Resource1.String_cancel_progreso;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
com.ProgrSrc.IncMessage(10, "Exportando red navegable");//60%
|
com.ProgrSrc.IncMessage(10, "Exportando red navegable");//60%
|
||||||
|
|
||||||
//Prepara nombre de exportación
|
//Prepara nombre de exportación
|
||||||
|
|
@ -373,12 +365,11 @@ namespace OliviaAddInPro.Services
|
||||||
//guarda los nombres del shape
|
//guarda los nombres del shape
|
||||||
OliviaGlob.Paths.PathNW = OliviaGlob.Paths.DirData + com.NombreShpExportNw;
|
OliviaGlob.Paths.PathNW = OliviaGlob.Paths.DirData + com.NombreShpExportNw;
|
||||||
//exporta los datos de entrada
|
//exporta los datos de entrada
|
||||||
if (!HelperGdb.ExportShp2(OliviaGlob.Paths.PathGdbNw, filtroEspacial, com.NombreShpExportNw, OliviaGlob.Paths.DirData, com.ProgrSrc._ProgrSrc, spatref,100))
|
if (!HelperGdb.ExportShp2(OliviaGlob.Paths.PathGdbNw, filtroEspacial, com.NombreShpExportNw, OliviaGlob.Paths.DirData, com.ProgrSrc._ProgrSrc, spatRefData,100))
|
||||||
{
|
{
|
||||||
ErrStr = "Error al exportar la red navegable: " + HelperGdb.OutStr;
|
ErrStr = "Error al exportar la red navegable: " + HelperGdb.OutStr;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
//OliviaGlob.Paths.PathGdbNw.Replace("1.", ".");
|
|
||||||
if (com.ProgrSrc._ProgrSrc.Getcancelled())
|
if (com.ProgrSrc._ProgrSrc.Getcancelled())
|
||||||
{
|
{
|
||||||
ErrStr = Resource1.String_cancel_progreso;
|
ErrStr = Resource1.String_cancel_progreso;
|
||||||
|
|
@ -404,19 +395,9 @@ namespace OliviaAddInPro.Services
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////
|
|
||||||
///Comprueba si está la columna de ObjectId y si no, la crea
|
|
||||||
/*if (!ComprCreaColOid(OliviaGlob.Paths.PathNW, OliviaGlob.Paths.PathGdbNw, null))
|
|
||||||
{
|
|
||||||
ErrStr = "Error al exportar columna " + ComunDef.CamposCom.camp_oid;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
//lo añade la siguiente función
|
|
||||||
*/
|
|
||||||
|
|
||||||
//prepara campos estandar
|
//prepara campos estandar
|
||||||
com.ProgrSrc.IncMessage(10, "Estandarizando campos de la red");//60%
|
com.ProgrSrc.IncMessage(10, "Estandarizando campos de la red");//60%
|
||||||
if (!EstandarizaCamposNW(OliviaGlob.Paths.PathNW))
|
if (!EstandarizaCamposNW(OliviaGlob.Paths.DirData+com.NombreShpExportNw))
|
||||||
{
|
{
|
||||||
ErrStr = "Error al estandarizar campos red navegable: " + HelperGdb.OutStr;
|
ErrStr = "Error al estandarizar campos red navegable: " + HelperGdb.OutStr;
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -432,7 +413,7 @@ namespace OliviaAddInPro.Services
|
||||||
}
|
}
|
||||||
bool EstandarizaCamposNW(string pathNW)
|
bool EstandarizaCamposNW(string pathNW)
|
||||||
{
|
{
|
||||||
HelperGdb.FieldToAdd[] fields = new HelperGdb.FieldToAdd[10];
|
HelperGdb.FieldToAdd[] fields = new HelperGdb.FieldToAdd[9];
|
||||||
//campo SECTOR
|
//campo SECTOR
|
||||||
int i = 0;
|
int i = 0;
|
||||||
fields[i].Name = ComunDef.CamposNW.cons_kph;
|
fields[i].Name = ComunDef.CamposNW.cons_kph;
|
||||||
|
|
@ -487,12 +468,7 @@ namespace OliviaAddInPro.Services
|
||||||
fields[i].Alias = ComunDef.CamposNW.cons_angulo;
|
fields[i].Alias = ComunDef.CamposNW.cons_angulo;
|
||||||
fields[i].Tipo = "FLOAT";
|
fields[i].Tipo = "FLOAT";
|
||||||
fields[i].Length = 128;
|
fields[i].Length = 128;
|
||||||
i++;
|
|
||||||
|
|
||||||
fields[i].Name = ComunDef.CamposCom.camp_oid;
|
|
||||||
fields[i].Alias = ComunDef.CamposCom.camp_oid;
|
|
||||||
fields[i].Tipo = "LONG";
|
|
||||||
fields[i].Length = 0;
|
|
||||||
|
|
||||||
if (!HelperGdb.AddFieldsSync(pathNW, fields))
|
if (!HelperGdb.AddFieldsSync(pathNW, fields))
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -518,11 +494,6 @@ namespace OliviaAddInPro.Services
|
||||||
|
|
||||||
if (!HelperGdb.CalculateFieldsSync(pathNW, ComunDef.CamposNW.cons_angulo, ComunDef.CamposNW.config.campo_angulos))
|
if (!HelperGdb.CalculateFieldsSync(pathNW, ComunDef.CamposNW.cons_angulo, ComunDef.CamposNW.config.campo_angulos))
|
||||||
return false;
|
return false;
|
||||||
using (FeatureClass fc =HelperGdb.GetFtClassSync(pathNW))
|
|
||||||
{
|
|
||||||
if (!HelperGdb.CalculateFieldsSync(pathNW, ComunDef.CamposCom.camp_oid, "$feature."+fc.GetDefinition().GetObjectIDField()))
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
|
@ -665,7 +636,7 @@ namespace OliviaAddInPro.Services
|
||||||
/**
|
/**
|
||||||
* Comrpueba si existe la columna de oid y si no, la crea y la rellena
|
* Comrpueba si existe la columna de oid y si no, la crea y la rellena
|
||||||
*/
|
*/
|
||||||
public bool ComprCreaColOid(string pathCapa, string pathCapaOrig, SpatialQueryFilter filter=null)
|
public bool ComprCreaColOid(string pathCapa, string pathCapaOrig, SpatialQueryFilter filter)
|
||||||
{
|
{
|
||||||
//comprueba si está el campo
|
//comprueba si está el campo
|
||||||
bool compCamp = HelperGdb.CheckField(pathCapa, ComunDef.CamposCom.camp_oid);
|
bool compCamp = HelperGdb.CheckField(pathCapa, ComunDef.CamposCom.camp_oid);
|
||||||
|
|
@ -684,7 +655,6 @@ namespace OliviaAddInPro.Services
|
||||||
|
|
||||||
if (!HelperGdb.AddFieldsSync(pathCapa, fields))
|
if (!HelperGdb.AddFieldsSync(pathCapa, fields))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
//vuelve a cerrar la capa
|
//vuelve a cerrar la capa
|
||||||
string capa_principal = System.IO.Path.GetFileNameWithoutExtension(pathCapa);
|
string capa_principal = System.IO.Path.GetFileNameWithoutExtension(pathCapa);
|
||||||
HelperGdb.CloseLayer(capa_principal);
|
HelperGdb.CloseLayer(capa_principal);
|
||||||
|
|
@ -693,32 +663,23 @@ namespace OliviaAddInPro.Services
|
||||||
//Coge los ids de la capa de la que ha exportado
|
//Coge los ids de la capa de la que ha exportado
|
||||||
using (FeatureClass fc_orig = HelperGdb.GetFtClassSync(pathCapaOrig))
|
using (FeatureClass fc_orig = HelperGdb.GetFtClassSync(pathCapaOrig))
|
||||||
{
|
{
|
||||||
|
if (fc_orig == null)
|
||||||
|
return false;
|
||||||
|
List<long> ids = new List<long>();
|
||||||
|
//Añade a la lista los ids que cumplen el filtro espacial
|
||||||
|
try
|
||||||
|
{
|
||||||
|
ids = fc_orig.Select(filter, SelectionType.ObjectID, SelectionOption.Normal).GetObjectIDs().ToList();
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
ids = new List<long>();
|
||||||
|
}
|
||||||
|
//Comprueba que hay tantos ids como elementos en el shp
|
||||||
using (FeatureClass fc_shp = HelperGdb.GetFtClassSync(pathCapa))
|
using (FeatureClass fc_shp = HelperGdb.GetFtClassSync(pathCapa))
|
||||||
{
|
{
|
||||||
if (fc_orig == null)
|
|
||||||
return false;
|
|
||||||
if (fc_shp == null)
|
if (fc_shp == null)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (filter == null)
|
|
||||||
{
|
|
||||||
filter = HelperGdb.CreateFiler("", null);
|
|
||||||
//coge la geom de todos los ámbitos del shp
|
|
||||||
var geomExport = HelperGdb.GetGeomUnique(fc_shp, filter);
|
|
||||||
filter = HelperGdb.CreateFiler("", geomExport);
|
|
||||||
}
|
|
||||||
|
|
||||||
List<long> ids = new List<long>();
|
|
||||||
//Añade a la lista los ids que cumplen el filtro espacial
|
|
||||||
try
|
|
||||||
{
|
|
||||||
ids = fc_orig.Select(filter, SelectionType.ObjectID, SelectionOption.Normal).GetObjectIDs().ToList();
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
ids = new List<long>();
|
|
||||||
}
|
|
||||||
//Comprueba que hay tantos ids como elementos en el shp
|
|
||||||
long nelem_shp = HelperGdb.GetNumElemsSync(fc_shp);
|
long nelem_shp = HelperGdb.GetNumElemsSync(fc_shp);
|
||||||
if (nelem_shp != ids.Count)
|
if (nelem_shp != ids.Count)
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -770,48 +731,6 @@ namespace OliviaAddInPro.Services
|
||||||
/**
|
/**
|
||||||
* Prepara la geometría para exportar los ámbitos
|
* Prepara la geometría para exportar los ámbitos
|
||||||
*/
|
*/
|
||||||
public Geometry GetZonasBuffer()
|
|
||||||
{
|
|
||||||
Geometry geomAux = null;
|
|
||||||
|
|
||||||
ErrStr = string.Empty;
|
|
||||||
//Hace la intersección de zonas y niveles
|
|
||||||
geomAux = null;
|
|
||||||
/*
|
|
||||||
if (com.GeomNiv != null || com.GeomZon != null)
|
|
||||||
{
|
|
||||||
geomAux = HelperGdb.IntersectGeom(com.GeomNiv, com.GeomZon);
|
|
||||||
if (geomAux == null)
|
|
||||||
{
|
|
||||||
ErrStr = "Error al intersecar zonas y/o niveles.";
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
if (geomAux.IsEmpty)
|
|
||||||
{
|
|
||||||
ErrStr = "No existen ámbitos en la intersección entre zonas y/o niveles.";
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}*/
|
|
||||||
FeatureClass fc = HelperGdb.GetFtClassSync(OliviaGlob.Paths.PathData);
|
|
||||||
if (fc == null)
|
|
||||||
{
|
|
||||||
ErrStr = "No se ha podido abrir la clase " + OliviaGlob.Paths.PathData;
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
SpatialQueryFilter filtro = HelperGdb.CreateFiler("",null);
|
|
||||||
var geomAmbits = HelperGdb.GetGeomUnique(fc, filtro);
|
|
||||||
if (geomAmbits == null || geomAmbits.IsEmpty)
|
|
||||||
{
|
|
||||||
ErrStr = "No se ha podido generar geometría de los ámbitos" + com.ConsultaAmbs + HelperGdb.OutStr;
|
|
||||||
HelperGdb.Free(fc);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return geomAmbits;
|
|
||||||
}
|
|
||||||
public Geometry GetGeomAmbitsExport()
|
public Geometry GetGeomAmbitsExport()
|
||||||
{
|
{
|
||||||
Geometry geomAux = null;
|
Geometry geomAux = null;
|
||||||
|
|
@ -1205,7 +1124,7 @@ namespace OliviaAddInPro.Services
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
resp2 = HelperGdb.ImportShp(dir_shp + "\\" + noms_shp[i] + HelperGdb.SHP_EXT, GdbFileName + "\\" + dataset, noms_gdb[i], spatRefData);
|
resp2 = HelperGdb.ImportShp(dir_shp + "\\" + noms_shp[i] + HelperGdb.SHP_EXT, GdbFileName + "\\" + dataset, noms_gdb[i]);
|
||||||
if (!resp2.Value)
|
if (!resp2.Value)
|
||||||
{
|
{
|
||||||
err_st = "Error al importar la capa " + noms_gdb[i];
|
err_st = "Error al importar la capa " + noms_gdb[i];
|
||||||
|
|
|
||||||
|
|
@ -216,8 +216,10 @@ namespace OliviaAddInPro.Services
|
||||||
string consulta;
|
string consulta;
|
||||||
long numero_lin;
|
long numero_lin;
|
||||||
bool[] amb_gdb = new bool[(int)LimpiezaDef.AmbitsTra.AmbN];//se inician a false
|
bool[] amb_gdb = new bool[(int)LimpiezaDef.AmbitsTra.AmbN];//se inician a false
|
||||||
|
string ftclass;
|
||||||
|
|
||||||
//mira a ver si hay ejes de calle
|
//mira a ver si hay ejes de calle
|
||||||
|
ftclass = LimpiezaDef.ftclass[(int)LimpiezaDef.AmbitsTra.AmbEjeCalle];
|
||||||
consulta = LimpiezaDef.filtro_str[(int)LimpiezaDef.AmbitsTra.AmbEjeCalle];
|
consulta = LimpiezaDef.filtro_str[(int)LimpiezaDef.AmbitsTra.AmbEjeCalle];
|
||||||
numero_lin = HelperGdb.GetNumElems(OliviaGlob.Paths.PathGdbNw, consulta);
|
numero_lin = HelperGdb.GetNumElems(OliviaGlob.Paths.PathGdbNw, consulta);
|
||||||
if (numero_lin > 0)
|
if (numero_lin > 0)
|
||||||
|
|
|
||||||
|
|
@ -64,20 +64,20 @@
|
||||||
<ContentPresenter Name="PaneEjecutar">
|
<ContentPresenter Name="PaneEjecutar">
|
||||||
<ContentPresenter.Content>
|
<ContentPresenter.Content>
|
||||||
<StackPanel Orientation="Vertical">
|
<StackPanel Orientation="Vertical">
|
||||||
<Grid Margin="0,30,0,0">
|
<Grid Margin="0,10,0,0">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="100"/>
|
<ColumnDefinition Width="100"/>
|
||||||
<ColumnDefinition Width="100"/>
|
<ColumnDefinition Width="100"/>
|
||||||
<ColumnDefinition Width="100"/>
|
<ColumnDefinition Width="100"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Button x:Name="button_secto" Grid.Column="1" Style="{DynamicResource Esri_Button}" Content="Sectorizar" Margin="10,0,10,0" Click="button_secto_Click"/>
|
<Button x:Name="button_secto" Grid.Column="1" Style="{DynamicResource Esri_Button}" Content="Sectorizar" Margin="10,0,10,0" Click="button_secto_Click"/>
|
||||||
<Button x:Name="button_planif" Grid.Column="2" Style="{DynamicResource Esri_Button}" Content="Planificar" Margin="10,0,0,0" Click="button_planif_Click"/>
|
<Button x:Name="button_planif" Grid.Column="2" Style="{DynamicResource Esri_Button}" Content="Planificar" Margin="10,0,10,0" Click="button_planif_Click"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</ContentPresenter.Content>
|
</ContentPresenter.Content>
|
||||||
</ContentPresenter>
|
</ContentPresenter>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel Grid.Row="3" Margin="0,90,10,0">
|
<StackPanel Grid.Row="3" Margin="0,70,10,0">
|
||||||
<Button x:Name="button_help" Content="" Margin="274,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Width="16" Height="16" BorderThickness="0" RenderTransformOrigin="16.875,0.375" Click="button_help_Click">
|
<Button x:Name="button_help" Content="" Margin="274,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Width="16" Height="16" BorderThickness="0" RenderTransformOrigin="16.875,0.375" Click="button_help_Click">
|
||||||
<Button.Background>
|
<Button.Background>
|
||||||
<ImageBrush ImageSource="../../Images/help16Pro.png"/>
|
<ImageBrush ImageSource="../../Images/help16Pro.png"/>
|
||||||
|
|
|
||||||
|
|
@ -135,7 +135,6 @@ namespace OliviaAddInPro
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private int tipoTto = -1;
|
private int tipoTto = -1;
|
||||||
private int tipoTto_old = -2;
|
|
||||||
public int TipoTto
|
public int TipoTto
|
||||||
{
|
{
|
||||||
get { return tipoTto; }
|
get { return tipoTto; }
|
||||||
|
|
@ -270,22 +269,19 @@ namespace OliviaAddInPro
|
||||||
}
|
}
|
||||||
public void ComboMvSel(int tto)
|
public void ComboMvSel(int tto)
|
||||||
{
|
{
|
||||||
if (tto < 0)
|
tipoMv = tto;
|
||||||
return;
|
|
||||||
TipoMv = tto;
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Realiza los cambios en los ámbitos cuando se ha seleccionado un tratamiento
|
* Realiza los cambios en los ámbitos cuando se ha seleccionado un tratamiento
|
||||||
*/
|
*/
|
||||||
public void ComboTtoSel(int tto)
|
public void ComboTtoSel(int tto)
|
||||||
{
|
{
|
||||||
if (tto < 0 || tto== tipoTto_old)
|
if (tto < 0)
|
||||||
return;
|
return;
|
||||||
TipoTto = tto;
|
TipoTto = tto;
|
||||||
cambia_tiempo_tto();
|
cambia_tiempo_tto();
|
||||||
ambitosSel = new bool[(int)LimpiezaDef.AmbitsTra.AmbN]; //reinicia los ambitos seleccionados
|
ambitosSel = new bool[(int)LimpiezaDef.AmbitsTra.AmbN]; //reinicia los ambitos seleccionados
|
||||||
|
|
||||||
tipoTto_old = tto;
|
|
||||||
////////////////////////////////////////
|
////////////////////////////////////////
|
||||||
//Otros cambios que dependen del tratamiento
|
//Otros cambios que dependen del tratamiento
|
||||||
if (TipoTto != (int)LimpiezaDef.TiposTto.TtoNoDef)
|
if (TipoTto != (int)LimpiezaDef.TiposTto.TtoNoDef)
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,6 @@ namespace OliviaAddInPro
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
limp.CapaElems = _subPanel1ViewModel.CapaElems;
|
limp.CapaElems = _subPanel1ViewModel.CapaElems;
|
||||||
limp.CapaElemsRef = limp.CapaElems;
|
|
||||||
//pone que la capa de elementos es la red navegable, que es la que va a exportar
|
//pone que la capa de elementos es la red navegable, que es la que va a exportar
|
||||||
if (_subPanel1ViewModel.SelOpAmb == 1)
|
if (_subPanel1ViewModel.SelOpAmb == 1)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -68,9 +68,7 @@ namespace OliviaAddInPro
|
||||||
}
|
}
|
||||||
public void ComboMvSel(int tto)
|
public void ComboMvSel(int tto)
|
||||||
{
|
{
|
||||||
if (tto < 0)
|
tipoMv = tto;
|
||||||
return;
|
|
||||||
TipoMv = tto;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string DisplayName
|
public override string DisplayName
|
||||||
|
|
@ -123,7 +121,6 @@ namespace OliviaAddInPro
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private int tipoFrac = -1;
|
private int tipoFrac = -1;
|
||||||
private int tipoFrac_old = -2;
|
|
||||||
public int TipoFrac
|
public int TipoFrac
|
||||||
{
|
{
|
||||||
get { return tipoFrac; }
|
get { return tipoFrac; }
|
||||||
|
|
@ -134,7 +131,6 @@ namespace OliviaAddInPro
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private int tipoCarg = -1;
|
private int tipoCarg = -1;
|
||||||
private int tipoCarg_old = -2;
|
|
||||||
public int TipoCarg
|
public int TipoCarg
|
||||||
{
|
{
|
||||||
get { return tipoCarg; }
|
get { return tipoCarg; }
|
||||||
|
|
@ -145,7 +141,6 @@ namespace OliviaAddInPro
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private int tipoVehic = -1;
|
private int tipoVehic = -1;
|
||||||
private int tipoVehic_old = -2;
|
|
||||||
public int TipoVehic
|
public int TipoVehic
|
||||||
{
|
{
|
||||||
get { return tipoVehic; }
|
get { return tipoVehic; }
|
||||||
|
|
@ -156,7 +151,6 @@ namespace OliviaAddInPro
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private int tipoCapac = -1;
|
private int tipoCapac = -1;
|
||||||
private int tipoCapac_old = -2;
|
|
||||||
public int TipoCapac
|
public int TipoCapac
|
||||||
{
|
{
|
||||||
get { return tipoCapac; }
|
get { return tipoCapac; }
|
||||||
|
|
@ -167,7 +161,6 @@ namespace OliviaAddInPro
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private int tipoLate = -1;
|
private int tipoLate = -1;
|
||||||
private int tipoLate_old = -2;
|
|
||||||
public int TipoLate
|
public int TipoLate
|
||||||
{
|
{
|
||||||
get { return tipoLate; }
|
get { return tipoLate; }
|
||||||
|
|
@ -440,7 +433,7 @@ namespace OliviaAddInPro
|
||||||
*/
|
*/
|
||||||
public bool ComboFracSel(int tto)
|
public bool ComboFracSel(int tto)
|
||||||
{
|
{
|
||||||
if (tto < 0 || tto== tipoFrac_old)
|
if (tto < 0)
|
||||||
return false;
|
return false;
|
||||||
if (!tipos_fracc_bool[tto])
|
if (!tipos_fracc_bool[tto])
|
||||||
{
|
{
|
||||||
|
|
@ -451,7 +444,6 @@ namespace OliviaAddInPro
|
||||||
{
|
{
|
||||||
//cuando se selecciona un item pintado en gris (que no existe en la GDB) se actúa como si no se hubiera seleccionado item
|
//cuando se selecciona un item pintado en gris (que no existe en la GDB) se actúa como si no se hubiera seleccionado item
|
||||||
TipoFrac = tto;
|
TipoFrac = tto;
|
||||||
tipoFrac_old = tto;
|
|
||||||
if ((TipoVehic >= 0) && (TipoCarg >= 0))
|
if ((TipoVehic >= 0) && (TipoCarg >= 0))
|
||||||
{
|
{
|
||||||
//si también se ha seleccionado tipo de carga y de vehículo, se rellena la lista de capacidades
|
//si también se ha seleccionado tipo de carga y de vehículo, se rellena la lista de capacidades
|
||||||
|
|
@ -554,7 +546,7 @@ namespace OliviaAddInPro
|
||||||
public bool ComboCargSel(int tto)
|
public bool ComboCargSel(int tto)
|
||||||
{
|
{
|
||||||
VisCombLate = Visibility.Hidden;
|
VisCombLate = Visibility.Hidden;
|
||||||
if (tto < 0 || tto== tipoCarg_old)
|
if (tto < 0)
|
||||||
return false;
|
return false;
|
||||||
if (!tipos_carg_bool[tto])
|
if (!tipos_carg_bool[tto])
|
||||||
{
|
{
|
||||||
|
|
@ -563,8 +555,6 @@ namespace OliviaAddInPro
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
TipoCarg=tto;
|
TipoCarg=tto;
|
||||||
tipoCarg_old = tto;
|
|
||||||
|
|
||||||
|
|
||||||
if (TipoCarg == (int)RecogidaDef.TiposCarga.Lateral)
|
if (TipoCarg == (int)RecogidaDef.TiposCarga.Lateral)
|
||||||
VisCombLate = Visibility.Visible;
|
VisCombLate = Visibility.Visible;
|
||||||
|
|
@ -605,25 +595,21 @@ namespace OliviaAddInPro
|
||||||
*/
|
*/
|
||||||
public void ComboVehicSel(int tto)
|
public void ComboVehicSel(int tto)
|
||||||
{
|
{
|
||||||
if (tto < 0 )
|
if (tto < 0)
|
||||||
return;
|
return;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
TipoVehic = tto;
|
TipoVehic = tto;
|
||||||
if (TipoVehic >= 0)
|
if (TipoVehic >= 0)
|
||||||
{
|
{
|
||||||
if (tipoVehic_old != tto)
|
int tmv =new LimpiezaServ(null).GetModosViajesDefecto(TipoVehic);
|
||||||
|
if(tmv>=0)
|
||||||
{
|
{
|
||||||
int tmv = new LimpiezaServ(null).GetModosViajesDefecto(TipoVehic);
|
TipoMv = tmv;
|
||||||
if (tmv >= 0)
|
|
||||||
{
|
|
||||||
TipoMv = tmv;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
//si también se ha seleccionado tipo de carga, se rellena la lista de capacidades
|
//si también se ha seleccionado tipo de carga, se rellena la lista de capacidades
|
||||||
rellena_capac();
|
rellena_capac();
|
||||||
}
|
}
|
||||||
tipoVehic_old = tto;
|
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
|
|
@ -642,7 +628,6 @@ namespace OliviaAddInPro
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
TipoCapac = tto;
|
TipoCapac = tto;
|
||||||
tipoCapac_old = tto;
|
|
||||||
rellena_kgmax();
|
rellena_kgmax();
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
|
|
@ -656,12 +641,11 @@ namespace OliviaAddInPro
|
||||||
*/
|
*/
|
||||||
public void ComboLatSel(int tto)
|
public void ComboLatSel(int tto)
|
||||||
{
|
{
|
||||||
if (tto < 0 || tto== tipoLate_old)
|
if (tto < 0)
|
||||||
return;
|
return;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
TipoLate = tto;
|
TipoLate = tto;
|
||||||
tipoLate_old = tto;
|
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -105,7 +105,6 @@ namespace OliviaAddInPro
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
reco.CapaElems = _subPanel1ViewModel.CapaElems;
|
reco.CapaElems = _subPanel1ViewModel.CapaElems;
|
||||||
reco.CapaElemsRef = reco.CapaElems;
|
|
||||||
//lee la fracción
|
//lee la fracción
|
||||||
reco.TipoFrac = _subPanel1ViewModel.TipoFrac;
|
reco.TipoFrac = _subPanel1ViewModel.TipoFrac;
|
||||||
if (reco.TipoFrac == -1)
|
if (reco.TipoFrac == -1)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue