Avances cambios
parent
393ae23002
commit
b8d95ca6c9
|
|
@ -61,3 +61,9 @@ OliviaTasks/[Dd]ebug/*
|
|||
/Olivia/Olivia.vcxproj
|
||||
/OliviaTasks/OliviaTasks.vcxproj
|
||||
/OliviaTasks/OliviaTasks.vcxproj.user
|
||||
/bin/*
|
||||
/lib/*
|
||||
/Olivia.sln
|
||||
/Olivia/Olivia.vcxproj
|
||||
/OliviaTasks/OliviaTasks.vcxproj
|
||||
/OliviaTasks/OliviaTasks.vcxproj.user
|
||||
|
|
|
|||
|
|
@ -512,6 +512,27 @@ int Colv_limp::pon_config(char *config_)
|
|||
if (!olv->dame_param(token, &DESV_MAX_ABS))
|
||||
break;
|
||||
}
|
||||
else if (strstr(token, OliviaDef::GeneralDef::GTO_camp_objectid))
|
||||
{
|
||||
if (!olv->dame_param(token, camps.campo_oid, sizeof(camps.campo_oid)))
|
||||
break;
|
||||
if (strlen(camps.campo_oid) > OLV_MAX_COL_SHP)//10 porque el shp solo pasa con 10 caracteres en los nombres de columna
|
||||
camps.campo_oid[OLV_MAX_COL_SHP] = 0;
|
||||
}
|
||||
else if (strstr(token, OliviaDef::GeneralDef::GTO_camp_sector))
|
||||
{
|
||||
if (!olv->dame_param(token, camps.campo_secto, sizeof(camps.campo_secto)))
|
||||
break;
|
||||
if (strlen(camps.campo_secto) > OLV_MAX_COL_SHP)//10 porque el shp solo pasa con 10 caracteres en los nombres de columna
|
||||
camps.campo_secto[OLV_MAX_COL_SHP] = 0;
|
||||
}
|
||||
else if (strstr(token, OliviaDef::GeneralDef::GTO_camp_secuencia))
|
||||
{
|
||||
if (!olv->dame_param(token, camps.campo_secuen, sizeof(camps.campo_secuen)))
|
||||
break;
|
||||
if (strlen(camps.campo_secuen) > OLV_MAX_COL_SHP)//10 porque el shp solo pasa con 10 caracteres en los nombres de columna
|
||||
camps.campo_secuen[OLV_MAX_COL_SHP] = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
token = strtok(NULL, OliviaDef::GeneralDef::EjecGeoParamSep);
|
||||
|
|
@ -686,8 +707,10 @@ void Colv_limp::rellena_campos()
|
|||
sprintf_s(camps.campo_tipo_ap,OLV_LIMP_MAX_CAMP,"TIPOLOGIA");
|
||||
sprintf_s(camps.campo_tipo_ent,OLV_LIMP_MAX_CAMP,"NOM_TIPO_E");
|
||||
|
||||
//IGT
|
||||
sprintf_s(camps.campo_secto,OLV_LIMP_MAX_CAMP,OliviaDef::GeneralDef::NombColSector);
|
||||
//NARV
|
||||
sprintf_s(camps.campo_secto,OLV_LIMP_MAX_CAMP,"SECTOR");
|
||||
sprintf_s(camps.campo_secuen, OLV_LIMP_MAX_CAMP, "SECUENCIA");
|
||||
sprintf_s(camps.campo_oid, OLV_LIMP_MAX_CAMP, OLV_NOMB_OID);
|
||||
|
||||
///////rellena los atributos
|
||||
//TOMTOM
|
||||
|
|
|
|||
|
|
@ -442,6 +442,8 @@ typedef struct Campos_dbf
|
|||
char campo_tipo_ap[OLV_LIMP_MAX_CAMP];
|
||||
char campo_tipo_ent[OLV_LIMP_MAX_CAMP];
|
||||
char campo_secto[OLV_LIMP_MAX_CAMP];
|
||||
char campo_secuen[OLV_LIMP_MAX_CAMP];
|
||||
char campo_oid[OLV_LIMP_MAX_CAMP];
|
||||
char atr_circ[OLV_ATR_CIRC_N][OLV_LIMP_MAX_CAMP];
|
||||
char atr_tip_ent[OLV_ATR_NOM_TIP_ENT_N][OLV_LIMP_MAX_CAMP];
|
||||
char atr_tip_apa[OLV_ATR_TIP_AP_N][OLV_LIMP_MAX_CAMP];
|
||||
|
|
|
|||
|
|
@ -866,7 +866,7 @@ BOOL Colv_limp_thr::rellena_info_nw()
|
|||
olv_limp->camps.campo_velo,olv_limp->camps.campo_name,nfile);
|
||||
return FALSE;
|
||||
}
|
||||
icampoid=dbf.findCol(OLV_NOMB_OID);
|
||||
icampoid=dbf.findCol(olv_limp->camps.campo_oid);
|
||||
|
||||
////////////////////////////////////////
|
||||
sent = (char*)malloc(dbf.getSize(icamps)+1);
|
||||
|
|
@ -1036,7 +1036,7 @@ BOOL Colv_limp_thr::rellena_info_amb()
|
|||
ret=FALSE;
|
||||
goto fin;
|
||||
}
|
||||
icampoid=dbf.findCol(OLV_NOMB_OID);
|
||||
icampoid=dbf.findCol(olv_limp->camps.campo_oid);
|
||||
|
||||
if(!modo_ejes)
|
||||
{
|
||||
|
|
@ -6569,6 +6569,7 @@ BOOL Colv_limp_thr::lee_secto()
|
|||
int *info;
|
||||
Cb_file f;
|
||||
Fdbf dbf;
|
||||
int sector, secuen;
|
||||
|
||||
ret = TRUE;
|
||||
std::map<int,std::vector<int>> l_sec;
|
||||
|
|
@ -6597,12 +6598,14 @@ BOOL Colv_limp_thr::lee_secto()
|
|||
goto fin;
|
||||
}
|
||||
ics=dbf.findCol(olv_limp->camps.campo_secto);
|
||||
icsq=dbf.findCol("SECUENCIA");
|
||||
icsq=dbf.findCol(olv_limp->camps.campo_secuen);
|
||||
if(ics<0 || icsq<0)
|
||||
{
|
||||
ret=FALSE;
|
||||
goto fin;
|
||||
}
|
||||
int j;
|
||||
bool indica_secuen = true;
|
||||
idd =dbf.leeNexRow();
|
||||
//rellena para cada sector info[i] qué ámbitos tiene
|
||||
for(i=0;i<olv_limp->n_amb && idd==1; i++)
|
||||
|
|
@ -6613,16 +6616,31 @@ BOOL Colv_limp_thr::lee_secto()
|
|||
continue;
|
||||
}
|
||||
|
||||
s=dbf.getI(ics);
|
||||
sector=dbf.getI(ics);
|
||||
if (l_sec[sector].size() == 0)
|
||||
{
|
||||
//inicializa el array
|
||||
//A MEDIAS
|
||||
|
||||
//el primero lo añade vacío, por si se marca la secuencia con cuál empezar
|
||||
if(l_sec[dbf.getI(ics)].size()==0)
|
||||
l_sec[s].push_back(-1);
|
||||
}
|
||||
secuen = dbf.getI(icsq);
|
||||
if (secuen > 0)//se indica en qué secuencia va ese elemento
|
||||
l_sec[sector][secuen] = i;
|
||||
else
|
||||
{
|
||||
//no se indica secuencia, busca el primer elemento no inicializado
|
||||
for (j = 1; j < l_sec[sector].size(); j++)
|
||||
{
|
||||
if (l_sec[sector][j] == -1)
|
||||
{
|
||||
l_sec[sector][j] = i;
|
||||
indica_secuen = false; //indica que al menos uno de los elementos no tiene secuencia, por lo que hay que planificar todos
|
||||
//TIENE QUE PASARLO A FUERA PARA QUE SI INDICA_SECUEN ES TRUE, NO PLANIFIQUE
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(dbf.getI(icsq)==1)//se ha marcado ese elemento como primero, lo pone en el primer elemento
|
||||
l_sec[s][0]=i;
|
||||
|
||||
l_sec[s].push_back(i);
|
||||
}
|
||||
idd=dbf.leeNexRow();
|
||||
}
|
||||
if(i<olv_limp->n_amb)
|
||||
|
|
@ -8848,7 +8866,7 @@ BOOL Colv_limp_thr::guarda_cols_ctrl(char *path_shp)
|
|||
isec_novac++;
|
||||
k++;
|
||||
}
|
||||
if(!dbfmgr.AddCol(NULL,"SECUENCIA",GdataTable::Tstring,&dataDbf,OLV_SHP_SZ_CAMP_CHAR))
|
||||
if(!dbfmgr.AddCol(NULL, olv_limp->camps.campo_secuen,GdataTable::Tstring,&dataDbf,OLV_SHP_SZ_CAMP_CHAR))
|
||||
{
|
||||
free(info);
|
||||
return FALSE;
|
||||
|
|
@ -9459,9 +9477,9 @@ BOOL Colv_limp_thr::guarda_dbf_sector(int modo)
|
|||
strcpy((Cdir_manager::extension_archivo(path_dbf)),"dbf");
|
||||
//pone el nombre de la columna
|
||||
if(modo==0)//sector
|
||||
strcpy_s(nom_ia,16,"SECTOR");
|
||||
strcpy_s(nom_ia,16, olv_limp->camps.campo_secto);
|
||||
else if((modo==1)|| (modo==2))//secuencia
|
||||
strcpy_s(nom_ia,16,"SECUENCIA");
|
||||
strcpy_s(nom_ia,16, olv_limp->camps.campo_secuen);
|
||||
else if(modo==3)
|
||||
strcpy_s(nom_ia,16,"VIAJE");
|
||||
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@ BOOL Colv_reco_thr::rellena_datos()
|
|||
ret=FALSE;
|
||||
goto fin;
|
||||
}
|
||||
icampoid=dbf.findCol(OLV_NOMB_OID);
|
||||
icampoid=dbf.findCol(olv_limp->camps.campo_oid);
|
||||
icampkg=icampcap=icampid=-1;
|
||||
//busca el campo de kgrec, si es el caso
|
||||
//si es 0 los kg por defecto, se lee el campo de kg, si es negativo, se lee el campo de capacidad porque o bien están
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
/**
|
||||
|
||||
|
||||
//using ArcGIS.Core.Geometry;
|
||||
/**
|
||||
* @file GeneralDef.cs
|
||||
* Clase con definiciones globales comunes al proyecto Olivia y a OliviaTasks.
|
||||
*/
|
||||
/**
|
||||
*//**
|
||||
* Clase con definiciones globales comunes al proyecto Olivia y a OliviaTasks.
|
||||
*/
|
||||
namespace OliviaDef
|
||||
|
|
@ -35,6 +37,8 @@ namespace OliviaDef
|
|||
OlvTipTtoM2h,
|
||||
OlvTipTtoM2h_eje,
|
||||
};
|
||||
//public static string[] UdsTto = new string[] {"min","m/h","m/h","m2/h","m2/h"};
|
||||
//public static int SpatRefDef { get; set; } = (int)esriSRProjCS4Type.esriSRProjCS_ETRS1989_UTM_Zone_30N;
|
||||
//*************************************************************************************
|
||||
//Variables generales
|
||||
/*
|
||||
|
|
@ -47,8 +51,8 @@ namespace OliviaDef
|
|||
public const int ProgrMax = 100;
|
||||
public const int ProgrStep = 5;
|
||||
public const int ParamN = 5;
|
||||
public const int ParamLimpN = 37;
|
||||
public const int ParamRecoN = 40;
|
||||
public const int ParamLimpN = 48;
|
||||
public const int ParamRecoN = 46;
|
||||
/*
|
||||
* Define el separador entre parámetros de la llamada al proceso oliviatasks
|
||||
*/
|
||||
|
|
@ -56,7 +60,6 @@ namespace OliviaDef
|
|||
public const string EjecGeoProgName = "olivia";
|
||||
public const string EjecGeoParamIgual = ":";
|
||||
public const string NombOlvTasks = "OliviaTasks";
|
||||
public const string NombColSector = "SECTOR";
|
||||
/**
|
||||
* Define el nombre del grupo de propiedades generales
|
||||
*/
|
||||
|
|
@ -518,14 +521,19 @@ namespace OliviaDef
|
|||
/**
|
||||
* Nombre de los campos que lee en limpieza
|
||||
*/
|
||||
public const string GTO_girmax ="Giro_max_vehiculo";
|
||||
public const string GTO_anch_peat ="Ancho_peat_def";
|
||||
public const string GTO_anch_ace = "Ancho_acera_def";
|
||||
public const string GTO_anch_aplin = "Ancho_ap_lin_def";
|
||||
public const string GTO_anch_apbat = "Ancho_ap_bat_def";
|
||||
public const string GTO_anch_bordlib = "Ancho_bord_lib_def";
|
||||
public const string GTO_desv_max = "Desv_max";
|
||||
//común
|
||||
public const string GTO_girmax = "Giro_max_vehiculo";
|
||||
public const string GTO_desv_max = "Desv_max_rel";
|
||||
public const string GTO_desv_max_abs = "Desv_max_abs";
|
||||
public const string GTO_camp_objectid = "Camp_objectid";
|
||||
public const string GTO_camp_sector = "Camp_sector";
|
||||
public const string GTO_camp_secuencia = "Camp_secuencia";
|
||||
|
||||
/**
|
||||
* Define el nombre para mandar a oliviatasks la configuración
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in New Issue