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
|
||||
*/
|
||||
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>();
|
||||
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;
|
||||
try
|
||||
{
|
||||
do
|
||||
/*do
|
||||
{
|
||||
buffer += 100;
|
||||
buffer += buff;
|
||||
geom_pto = GeometryEngine.Instance.Buffer(pto.ToMapPoint(), buffer);
|
||||
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");
|
||||
return resp;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
while (repite);
|
||||
}
|
||||
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;
|
||||
}
|
||||
geom_sal = GeometryEngine.Instance.Union(geom_pto, geom);
|
||||
geom_sal = GeometryEngine.Instance.ConvexHull(geom_sal);
|
||||
if (geom_sal == null || geom_sal.IsEmpty)
|
||||
{
|
||||
resp.Value = null;
|
||||
|
|
|
|||
|
|
@ -247,7 +247,7 @@ namespace OliviaAddInPro.Services
|
|||
else
|
||||
{
|
||||
//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)
|
||||
{
|
||||
//ha ido mal
|
||||
|
|
|
|||
|
|
@ -84,11 +84,9 @@ namespace OliviaAddInPro.Services
|
|||
}
|
||||
if (mal)
|
||||
{
|
||||
//reinicia flags
|
||||
if (OliviaGlob.IsLimp())
|
||||
OliviaGlob.SetFlagTipEjec(TiposEjecucion.Limp);
|
||||
else if (OliviaGlob.IsReco())
|
||||
OliviaGlob.SetFlagTipEjec(TiposEjecucion.Reco);
|
||||
//actualiza los flags
|
||||
OliviaGlob.RemoveFlagTipEjec(TiposEjecucion.EjecPlanif);
|
||||
OliviaGlob.RemoveFlagTipEjec(TiposEjecucion.EjecSecto);
|
||||
|
||||
HelperGlobal.ponMsg(msg);
|
||||
OliviaGlob.progrDialog.Hide();
|
||||
|
|
@ -123,6 +121,8 @@ namespace OliviaAddInPro.Services
|
|||
{
|
||||
//actualiza la capa de la que tiene que leer ahora para planificar
|
||||
inst.CapaPlanif = resp2.Value;
|
||||
//pone modo config2
|
||||
OliviaGlob.AddFlagTipEjec(TiposEjecucion.Config2);
|
||||
if (OliviaGlob.HasFlagTipEjec(TiposEjecucion.EjecPlanif)) //Ha terminado bien la planificación
|
||||
{
|
||||
//guarda csv
|
||||
|
|
@ -138,20 +138,9 @@ namespace OliviaAddInPro.Services
|
|||
mal = true;
|
||||
}
|
||||
}
|
||||
/*if (mal)
|
||||
{
|
||||
//reinicia flags
|
||||
if (OliviaGlob.IsLimp())
|
||||
OliviaGlob.SetFlagTipEjec(TiposEjecucion.Limp);
|
||||
else if (OliviaGlob.IsReco())
|
||||
OliviaGlob.SetFlagTipEjec(TiposEjecucion.Reco);
|
||||
|
||||
}*/
|
||||
//actualiza los flags
|
||||
OliviaGlob.RemoveFlagTipEjec(TiposEjecucion.EjecPlanif);
|
||||
OliviaGlob.RemoveFlagTipEjec(TiposEjecucion.EjecSecto);
|
||||
//pone modo config2
|
||||
OliviaGlob.AddFlagTipEjec(TiposEjecucion.Config2);
|
||||
///////////////////////////////////////////////////
|
||||
HelperGlobal.ponMsg(msg);
|
||||
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.GR_descx + GeneralDef.EjecGeoParamIgual + reco.CoordsPlanta.X + " " +//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_url + 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_modo + 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_fecha + GeneralDef.EjecGeoParamIgual + "0 " +
|
||||
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.GR_lateral + GeneralDef.EjecGeoParamIgual + reco.TipoLate + " ";
|
||||
|
||||
|
|
|
|||
|
|
@ -69,8 +69,8 @@
|
|||
<ColumnDefinition Width="150"/>
|
||||
<ColumnDefinition Width="120"/>
|
||||
</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_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_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="Planificar" Margin="10,0,10,0" Click="button_planif_Click"/>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</ContentPresenter.Content>
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ namespace OliviaAddInPro
|
|||
err_str = "El formato introducido para el tiempo de vaciado no es válido.";
|
||||
return false;
|
||||
}
|
||||
//revisa las coordenadas de la planta de instalación
|
||||
//revisa las coordenadas de la planta de descarga
|
||||
reco.CoordsPlanta = _subPanel1ViewModel.CoordsPlanta;
|
||||
if (reco.CoordsPlanta.Equals(new Coordinate2D(0, 0)))
|
||||
{
|
||||
|
|
@ -207,6 +207,13 @@ namespace OliviaAddInPro
|
|||
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
|
||||
if (!LeeComun(reco, out err_str))
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue