//utilizado na ferramenta de identificacao case "SALVAATRIBUTOSTIPOREGIAO": $m = new Metaestat(); $resultado = $m->mantemDadosRegiao($codigo_tipo_regiao, $_GET["identificador_regiao"], $_GET["identificador_regiao"], $_GET["valores"], "", "alterar", $_GET["colunas"]); retornaJSON($resultado); exit; break; case "EXCLUIATRIBUTOSMEDIDAVARIAVEL": $m = new Metaestat(); $resultado = $m->excluiAtributosMedidaVariavel($id_medida_variavel, $codigo_tipo_regiao, $_GET["identificador_regiao"], $id); retornaJSON($resultado); exit; break; case "REGIAO2SHP": $m = new Metaestat(); $shp = $m->regiao2shp($codigo_tipo_regiao); include dirname(__FILE__) . "/../../pacotes/kmlmapserver/classes/zip.class.php"; $handle = fopen($shp . ".shp", "r"); $contentsshp = fread($handle, filesize($shp . ".shp")); fclose($handle); $handle = fopen($shp . ".shp", "r"); $contentsdbf = fread($handle, filesize($shp . ".dbf")); fclose($handle); $handle = fopen($shp . ".shp", "r"); $contentsshx = fread($handle, filesize($shp . ".shx")); fclose($handle); $ziper = new zipfile(); $ziper->addFile($contentsshp, basename($shp) . '.shp'); $ziper->addFile($contentsshx, basename($shp) . '.shx'); $ziper->addFile($contentsdbf, basename($shp) . '.dbf'); $arq = $shp . ".zip";