Últimos cambios igt_base a utiles, algunas otras correcciones
parent
ef20103e46
commit
01a4e739e0
Binary file not shown.
|
|
@ -98,7 +98,7 @@ namespace OliviaAddIn
|
|||
{
|
||||
termina();
|
||||
}
|
||||
return "Error en funciones de la dll igt_base.dll";
|
||||
return "Error en el socket de la dll utiles.dll";
|
||||
}
|
||||
public void termina()
|
||||
{
|
||||
|
|
@ -116,25 +116,25 @@ namespace OliviaAddIn
|
|||
}
|
||||
}
|
||||
//funciones auxiliares------------------------------
|
||||
[DllImport("igt_base.dll", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Ansi)]
|
||||
[DllImport("utiles.dll", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Ansi)]
|
||||
unsafe public static extern IntPtr str_socket_crea();
|
||||
|
||||
[DllImport("igt_base.dll", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Ansi)]
|
||||
[DllImport("utiles.dll", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Ansi)]
|
||||
unsafe public static extern int str_socket_conecta(IntPtr soc, String ip, int puerto);
|
||||
|
||||
[DllImport("igt_base.dll", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Ansi)]
|
||||
[DllImport("utiles.dll", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Ansi)]
|
||||
unsafe public static extern int str_socket_envia(IntPtr soc, String txt);
|
||||
|
||||
[DllImport("igt_base.dll", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Ansi)]
|
||||
[DllImport("utiles.dll", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Ansi)]
|
||||
unsafe public static extern int str_socket_recive(IntPtr soc);
|
||||
|
||||
[DllImport("igt_base.dll", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Ansi)]
|
||||
[DllImport("utiles.dll", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Ansi)]
|
||||
unsafe public static extern void str_socket_dame_buf(IntPtr soc, StringBuilder buf);
|
||||
|
||||
[DllImport("igt_base.dll", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Ansi)]
|
||||
[DllImport("utiles.dll", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Ansi)]
|
||||
unsafe public static extern void str_socket_dame_error(IntPtr soc, StringBuilder error);//llamar con 1024 de espacio
|
||||
|
||||
[DllImport("igt_base.dll", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Ansi)]
|
||||
[DllImport("utiles.dll", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Ansi)]
|
||||
unsafe public static extern void str_socket_borra(IntPtr soc);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -252,22 +252,22 @@ namespace OliviaAddIn
|
|||
*/
|
||||
public static void rellena_tto_gdb()
|
||||
{
|
||||
LimpiezaDef.tto_gdb[(int)LimpiezaDef.TiposTto.TtoBarrMan] = "Barrido_manual";
|
||||
LimpiezaDef.tto_gdb[(int)LimpiezaDef.TiposTto.TtoBarrMant] = "Barrido_manual_mantenimiento";
|
||||
LimpiezaDef.tto_gdb[(int)LimpiezaDef.TiposTto.TtoBarrMot] = "Barrido_manual_motorizado";
|
||||
LimpiezaDef.tto_gdb[(int)LimpiezaDef.TiposTto.TtoBarrMecCalz] = "Barrido_mecanico_calzadas";
|
||||
LimpiezaDef.tto_gdb[(int)LimpiezaDef.TiposTto.TtoBarrMecAcYCalzP] = "Barrido_mecanico_aceras_peatonales";
|
||||
LimpiezaDef.tto_gdb[(int)LimpiezaDef.TiposTto.TtoBarrMan] = "Barrido_man";
|
||||
LimpiezaDef.tto_gdb[(int)LimpiezaDef.TiposTto.TtoBarrMant] = "Barrido_man_mantenimiento";
|
||||
LimpiezaDef.tto_gdb[(int)LimpiezaDef.TiposTto.TtoBarrMot] = "Barrido_man_motorizado";
|
||||
LimpiezaDef.tto_gdb[(int)LimpiezaDef.TiposTto.TtoBarrMecCalz] = "Barrido_mec_calzadas";
|
||||
LimpiezaDef.tto_gdb[(int)LimpiezaDef.TiposTto.TtoBarrMecAcYCalzP] = "Barrido_mec_aceras_peat";
|
||||
LimpiezaDef.tto_gdb[(int)LimpiezaDef.TiposTto.TtoBarrMixAcYCalz] = "Barrido_mixto";
|
||||
LimpiezaDef.tto_gdb[(int)LimpiezaDef.TiposTto.TtoBaldMan] = "Baldeo_manual";
|
||||
LimpiezaDef.tto_gdb[(int)LimpiezaDef.TiposTto.TtoBaldMecCalz] = "Baldeo_mecanico_calzadas";
|
||||
LimpiezaDef.tto_gdb[(int)LimpiezaDef.TiposTto.TtoBaldMecAcYCalzP] = "Baldeo_mecanico_aceras_peatonales";
|
||||
LimpiezaDef.tto_gdb[(int)LimpiezaDef.TiposTto.TtoBaldMecCalz] = "Baldeo_mec_calzadas";
|
||||
LimpiezaDef.tto_gdb[(int)LimpiezaDef.TiposTto.TtoBaldMecAcYCalzP] = "Baldeo_mec_aceras_peat";
|
||||
LimpiezaDef.tto_gdb[(int)LimpiezaDef.TiposTto.TtoBaldMixAcYCalz] = "Baldeo_mixto";
|
||||
LimpiezaDef.tto_gdb[(int)LimpiezaDef.TiposTto.TtoFregMecAcYCalzP] = "Brigada_limpieza";
|
||||
LimpiezaDef.tto_gdb[(int)LimpiezaDef.TiposTto.TtoCaidaHoja] = "Caida_hoja";
|
||||
LimpiezaDef.tto_gdb[(int)LimpiezaDef.TiposTto.TtoPapeVaci] = "Vaciado_papeleras";
|
||||
LimpiezaDef.tto_gdb[(int)LimpiezaDef.TiposTto.TtoPapeLimp] = "Limpieza_papeleras";
|
||||
LimpiezaDef.tto_gdb[(int)LimpiezaDef.TiposTto.TtoLimpCont] = "Limpieza_contenedores";
|
||||
LimpiezaDef.tto_gdb[(int)LimpiezaDef.TiposTto.TtoLimpZInf] = "Limpieza_zonas_infantiles";
|
||||
LimpiezaDef.tto_gdb[(int)LimpiezaDef.TiposTto.TtoLimpZInf] = "Limpieza_zonas_infant";
|
||||
LimpiezaDef.tto_gdb[(int)LimpiezaDef.TiposTto.TtoLimpPipi] = "Limpieza_pipicanes";
|
||||
LimpiezaDef.tto_gdb[(int)LimpiezaDef.TiposTto.TtoLimpSane] = "Limpieza_sanecanes";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -115,8 +115,8 @@ namespace OliviaAddIn
|
|||
string path_dll_dest = null, dll = null;
|
||||
try
|
||||
{
|
||||
//comprueba igt_base.dll
|
||||
dll = "igt_base.dll";
|
||||
//comprueba utiles.dll
|
||||
dll = "utiles.dll";
|
||||
|
||||
path_dll_dest = Path.Combine(Application.StartupPath, dll);
|
||||
if (!File.Exists(path_dll_dest))
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -2,11 +2,11 @@
|
|||
<Name>OLIVIA AddIn</Name>
|
||||
<AddInID>{0718b3b3-5422-4d80-97ad-f72b18a3e476}</AddInID>
|
||||
<Description>Add-In de ArcMap para la herramienta de optimización de la limpieza viaria, OLIVIA.</Description>
|
||||
<Version>2.0.0.4</Version>
|
||||
<Version>2.0.0.6</Version>
|
||||
<Image>Images\OliviaAddIn.png</Image>
|
||||
<Author>VSM</Author>
|
||||
<Company>VSM</Company>
|
||||
<Date>17/04/2020</Date>
|
||||
<Date>03/06/2020</Date>
|
||||
<Targets>
|
||||
<Target name="Desktop" version="10.2" />
|
||||
</Targets>
|
||||
|
|
|
|||
|
|
@ -672,7 +672,7 @@ namespace OliviaAddIn
|
|||
try
|
||||
{
|
||||
OliviaGlob.buff_export = Convert.ToInt32(textBox_buff.Text);
|
||||
if ((OliviaGlob.buff_export < 0) || (OliviaGlob.buff_export > 10000))
|
||||
if ((OliviaGlob.buff_export < 0) || (OliviaGlob.buff_export > 100000))
|
||||
{
|
||||
err_str = "El buffer de exportación no está dentro de los límites configurados";
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -69,7 +69,6 @@
|
|||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(405, 226);
|
||||
this.ControlBox = false;
|
||||
this.Controls.Add(this.label_progr);
|
||||
this.Controls.Add(this.progressBar_ejec);
|
||||
this.Controls.Add(this.button_canc);
|
||||
|
|
|
|||
|
|
@ -190,7 +190,7 @@
|
|||
this.label_dens_cont.Name = "label_dens_cont";
|
||||
this.label_dens_cont.Size = new System.Drawing.Size(25, 18);
|
||||
this.label_dens_cont.TabIndex = 25;
|
||||
this.toolTip1.SetToolTip(this.label_dens_cont, "Densidad de los contenedores en Kg/m3");
|
||||
this.toolTip1.SetToolTip(this.label_dens_cont, "Densidad de la fracción en contenedor en Kg/m3");
|
||||
//
|
||||
// textBox_dens_cont
|
||||
//
|
||||
|
|
|
|||
|
|
@ -157,8 +157,8 @@ namespace OliviaAddIn
|
|||
for (int i = 0; i < reco.cargas_max_vehic[reco.tipo_carg, reco.tipo_vehic].n; i++)
|
||||
comboBox_capac.Items.Add(reco.cargas_max_vehic[reco.tipo_carg, reco.tipo_vehic].vol[i] + " m3");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else if (reco.tipo_vehic >= 0 && reco.tipo_vehic < (int)RecogidaDef.TiposVehic.N &&
|
||||
reco.tipo_carg >= (int)RecogidaDef.TiposCarga.N)
|
||||
{
|
||||
|
|
@ -303,7 +303,7 @@ namespace OliviaAddIn
|
|||
|
||||
//a la hora de leer la capacidad hay que tener en cuenta que cuando se selecciona una carga no contemplada en la enumeracion RecogidaDef.TiposCarga, es decir,
|
||||
//>= a RecogidaDef.TiposCarga.Otra no hay que leer la capacidad porque se deshanbilita al no tener información de densidades, etc
|
||||
if (reco.tipo_carg < (int)RecogidaDef.TiposCarga.N - 1)
|
||||
/* if (reco.tipo_carg < (int)RecogidaDef.TiposCarga.N - 1)
|
||||
{
|
||||
reco.tipo_capa = comboBox_capac.SelectedIndex;
|
||||
if (reco.tipo_capa == -1)
|
||||
|
|
@ -311,7 +311,7 @@ namespace OliviaAddIn
|
|||
err_str = "No se ha seleccionado ningún Tipo de Capacidad";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
} */
|
||||
|
||||
//se verifica que se haya seleccionado una capa de instalación de llegada y salida.
|
||||
if ((reco.coords_instala[0] == 0) && (reco.coords_instala[1] == 0))
|
||||
|
|
@ -363,7 +363,7 @@ namespace OliviaAddIn
|
|||
try
|
||||
{
|
||||
OliviaGlob.buff_export = Convert.ToInt32(textBox_buff.Text);
|
||||
if ((OliviaGlob.buff_export < 0) || (OliviaGlob.buff_export > 10000))
|
||||
if ((OliviaGlob.buff_export < 0) || (OliviaGlob.buff_export > 100000))
|
||||
{
|
||||
err_str = "El buffer de exportación no está dentro de los límites configurados";
|
||||
return false;
|
||||
|
|
@ -835,6 +835,20 @@ namespace OliviaAddIn
|
|||
comboBox_vehic.Items.Clear();
|
||||
comboBox_lateralidad.Visible = false;
|
||||
|
||||
int i;
|
||||
for (i = 0; i < reco.tipos_fracc_bool.Length;i++ )
|
||||
{
|
||||
reco.tipos_fracc_bool[i] = false;
|
||||
}
|
||||
for (i = 0; i < reco.tipos_carg_bool.Length; i++)
|
||||
{
|
||||
reco.tipos_carg_bool[i] = false;
|
||||
}
|
||||
for (i = 0; i < reco.tipos_vehic_bool.Length; i++)
|
||||
{
|
||||
reco.tipos_vehic_bool[i] = false;
|
||||
}
|
||||
|
||||
//leer los campos de la tabla... si todo va bien: existe la tabla y los campos que se han editado
|
||||
if (!OliviaGlob.gdb_reco.lee_capa_recogida(reco))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -117,9 +117,6 @@
|
|||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="bt_capa_zonas.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
|
|
@ -135,6 +132,9 @@
|
|||
du+KLVoOXX4ODdI26Z1rVhzVcAqjoq8Oce7aXgAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAEAEBAAAAAAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAQAQAAAAAAAAAAAAAAAAAAAAA
|
||||
|
|
|
|||
|
|
@ -393,7 +393,7 @@ namespace OliviaAddIn
|
|||
{
|
||||
//hay instalación
|
||||
if (!FunGDB.is_pto_in_geom(limp.coords_instala[0], limp.coords_instala[1], geom_ambits))
|
||||
geom_ambits = FunGDB.amplia_geom(geom_ambits, limp.coords_instala[0], limp.coords_instala[1]);
|
||||
geom_ambits = FunGDB.amplia_geom_convexhull(geom_ambits, limp.coords_instala[0], limp.coords_instala[1]);
|
||||
|
||||
//comprueba, si hay restricciones de circulación, que la instalación no está en ellas
|
||||
if (limp.geom_rest_acces != null)
|
||||
|
|
|
|||
|
|
@ -1104,13 +1104,19 @@ namespace OliviaAddIn
|
|||
/**
|
||||
* Amplia la geom para que contenga el punto p ampliando la envolvente convexa
|
||||
*/
|
||||
public static IGeometry amplia_geom_convexhull(IGeometry geom, double p_x, double p_y)
|
||||
public static IGeometry amplia_geom_convexhull(IGeometry geom, double p_x, double p_y, int buff = -1)
|
||||
{
|
||||
int b;
|
||||
IPoint p;
|
||||
ITopologicalOperator union;
|
||||
IGeometry geom_p,geom_tot, geom_convhull;
|
||||
IGeometry5 geom_p_;
|
||||
|
||||
if (buff > -1)
|
||||
b = buff;
|
||||
else
|
||||
b = 100;
|
||||
|
||||
try
|
||||
{
|
||||
p = new Point();
|
||||
|
|
@ -1118,7 +1124,7 @@ namespace OliviaAddIn
|
|||
geom_p_ = (IGeometry5)p;
|
||||
geom_p_.SpatialReference = geom.SpatialReference;
|
||||
union = (ITopologicalOperator)geom_p_;
|
||||
geom_p = union.Buffer(100);
|
||||
geom_p = union.Buffer(b);
|
||||
union = (ITopologicalOperator)geom_p;
|
||||
//une el punto nuevo a la geometría geom
|
||||
geom_tot = union.Union(geom);
|
||||
|
|
|
|||
|
|
@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("2.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("2.0.0.0")]
|
||||
[assembly: AssemblyVersion("2.0.0.6")]
|
||||
[assembly: AssemblyFileVersion("2.0.0.6")]
|
||||
|
|
|
|||
Loading…
Reference in New Issue