show_errors();
if(!is_file(«TodosBic.json»))
{
echo zama;
$QTodosRecursos=»SELECT `IdRecurso`, `Nombre`, `Descripcion`, `Clasificacion`, `Denominacion`, `Poblacion`, x(`Posicion`) as Longitud, y(`Posicion`) as Latitud,AsText(`Posicion`) as Posicion FROM `Recurso` WHERE `Publicar` = ‘1’»;
$SQLQTodosRecursos = $wpdb2->get_results($QTodosRecursos);
$todosresultados= $wpdb2->num_rows;
if($todosresultados>0)
{
$GeojsonTodosBic = array(‘type’ => ‘FeatureCollection’,’features’ => array());
foreach ($SQLQTodosRecursos as $fila)
{
$all_bic = array(
‘type’ => ‘Feature’,
‘geometry’ => array(
‘type’ => ‘Point’,
‘coordinates’ => array($fila->Longitud, $fila->Latitud)
),
‘properties’ => array(
‘name’ => $fila->Nombre,
‘id’ => $fila->IdRecurso,
‘clasificacion’ => $fila->Clasificacion,
‘denominacion’ => $fila->Denominacion,
‘poblacion’ => $fila->Poblacion
)
);
array_push($GeojsonTodosBic[‘features’], $all_bic);
}
$jsonencodedBics = json_encode($GeojsonTodosBic,JSON_UNESCAPED_UNICODE);
$fh = fopen(«TodosBic.json», ‘w’);
fwrite($fh, $jsonencodedBics );
fclose($fh);
}
}
if(!is_file(«TodosRP.json»))
{
$QTodosRecursosProductivos=»SELECT `IdRecurso_Productivo`, `Nombre`, `Descripcion`, `Clasificacion`, `Poblacion`, `Tlf1`, `Web`, x(`Posicion`) as Longitud, y(`Posicion`) as Latitud,AsText(`Posicion`) as Posicion FROM `Recurso_Productivo` WHERE `Publicar` = ‘1’»;
$SQLQTodosRecursosProductivos = $wpdb2->get_results($QTodosRecursosProductivos);
$todosresultadosProductivos= $wpdb2->num_rows;
if($todosresultadosProductivos>0)
{
$GeojsonTodosRP = array(‘type’ => ‘FeatureCollection’,’features’ => array());
foreach ($SQLQTodosRecursosProductivos as $fila)
{
$all_rp = array(
‘type’ => ‘Feature’,
‘geometry’ => array(
‘type’ => ‘Point’,
‘coordinates’ => array($fila->Longitud, $fila->Latitud)
),
‘properties’ => array(
‘name’ => $fila->Nombre,
‘id’ => $fila->IdRecurso_Productivo,
‘poblacion’ => $fila->Poblacion,
‘clasificacion’ => $fila->Clasificacion,
//’denominacion’ => $fila->Denominacion,
‘tlf1’ => $fila->Tlf1,
‘web’ => $fila->Web
)
);
array_push($GeojsonTodosRP[‘features’], $all_rp);
}
$jsonencodedRPs = json_encode($GeojsonTodosRP,JSON_UNESCAPED_UNICODE);
$fh = fopen(«TodosRP.json», ‘w’);
fwrite($fh, $jsonencodedRPs );
fclose($fh);
}
}
if(!is_file(«TodosZEPAs.json»))
{
$SQLZEPAS = $wpdb2->get_results(«select AsWkt(`Area`) as Area, Nombre, IdPatrimonio_Natural from Patrimonio_Natural where Publicar =’1′ and Clasificacion =’ZEPA’ order by IdPatrimonio_Natural asc»);
$ZEPASresultados= $wpdb2->num_rows;
if($ZEPASresultados>0)
{
$all_ZEPAS = array(‘type’ => ‘FeatureCollection’,’features’ => array());
foreach ($SQLZEPAS as $fila)
{
$ZEPAS = array(
‘type’ => ‘Feature’,
‘properties’ => array(
‘name’ => $fila->Nombre,
‘id’ => $fila->IdPatrimonio_Natural ,
‘Area’ => $fila->Area
)
);
array_push($all_ZEPAS[‘features’], $ZEPAS);
}
$jsonencodedZEPAs = json_encode($all_ZEPAS,JSON_UNESCAPED_UNICODE);
$fh = fopen(«TodosZEPAs.json», ‘w’);
fwrite($fh, $jsonencodedZEPAs );
fclose($fh);
}
}
if(!is_file(«TodosLICs.json»))
{
$SQLLIC = $wpdb2->get_results(«select AsWkt(`Area`) as Area, Nombre, IdPatrimonio_Natural from Patrimonio_Natural where Publicar =’1′ and Clasificacion =’LIC’ order by IdPatrimonio_Natural asc»);
$LICresultados= $wpdb2->num_rows;
if($LICresultados>0)
{
$all_LIC = array(‘type’ => ‘FeatureCollection’,’features’ => array());
foreach ($SQLLIC as $fila)
{
$LIC = array(
‘type’ => ‘Feature’,
‘properties’ => array(
‘name’ => $fila->Nombre,
‘id’ => $fila->IdPatrimonio_Natural ,
‘Area’ => $fila->Area
)
);
array_push($all_LIC[‘features’], $LIC);
}
$jsonencodedLICs = json_encode($all_LIC,JSON_UNESCAPED_UNICODE);
$fh = fopen(«TodosLICs.json», ‘w’);
fwrite($fh, $jsonencodedLICs );
fclose($fh);
}
}
if(!is_file(«TodosEN.json»))
{
$SQLEN = $wpdb2->get_results(«select AsWkt(`Area`) as Area, Nombre, IdPatrimonio_Natural from Patrimonio_Natural where Publicar =’1′ and Clasificacion =’Espacio Natural’ order by IdPatrimonio_Natural asc»);
$ENresultados= $wpdb2->num_rows;
if($ENresultados>0)
{
$all_EN = array(‘type’ => ‘FeatureCollection’,’features’ => array());
foreach ($SQLEN as $fila)
{
$EN = array(
‘type’ => ‘Feature’,
‘properties’ => array(
‘name’ => $fila->Nombre,
‘id’ => $fila->IdPatrimonio_Natural ,
‘Area’ => $fila->Area
)
);
array_push($all_EN[‘features’], $EN);
}
$jsonencodedENs = json_encode($all_EN,JSON_UNESCAPED_UNICODE);
$fh = fopen(«TodosEN.json», ‘w’);
fwrite($fh, $jsonencodedENs );
fclose($fh);
}
}
if(!is_file(«TodosPN.json»))
{
$SQLPN = $wpdb2->get_results(«select AsWkt(`Area`) as Area, Nombre, IdPatrimonio_Natural from Patrimonio_Natural where Publicar =’1′ and Clasificacion =’Parque Natural’ order by IdPatrimonio_Natural asc»);
$PNresultados= $wpdb2->num_rows;
if($PNresultados>0)
{
$all_PN = array(‘type’ => ‘FeatureCollection’,’features’ => array());
foreach ($SQLPN as $fila)
{
$PN = array(
‘type’ => ‘Feature’,
‘properties’ => array(
‘name’ => $fila->Nombre,
‘id’ => $fila->IdPatrimonio_Natural ,
‘Area’ => $fila->Area
)
);
array_push($all_PN[‘features’], $PN);
}
$jsonencodedPNs = json_encode($all_PN,JSON_UNESCAPED_UNICODE);
$fh = fopen(«TodosPN.json», ‘w’);
fwrite($fh, $jsonencodedPNs );
fclose($fh);
}
}
if(!is_file(«TodosSENDEROS.json»))
{
$SQLsenderos = $wpdb2->get_results(«SELECT AsWkt(`Ruta`) as Ruta , AsWkt(StartPoint(`Ruta`)) as Comienzo,`IdSendero`, `Nombre` FROM `Sendero` WHERE `Publicar` = ‘1’»);
$senderosresultados= $wpdb2->num_rows;
if($senderosresultados>0)
{
$all_Senderos = array(‘type’ => ‘FeatureCollection’,’features’ => array());
foreach ($SQLsenderos as $fila)
{
$SENDERO = array(
‘type’ => ‘Feature’,
‘properties’ => array(
‘name’ => $fila->Nombre,
‘id’ => $fila->IdSendero ,
‘Ruta’ => $fila->Ruta,
‘Comienzo’ => $fila->Comienzo
)
);
array_push($all_Senderos[‘features’], $SENDERO);
}
$jsonencodedSENDEROs = json_encode($all_Senderos,JSON_UNESCAPED_UNICODE);
$fh = fopen(«TodosSENDEROS.json», ‘w’);
fwrite($fh, $jsonencodedSENDEROs );
fclose($fh);
}
}
?>
Mapa de patrimonio Románico
Puede visualizar todas las capas de información del proyecto desde el gestor de capas situado a la derecha
LEYENDA








Indicaciones sobre el mapa
En el gestor de capas puedes mostrar/ocultar las capas. Los polígonos tienen transparencia para mostrar las superposiciones, modificando el color del polígono resultante.
Para una visualización óptima ocultar todas las capas de polígonos e ir mostrando de una en una.
La localización se muestra en Coordenadas Geográficas WGS84 para facilitar su volcado a dispositivos GPS / GPRS móviles (móviles, navegadores, GPS de mano, etc.).