Last active
December 23, 2015 10:29
-
-
Save pedrokoblitz/6621460 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name | lat | lon | |
---|---|---|---|
Engenho da Rainha | -22.8652 | -43.2946 | |
Padre Miguel | -22.8799 | -43.4498 | |
Iraja | -22.8400 | -43.3237 | |
Campo Grande | -22.8896 | -43.5598 | |
Guadalupe | -22.8326 | -43.3796 | |
Taquara | -22.9258 | -43.3737 | |
Laranjeiras | -22.9348 | -43.1880 | |
Botafogo | -22.9516 | -43.1840 | |
Bangu | -22.8671 | -43.4650 | |
Vicente de Carvalho | -22.8534 | -43.3144 | |
Benfica | -22.8898 | -43.2456 | |
Pilares | -22.8830 | -43.2962 | |
Santa Cruz | -22.9358 | -43.6671 | |
Realengo | -22.8741 | -43.4279 | |
Caxambi | -22.8507 | -43.3363 | |
Engenho de Dentro | -22.9046 | -43.2942 | |
Freguesia | -22.7854 | -43.1642 | |
Vaz Lobo | -22.8604 | -43.3297 | |
Senador Camara | -22.9149 | -43.6856 | |
Miguel Couto | -22.7121 | -43.4357 | |
Cachambi | -22.8863 | -43.2796 | |
Engenho Novo | -22.9048 | -43.2655 | |
Bento Ribeiro | -22.8652 | -43.3576 | |
Jardim Sulacap | -22.8937 | -43.3966 | |
Nova Iguacu | -22.7599 | -43.4510 | |
Santa Teresa | -22.9162 | -43.1924 | |
Madureira | -22.8738 | -43.3426 | |
Cordovil | -22.8217 | -43.2976 | |
SantÍssimo | -22.8753 | -43.5265 | |
Cascadura | -22.8819 | -43.3313 | |
Sepetiba | -22.9691 | -43.7005 | |
Bras de Pina | -22.8323 | -43.3021 | |
Vista Alegre | -22.8300 | -43.3191 | |
Jacarepagua | -22.9351 | -43.3298 | |
Tijuca | -22.9362 | -43.2447 | |
Mesquita | -22.7824 | -43.4294 | |
Rocha Miranda | -22.8487 | -43.3500 | |
Vila Valqueire | -22.8808 | -43.3704 | |
Magalhaes Bastos | -22.8722 | -43.4159 | |
Marechal Hermes | -22.8690 | -43.3763 | |
Coelho Neto | -22.8351 | -43.3470 | |
Senador Camara | -22.9149 | -43.6856 | |
Vigario Geral | -22.8069 | -43.3049 | |
Parque Anchieta | -22.8374 | -43.3971 | |
Meier | -22.9041 | -43.2857 | |
Penha | -22.8412 | -43.2799 | |
Paciencia | -22.9168 | -43.6366 | |
Olaria | -22.8491 | -43.2663 | |
Pavuna | -22.8106 | -43.3712 | |
Vila da Penha | -22.8400 | -43.3091 | |
Bonsucesso | -22.8619 | -43.2573 | |
Flamengo | -22.9270 | -43.1735 | |
Ilha do Governador | -22.7939 | -43.1707 | |
Niteroi | -22.8807 | -43.1038 | |
Ramos | -22.8560 | -43.2594 | |
Pedra de Guaratiba | -22.9948 | -43.6298 | |
Colegio | -22.8384 | -43.3330 | |
Guaratiba | -22.9650 | -43.6470 | |
Honorio Gurgel | -22.8496 | -43.3568 | |
Jardim Carioca | -22.8075 | -43.1971 | |
Recreio dos Bandeirantes | -23.0115 | -43.4620 | |
Edem | -22.9118 | -43.2870 | |
Oswaldo Cruz | -22.9416 | -43.1771 | |
Engenho de Dentro | -22.9046 | -43.2942 | |
Piedade | -228864 | -43.3072 | |
Parada de Lucas | -22.8204 | -43.3061 | |
Tanque | -22.9136 | -43.3605 | |
Pechincha | -22.9286 | -43.3534 | |
Maracana | -22.9127 | -43.2265 | |
Copacabana | -22.9758 | -43.1896 | |
Itanhanga | -22.9844 | -43.3000 | |
Quintino Bocaiuva | -22.8842 | -43.3178 | |
Grajau | -22.9235 | -43.2575 | |
Valqueire | -22.9797 | -43.6874 | |
Penha Circular | -22.8319 | -43.2905 | |
Rio Comprido | -22.9288 | -43.2086 | |
Vila Real | -22.9767 | -43.1950 | |
Santa Cruz | -22.9358 | -43.6671 | |
Marechal Hermes | -22.9232 | -43.3388 | |
Inhauma | -22.8734 | -43.2795 | |
Oswaldo Cruz | -22.8810 | -43.3526 | |
Curicica | -22.9585 | -43.3868 | |
Riachuelo | -22.9022 | -43.2557 | |
Sao Cristovao | -22.9002 | -43.2303 | |
Paciencia | -22.9135 | -43.4485 | |
Andarai | -22.9184 | -43.2402 | |
Vigario Geral | -22.8069 | -43.3049 | |
Jardim Guanabara | -22.8091 | -43.2049 | |
Del Castilho | -22.8811 | -43.2669 | |
Agua Santa | -22.9046 | -43.3040 | |
Bairro de Fatima | -22.9767 | -43.1950 | |
Anil | -22.9518 | -43.3385 | |
Guaratiba | -22.9650 | -43.6470 | |
Vila Isabel | -22.9133 | -43.2519 | |
Pechincha | -22.9286 | -43.3534 | |
Higienopolis | -22.8779 | -43.2555 | |
Vila Militar | -22.8853 | -43.3983 | |
Praca Seca | -22.8976 | -43.3521 | |
Ilha do Governador | -22.9767 | -431950 | |
Tomaz Coelho | -22.9233 | -43.2375 | |
Cavalcante | -22.9963 | -43.4147 | |
Catumbi | -22.9860 | -43.2030 | |
Campinho | -22.8827 | -43.3458 | |
Magalhaes Bastos | -22.8722 | -43.4159 | |
Jardim America | -22.8148 | -43.3195 | |
Barra da Tijuca | -23.0109 | -43.3083 | |
Jagarepagua | -22.9479 | -43.3392 | |
Santo Cristo | -22.8999 | -43.2051 | |
Abolicao | -22.8854 | -43.2999 | |
Catete | -22.9306 | -43.1793 | |
Ipanema | -22.9844 | -43.2017 | |
Centro | -22.9106 | -43.1845 | |
Ricardo de Albuquerque | -22.8363 | -43.3909 | |
Cidade Nova | -22.9103 | -43.1999 | |
Gloria | -22.9188 | -43.1770 | |
Vargem Peguena | -22.9767 | -43.1950 | |
Vidigal | -22.9951 | -43.2350 | |
Jacaerpagua | -22.9767 | -43.1950 | |
Bento Ribeiro | -22.8652 | -43.3576 | |
Barra de Guaratiba | -23.03437 | -43.5622 | |
Mendanha | -22.84942 | -43.5437 | |
Leme | -22.96351 | -43.1740 | |
Todos os Santos | -22.88762 | -43.2849 | |
Leblon | -22.98427 | -43.2227 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name | lat | lon | |
---|---|---|---|
Brazil | -10 | -55 | |
Belem | -14.390 | -48.4980 | |
Belo Horizonte | -19.8520 | -43.9090 | |
Boa Vista | 28.180 | -60.6640 | |
Brasilia | -15.7921 | -47.8977 | |
Cuiaba | -15.6150 | -56.0930 | |
Curitiba | -25.4300 | -49.2850 | |
Fortaleza | -37.830 | -38.5890 | |
Goiania | -16.7270 | -49.2550 | |
Manaus | -31220 | -60.0150 | |
Natal | -58.060 | -35.2110 | |
Porto Alegre | -30.0400 | -51.2080 | |
Porto Velho | -87.620 | -63.9060 | |
Recife | -80850 | -34.9150 | |
Rio de Janeiro | -22.7216 | -43.4552 | |
Salvador | -12.9930 | -38.4810 | |
Santarem | -24.600 | -54.6100 | |
Santos | -23.9547 | -46.3095 | |
Sao Luis | -25.150 | -44.3010 | |
Sao Paulo | -23.5810 | -46.6230 |
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 1 column, instead of 6 in line 1.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PARA O MANAGING NEWS AS TABELAS DEVEM TER AS SEGUINTES COLUNAS | |
id, name, parent_id, parent, lat, lon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//*************************English Description***************************// | |
// Class to convert Latitude/Longitude Coordinates // | |
// Developed by: Diêgo Garrido de Almeida ([email protected]) // | |
// Location: Conselheiro Lafaiete - Minas Gerais / Brazil // | |
// License: None, this class can be used without credits // | |
// Recommended use: To convert the Google Earth standard coordinates // | |
// to Google Maps API standard coordinates, to do this, // | |
// use the method GeoConversao::DMS2Dd. // | |
// eg: $GeoConversao->DMS2Dd('45º22\'38"') -> 45.3772 // | |
// // | |
// // | |
// // | |
// Considerations: // | |
// D = Degrees // | |
// M = Minutes // | |
// S = Seconds // | |
// .m = Decimal Minutes // | |
// .s = Decimal Seconds // | |
// // | |
// DM.m (DMm) = Degrees, Minutes, Decimal Minutes (eg. 45o22.6333) // | |
// D.d (Dd) = Degrees, Decimal Degrees (eg. 45.3772o) // | |
// DMS (DMS) = Degrees, Minutes, Seconds (eg. 45o22'38") // | |
//***********************************************************************// | |
//**************************Descrição em Português*********************// | |
// Classe para conversão de coordenadas de Latitude e Longitude // | |
// Desenvolvida por: Diêgo Garrido de Almeida // | |
// Localização: Conselheiro Lafaiete - Minas Gerais / Brasil // | |
// Licença: Nenhuma, podendo ser alterada, sem necessidade de créditos // | |
// Utilização Recomendada: Conversão das Coordenadas do Google Earth // | |
// para a API do Google Maps para WEB, através // | |
// do Método GeoConversao::DMS2Dd // | |
// ex: $GeoConversao->DMS2Dd('45º22\'38"') -> 45.3772 // | |
// // | |
// Considerações: // | |
// D = Degrees (Degrais) // | |
// M = Minutes (Minutos) // | |
// S = Seconds (Segundos) // | |
// .m = Decimal Minutes (Décimos de Minuto) // | |
// .s = Decimal Seconds (Décimos de Segundo) // | |
// // | |
// DM.m (DMm) = Degrees, Minutes, Decimal Minutes (ex. 45o22.6333) // | |
// D.d (Dd) = Degrees, Decimal Degrees (ex. 45.3772o) // | |
// DMS (DMS) = Degrees, Minutes, Seconds (ex. 45o22'38") // | |
//*********************************************************************// | |
Class GeoConversao{ | |
var $negative = FALSE; | |
var $real = FALSE; | |
var $negative_path = ''; | |
private function is_negative(&$string) | |
{ | |
if($string[0] == '-'){ | |
$this->negative = TRUE; | |
$string = str_replace('-','',$string); | |
$this->negative_path = '-'; | |
} | |
$real = TRUE; | |
} | |
private function replace_special_chars(&$string,$decimal) | |
{ | |
for($I = 0 ; $I < strlen($string) ; $I++){ | |
$not_decimal = $decimal == FALSE ? ($string[$I] != '.') : TRUE; | |
if(!is_numeric($string[$I]) && $not_decimal && $string[$I] != ' '){ | |
$string[$I] = ';'; | |
} else if($string[$I] == ' ') { | |
$string[$I] = ''; | |
} | |
} | |
} | |
private function SepDMS($DMS) | |
{ | |
$this->replace_special_chars($DMS,FALSE); | |
$dados = explode(';',$DMS); | |
return array('D' => $dados[0],'M' => $dados[1],'S' => $dados[2]); | |
} | |
private function SepDMm($DMm) | |
{ | |
$this->replace_special_chars($DMm,TRUE); | |
$dados = explode(';',$DMm); | |
return array('D' => $dados[0],'M' => $dados[1],'m' => $dados[2]); | |
} | |
private function SepDd($Dd) | |
{ | |
$this->replace_special_chars($Dd,TRUE); | |
$dados = explode(';',$Dd); | |
return array('D' => $dados[0],'d' => $dados[1]); | |
} | |
public function DMS2DMm($DMS) | |
{ | |
$this->is_negative($DMS); | |
$array_DMm = array('D' => '','M' => '','m' => ''); | |
$array_DMS = $this->SepDMS($DMS); | |
$array_DMm['m'] = $array_DMS['S']/60; | |
$array_DMm['M'] = $array_DMS['M']; | |
$array_DMm['D'] = $array_DMS['D']; | |
return $this->negative_path.$array_DMm['D'].'º'.($array_DMm['M'] + $array_DMm['m']); | |
} | |
public function DMm2Dd($DMm) | |
{ | |
$this->is_negative($DMm); | |
$array_Dd = array('D' => '','d' => ''); | |
$array_DMm = $this->SepDMm($DMm); | |
$array_Dd['d'] = ($array_DMm['M'].'.'.$array_DMm['m'])/60; | |
$array_Dd['D'] = $array_DMm['D']; | |
return $this->negative_path.($array_Dd['D'] + $array_Dd['d']); | |
} | |
public function DMS2Dd($DMS) | |
{ | |
$this->is_negative($DMS); | |
$DMm = $this->DMS2DMm($DMS); | |
return $this->DMm2Dd($DMm); | |
} | |
public function DMm2DMS($DMm) | |
{ | |
$this->is_negative($DMm); | |
$array_DMS = array('D' => '', 'M' => '', 'S' => ''); | |
$array_DMm = $this->SepDMm($DMm); | |
$str_S = ((0).".".$array_DMm['m']) * 60; | |
$array_DMS['S'] = $str_S; | |
$array_DMS['M'] = $array_DMm['M']; | |
$array_DMS['D'] = $array_DMm['D']; | |
return $array_DMS['D'].'°'.$array_DMS['M'].'\''.$array_DMS['S'].'"'; | |
} | |
public function Dd2DMm($Dd) | |
{ | |
$this->is_negative($Dd); | |
$array_DMm = array('D' => '','M' => '','m' => ''); | |
$array_Dd = $this->SepDd($Dd); | |
$str_Mm = ((0).".".$array_Dd['d']) * 60; | |
$dados_Mm = explode(".",$str_Mm); | |
$array_DMm['m'] = $dados_Mm[1]; | |
$array_DMm['M'] = $dados_Mm[0]; | |
$array_DMm['D'] = $array_Dd['D']; | |
return $this->negative_path.$array_DMm['D']."º ".$array_DMm['M'].".".$array_DMm['m']; | |
} | |
public function Dd2DMS($Dd) | |
{ | |
$this->is_negative($Dd); | |
$DMm = $this->Dd2DMm($Dd); | |
return $this->DMm2DMS($DMm); | |
} | |
} | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name | lat | lon | |
---|---|---|---|
Brazil | -10 | -55 | |
Belem | -14.390 | -48.4980 | |
Belo Horizonte | -19.8520 | -43.9090 | |
Boa Vista | 28.180 | -60.6640 | |
Brasilia | -15.7921 | -47.8977 | |
Cuiaba | -15.6150 | -56.0930 | |
Curitiba | -25.4300 | -49.2850 | |
Fortaleza | -37.830 | -38.5890 | |
Goiania | -16.7270 | -49.2550 | |
Manaus | -31220 | -60.0150 | |
Natal | -58.060 | -35.2110 | |
Porto Alegre | -30.0400 | -51.2080 | |
Porto Velho | -87.620 | -63.9060 | |
Recife | -80850 | -34.9150 | |
Rio de Janeiro | -22.7216 | -43.4552 | |
Salvador | -12.9930 | -38.4810 | |
Santarem | -24.600 | -54.6100 | |
Santos | -23.9547 | -46.3095 | |
Sao Luis | -25.150 | -44.3010 | |
Sao Paulo | -23.5810 | -46.6230 | |
Engenho da Rainha | -22.8652 | -43.2946 | |
Padre Miguel | -22.8799 | -43.4498 | |
Iraja | -22.8400 | -43.3237 | |
Campo Grande | -22.8896 | -43.5598 | |
Guadalupe | -22.8326 | -43.3796 | |
Taquara | -22.9258 | -43.3737 | |
Laranjeiras | -22.9348 | -43.1880 | |
Botafogo | -22.9516 | -43.1840 | |
Bangu | -22.8671 | -43.4650 | |
Vicente de Carvalho | -22.8534 | -43.3144 | |
Benfica | -22.8898 | -43.2456 | |
Pilares | -22.8830 | -43.2962 | |
Santa Cruz | -22.9358 | -43.6671 | |
Realengo | -22.8741 | -43.4279 | |
Caxambi | -22.8507 | -43.3363 | |
Engenho de Dentro | -22.9046 | -43.2942 | |
Freguesia | -22.7854 | -43.1642 | |
Vaz Lobo | -22.8604 | -43.3297 | |
Senador Camara | -22.9149 | -43.6856 | |
Miguel Couto | -22.7121 | -43.4357 | |
Cachambi | -22.8863 | -43.2796 | |
Engenho Novo | -22.9048 | -43.2655 | |
Bento Ribeiro | -22.8652 | -43.3576 | |
Jardim Sulacap | -22.8937 | -43.3966 | |
Nova Iguacu | -22.7599 | -43.4510 | |
Santa Teresa | -22.9162 | -43.1924 | |
Madureira | -22.8738 | -43.3426 | |
Cordovil | -22.8217 | -43.2976 | |
SantÍssimo | -22.8753 | -43.5265 | |
Cascadura | -22.8819 | -43.3313 | |
Sepetiba | -22.9691 | -43.7005 | |
Bras de Pina | -22.8323 | -43.3021 | |
Vista Alegre | -22.8300 | -43.3191 | |
Jacarepagua | -22.9351 | -43.3298 | |
Tijuca | -22.9362 | -43.2447 | |
Mesquita | -22.7824 | -43.4294 | |
Rocha Miranda | -22.8487 | -43.3500 | |
Vila Valqueire | -22.8808 | -43.3704 | |
Magalhaes Bastos | -22.8722 | -43.4159 | |
Marechal Hermes | -22.8690 | -43.3763 | |
Coelho Neto | -22.8351 | -43.3470 | |
Senador Camara | -22.9149 | -43.6856 | |
Vigario Geral | -22.8069 | -43.3049 | |
Parque Anchieta | -22.8374 | -43.3971 | |
Meier | -22.9041 | -43.2857 | |
Penha | -22.8412 | -43.2799 | |
Paciencia | -22.9168 | -43.6366 | |
Olaria | -22.8491 | -43.2663 | |
Pavuna | -22.8106 | -43.3712 | |
Vila da Penha | -22.8400 | -43.3091 | |
Bonsucesso | -22.8619 | -43.2573 | |
Flamengo | -22.9270 | -43.1735 | |
Ilha do Governador | -22.7939 | -43.1707 | |
Niteroi | -22.8807 | -43.1038 | |
Ramos | -22.8560 | -43.2594 | |
Pedra de Guaratiba | -22.9948 | -43.6298 | |
Colegio | -22.8384 | -43.3330 | |
Guaratiba | -22.9650 | -43.6470 | |
Honorio Gurgel | -22.8496 | -43.3568 | |
Jardim Carioca | -22.8075 | -43.1971 | |
Recreio dos Bandeirantes | -23.0115 | -43.4620 | |
Edem | -22.9118 | -43.2870 | |
Oswaldo Cruz | -22.9416 | -43.1771 | |
Engenho de Dentro | -22.9046 | -43.2942 | |
Piedade | -228864 | -43.3072 | |
Parada de Lucas | -22.8204 | -43.3061 | |
Tanque | -22.9136 | -43.3605 | |
Pechincha | -22.9286 | -43.3534 | |
Maracana | -22.9127 | -43.2265 | |
Copacabana | -22.9758 | -43.1896 | |
Itanhanga | -22.9844 | -43.3000 | |
Quintino Bocaiuva | -22.8842 | -43.3178 | |
Grajau | -22.9235 | -43.2575 | |
Valqueire | -22.9797 | -43.6874 | |
Penha Circular | -22.8319 | -43.2905 | |
Rio Comprido | -22.9288 | -43.2086 | |
Vila Real | -22.9767 | -43.1950 | |
Santa Cruz | -22.9358 | -43.6671 | |
Marechal Hermes | -22.9232 | -43.3388 | |
Inhauma | -22.8734 | -43.2795 | |
Oswaldo Cruz | -22.8810 | -43.3526 | |
Curicica | -22.9585 | -43.3868 | |
Riachuelo | -22.9022 | -43.2557 | |
Sao Cristovao | -22.9002 | -43.2303 | |
Paciencia | -22.9135 | -43.4485 | |
Andarai | -22.9184 | -43.2402 | |
Vigario Geral | -22.8069 | -43.3049 | |
Jardim Guanabara | -22.8091 | -43.2049 | |
Del Castilho | -22.8811 | -43.2669 | |
Agua Santa | -22.9046 | -43.3040 | |
Bairro de Fatima | -22.9767 | -43.1950 | |
Anil | -22.9518 | -43.3385 | |
Guaratiba | -22.9650 | -43.6470 | |
Vila Isabel | -22.9133 | -43.2519 | |
Pechincha | -22.9286 | -43.3534 | |
Higienopolis | -22.8779 | -43.2555 | |
Vila Militar | -22.8853 | -43.3983 | |
Praca Seca | -22.8976 | -43.3521 | |
Ilha do Governador | -22.9767 | -431950 | |
Tomaz Coelho | -22.9233 | -43.2375 | |
Cavalcante | -22.9963 | -43.4147 | |
Catumbi | -22.9860 | -43.2030 | |
Campinho | -22.8827 | -43.3458 | |
Magalhaes Bastos | -22.8722 | -43.4159 | |
Jardim America | -22.8148 | -43.3195 | |
Barra da Tijuca | -23.0109 | -43.3083 | |
Jagarepagua | -22.9479 | -43.3392 | |
Santo Cristo | -22.8999 | -43.2051 | |
Abolicao | -22.8854 | -43.2999 | |
Catete | -22.9306 | -43.1793 | |
Ipanema | -22.9844 | -43.2017 | |
Centro | -22.9106 | -43.1845 | |
Ricardo de Albuquerque | -22.8363 | -43.3909 | |
Cidade Nova | -22.9103 | -43.1999 | |
Gloria | -22.9188 | -43.1770 | |
Vargem Peguena | -22.9767 | -43.1950 | |
Vidigal | -22.9951 | -43.2350 | |
Jacaerpagua | -22.9767 | -43.1950 | |
Bento Ribeiro | -22.8652 | -43.3576 | |
Barra de Guaratiba | -23.03437 | -43.5622 | |
Mendanha | -22.84942 | -43.5437 | |
Leme | -22.96351 | -43.1740 | |
Todos os Santos | -22.88762 | -43.2849 | |
Leblon | -22.98427 | -43.2227 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ins't this spam? Should it be blocked or banned or whatever?