Pruebas y arreglos Recogida. Funciona ciclo completo.
parent
3ffe6c3de4
commit
83d5231ab4
|
|
@ -1594,7 +1594,7 @@ namespace OliviaAddInPro.Helper
|
||||||
|
|
||||||
/**Amplía la geometría para que incluya el punto
|
/**Amplía la geometría para que incluya el punto
|
||||||
*/
|
*/
|
||||||
public static Respuesta<ArcGIS.Core.Geometry.Geometry> AddPtoInGeom(Coordinate2D pto, ArcGIS.Core.Geometry.Geometry geom)
|
public static Respuesta<ArcGIS.Core.Geometry.Geometry> AddPtoInGeom(Coordinate2D pto, ArcGIS.Core.Geometry.Geometry geom, int buff=100)
|
||||||
{
|
{
|
||||||
Respuesta<ArcGIS.Core.Geometry.Geometry> resp = new Respuesta<ArcGIS.Core.Geometry.Geometry>();
|
Respuesta<ArcGIS.Core.Geometry.Geometry> resp = new Respuesta<ArcGIS.Core.Geometry.Geometry>();
|
||||||
double buffer = 0;//m de distancia desde la instalación
|
double buffer = 0;//m de distancia desde la instalación
|
||||||
|
|
@ -1602,9 +1602,9 @@ namespace OliviaAddInPro.Helper
|
||||||
ArcGIS.Core.Geometry.Geometry geom_pto, geom_sal;
|
ArcGIS.Core.Geometry.Geometry geom_pto, geom_sal;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
do
|
/*do
|
||||||
{
|
{
|
||||||
buffer += 100;
|
buffer += buff;
|
||||||
geom_pto = 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)
|
||||||
{
|
{
|
||||||
|
|
@ -1627,10 +1627,19 @@ namespace OliviaAddInPro.Helper
|
||||||
resp.Error.Add("Error al hacer envolvente en unir punto al polígono");
|
resp.Error.Add("Error al hacer envolvente en unir punto al polígono");
|
||||||
return resp;
|
return resp;
|
||||||
}
|
}
|
||||||
}*/
|
}
|
||||||
|
}
|
||||||
|
while (repite);*/
|
||||||
|
buffer = buff;
|
||||||
|
geom_pto = GeometryEngine.Instance.Buffer(pto.ToMapPoint(), buffer);
|
||||||
|
if (geom_pto == null || geom_pto.IsEmpty)
|
||||||
|
{
|
||||||
|
resp.Value = null;
|
||||||
|
resp.Error.Add("Error al bufferear punto para incluirlo en polígono");
|
||||||
|
return resp;
|
||||||
}
|
}
|
||||||
while (repite);
|
|
||||||
geom_sal = GeometryEngine.Instance.Union(geom_pto, geom);
|
geom_sal = GeometryEngine.Instance.Union(geom_pto, geom);
|
||||||
|
geom_sal = GeometryEngine.Instance.ConvexHull(geom_sal);
|
||||||
if (geom_sal == null || geom_sal.IsEmpty)
|
if (geom_sal == null || geom_sal.IsEmpty)
|
||||||
{
|
{
|
||||||
resp.Value = null;
|
resp.Value = null;
|
||||||
|
|
|
||||||
|
|
@ -247,7 +247,7 @@ namespace OliviaAddInPro.Services
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//amplía la geom
|
//amplía la geom
|
||||||
Respuesta<ArcGIS.Core.Geometry.Geometry> respGeom = HelperGdb.AddPtoInGeom(coords[i], geom_export);
|
Respuesta<ArcGIS.Core.Geometry.Geometry> respGeom = HelperGdb.AddPtoInGeom(coords[i], geom_export, com.BuffExport);
|
||||||
if (respGeom.Value == null)
|
if (respGeom.Value == null)
|
||||||
{
|
{
|
||||||
//ha ido mal
|
//ha ido mal
|
||||||
|
|
|
||||||
|
|
@ -84,11 +84,9 @@ namespace OliviaAddInPro.Services
|
||||||
}
|
}
|
||||||
if (mal)
|
if (mal)
|
||||||
{
|
{
|
||||||
//reinicia flags
|
//actualiza los flags
|
||||||
if (OliviaGlob.IsLimp())
|
OliviaGlob.RemoveFlagTipEjec(TiposEjecucion.EjecPlanif);
|
||||||
OliviaGlob.SetFlagTipEjec(TiposEjecucion.Limp);
|
OliviaGlob.RemoveFlagTipEjec(TiposEjecucion.EjecSecto);
|
||||||
else if (OliviaGlob.IsReco())
|
|
||||||
OliviaGlob.SetFlagTipEjec(TiposEjecucion.Reco);
|
|
||||||
|
|
||||||
HelperGlobal.ponMsg(msg);
|
HelperGlobal.ponMsg(msg);
|
||||||
OliviaGlob.progrDialog.Hide();
|
OliviaGlob.progrDialog.Hide();
|
||||||
|
|
@ -123,6 +121,8 @@ namespace OliviaAddInPro.Services
|
||||||
{
|
{
|
||||||
//actualiza la capa de la que tiene que leer ahora para planificar
|
//actualiza la capa de la que tiene que leer ahora para planificar
|
||||||
inst.CapaPlanif = resp2.Value;
|
inst.CapaPlanif = resp2.Value;
|
||||||
|
//pone modo config2
|
||||||
|
OliviaGlob.AddFlagTipEjec(TiposEjecucion.Config2);
|
||||||
if (OliviaGlob.HasFlagTipEjec(TiposEjecucion.EjecPlanif)) //Ha terminado bien la planificación
|
if (OliviaGlob.HasFlagTipEjec(TiposEjecucion.EjecPlanif)) //Ha terminado bien la planificación
|
||||||
{
|
{
|
||||||
//guarda csv
|
//guarda csv
|
||||||
|
|
@ -138,20 +138,9 @@ namespace OliviaAddInPro.Services
|
||||||
mal = true;
|
mal = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*if (mal)
|
|
||||||
{
|
|
||||||
//reinicia flags
|
|
||||||
if (OliviaGlob.IsLimp())
|
|
||||||
OliviaGlob.SetFlagTipEjec(TiposEjecucion.Limp);
|
|
||||||
else if (OliviaGlob.IsReco())
|
|
||||||
OliviaGlob.SetFlagTipEjec(TiposEjecucion.Reco);
|
|
||||||
|
|
||||||
}*/
|
|
||||||
//actualiza los flags
|
//actualiza los flags
|
||||||
OliviaGlob.RemoveFlagTipEjec(TiposEjecucion.EjecPlanif);
|
OliviaGlob.RemoveFlagTipEjec(TiposEjecucion.EjecPlanif);
|
||||||
OliviaGlob.RemoveFlagTipEjec(TiposEjecucion.EjecSecto);
|
OliviaGlob.RemoveFlagTipEjec(TiposEjecucion.EjecSecto);
|
||||||
//pone modo config2
|
|
||||||
OliviaGlob.AddFlagTipEjec(TiposEjecucion.Config2);
|
|
||||||
///////////////////////////////////////////////////
|
///////////////////////////////////////////////////
|
||||||
HelperGlobal.ponMsg(msg);
|
HelperGlobal.ponMsg(msg);
|
||||||
OliviaGlob.progrDialog.Hide();
|
OliviaGlob.progrDialog.Hide();
|
||||||
|
|
|
||||||
|
|
@ -85,11 +85,11 @@ namespace OliviaAddInPro.Services.LanzaSrv
|
||||||
GeneralDef.EjecGeoParamSep + GeneralDef.GG_cooy + GeneralDef.EjecGeoParamIgual + reco.CoordsInstal.Y + " " +//coordenadas
|
GeneralDef.EjecGeoParamSep + GeneralDef.GG_cooy + GeneralDef.EjecGeoParamIgual + reco.CoordsInstal.Y + " " +//coordenadas
|
||||||
GeneralDef.EjecGeoParamSep + GeneralDef.GR_descx + GeneralDef.EjecGeoParamIgual + reco.CoordsPlanta.X + " " +//coordenadas
|
GeneralDef.EjecGeoParamSep + GeneralDef.GR_descx + GeneralDef.EjecGeoParamIgual + reco.CoordsPlanta.X + " " +//coordenadas
|
||||||
GeneralDef.EjecGeoParamSep + GeneralDef.GR_descy + GeneralDef.EjecGeoParamIgual + reco.CoordsPlanta.Y + " " +//coordenadas
|
GeneralDef.EjecGeoParamSep + GeneralDef.GR_descy + GeneralDef.EjecGeoParamIgual + reco.CoordsPlanta.Y + " " +//coordenadas
|
||||||
GeneralDef.EjecGeoParamSep + GeneralDef.GR_sens_id + GeneralDef.EjecGeoParamIgual + 0 + " " +
|
GeneralDef.EjecGeoParamSep + GeneralDef.GR_sens_id + GeneralDef.EjecGeoParamIgual + "0 " +
|
||||||
GeneralDef.EjecGeoParamSep + GeneralDef.GR_sens_url + GeneralDef.EjecGeoParamIgual + 0 + " " +
|
GeneralDef.EjecGeoParamSep + GeneralDef.GR_sens_url + GeneralDef.EjecGeoParamIgual + "0 " +
|
||||||
GeneralDef.EjecGeoParamSep + GeneralDef.GR_sens_fecha + GeneralDef.EjecGeoParamIgual + 0 + " " +
|
GeneralDef.EjecGeoParamSep + GeneralDef.GR_sens_fecha + GeneralDef.EjecGeoParamIgual + "0 " +
|
||||||
GeneralDef.EjecGeoParamSep + GeneralDef.GR_sens_fechaf + GeneralDef.EjecGeoParamIgual + 0 + " " +
|
GeneralDef.EjecGeoParamSep + GeneralDef.GR_sens_fechaf + GeneralDef.EjecGeoParamIgual + "0 " +
|
||||||
GeneralDef.EjecGeoParamSep + GeneralDef.GR_sens_modo + 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_ais + GeneralDef.EjecGeoParamIgual + (reco.IgnoAis?1:0) + " " +
|
||||||
GeneralDef.EjecGeoParamSep + GeneralDef.GR_lateral + GeneralDef.EjecGeoParamIgual + reco.TipoLate + " ";
|
GeneralDef.EjecGeoParamSep + GeneralDef.GR_lateral + GeneralDef.EjecGeoParamIgual + reco.TipoLate + " ";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -69,8 +69,8 @@
|
||||||
<ColumnDefinition Width="150"/>
|
<ColumnDefinition Width="150"/>
|
||||||
<ColumnDefinition Width="120"/>
|
<ColumnDefinition Width="120"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Button x:Name="button_secto" Grid.Column="1" Height="40 " Style="{DynamicResource Esri_Button}" Content="Sectorizar y Planif" Margin="10,0,10,0" Click="button_secto_Click" FontStretch="Condensed"/>
|
<Button x:Name="button_secto" Grid.Column="1" Height="40 " Style="{DynamicResource Esri_Button}" Content="Sectorizar" Margin="10,0,10,0" Click="button_secto_Click" FontStretch="Condensed"/>
|
||||||
<Button x:Name="button_planif" Grid.Column="2" Height="40 " Style="{DynamicResource Esri_Button}" Content="Solo Planificar" Margin="10,0,10,0" Click="button_planif_Click"/>
|
<Button x:Name="button_planif" Grid.Column="2" Height="40 " Style="{DynamicResource Esri_Button}" Content="Planificar" Margin="10,0,10,0" Click="button_planif_Click"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</ContentPresenter.Content>
|
</ContentPresenter.Content>
|
||||||
|
|
|
||||||
|
|
@ -199,7 +199,7 @@ namespace OliviaAddInPro
|
||||||
err_str = "El formato introducido para el tiempo de vaciado no es válido.";
|
err_str = "El formato introducido para el tiempo de vaciado no es válido.";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
//revisa las coordenadas de la planta de instalación
|
//revisa las coordenadas de la planta de descarga
|
||||||
reco.CoordsPlanta = _subPanel1ViewModel.CoordsPlanta;
|
reco.CoordsPlanta = _subPanel1ViewModel.CoordsPlanta;
|
||||||
if (reco.CoordsPlanta.Equals(new Coordinate2D(0, 0)))
|
if (reco.CoordsPlanta.Equals(new Coordinate2D(0, 0)))
|
||||||
{
|
{
|
||||||
|
|
@ -207,6 +207,13 @@ namespace OliviaAddInPro
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//revisa coordenadas de instalación
|
||||||
|
if (_subPanel2ViewModel.CoordsInstal.Equals(new Coordinate2D(0, 0)))
|
||||||
|
{
|
||||||
|
err_str = "No se ha seleccionado instalación de salida/llegada";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
//lee las propiedades comunes a recogida
|
//lee las propiedades comunes a recogida
|
||||||
if (!LeeComun(reco, out err_str))
|
if (!LeeComun(reco, out err_str))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue