Ignorar pontos do ficheiro do OpenAddresses
jfoclpf opened this issue · 0 comments
jfoclpf commented
Adicionar uma função aqui
https://github.com/jfoclpf/geoapi.pt/blob/main/routines/commons/fetchAddresses.js
Que elimine pontos errados ou outliers
Os pontos devem constar num ficheiro ignoreAddresses.json
na mesma pasta.
Este JSON será um Array de objetos, cada objeto contendo as chaves fid,id
e basta que uma dessas chaves corresponda a um valor encontrado no ficheiro original, que esse ponto será expurgado do processamento posterior.
Neste momento temos estes pontos fornecidos pelo @pinanunes Telmo
fid,id,street,house,postcode,city,lon,lat
"2600375",pt.ine.add.PTCONT.3157276,ICOR-ALOJAMENTO FICTICIO,,1000-043,LISBOA,-9.13703969385492,38.7386227381695
"2600417",pt.ine.add.PTCONT.3157277,ICOR-ALOJAMENTO FICTICIO,,1000-043,LISBOA,-9.13703969385492,38.7386227381695
"2600777",pt.ine.add.PTCONT.3157278,ICOR-ALOJAMENTO FICTICIO,,1000-043,LISBOA,-9.13703969385492,38.7386227381695
"2601125",pt.ine.add.PTCONT.3157279,ICOR-ALOJAMENTO FICTICIO,,1000-043,LISBOA,-9.13703969385492,38.7386227381695
"2601167",pt.ine.add.PTCONT.3157551,R ALVIDE,"960",2755-315,ALCABIDECHE,-9.13703969385492,38.7386227381695
"2659880",pt.ine.add.PTCONT.3157282,ICOR-ALOJAMENTO FICTICIO,,1000-043,LISBOA,-9.13703969385492,38.7386227381695
"2659881",pt.ine.add.PTCONT.3157283,ICOR-ALOJAMENTO FICTICIO,,1000-043,LISBOA,-9.13703969385492,38.7386227381695
"2659882",pt.ine.add.PTCONT.3157284,ICOR-ALOJAMENTO FICTICIO,,1000-043,LISBOA,-9.13703969385492,38.7386227381695
"2660234",pt.ine.add.PTCONT.3157285,ICOR-ALOJAMENTO FICTICIO,,1000-043,LISBOA,-9.13703969385492,38.7386227381695
"2660426",pt.ine.add.PTCONT.3157286,ICOR-ALOJAMENTO FICTICIO,,1000-043,LISBOA,-9.13703969385492,38.7386227381695
"2660484",pt.ine.add.PTCONT.3157287,ICOR-ALOJAMENTO FICTICIO,,1000-043,LISBOA,-9.13703969385492,38.7386227381695
"2660769",pt.ine.add.PTCONT.3157288,ICOR-ALOJAMENTO FICTICIO,,1000-043,LISBOA,-9.13703969385492,38.7386227381695
"2660846",pt.ine.add.PTCONT.3157289,ICOR-ALOJAMENTO FICTICIO,,1000-043,LISBOA,-9.13703969385492,38.7386227381695
"2660847",pt.ine.add.PTCONT.3157290,ICOR-ALOJAMENTO FICTICIO,,1000-043,LISBOA,-9.13703969385492,38.7386227381695
"2660848",pt.ine.add.PTCONT.3157291,ICOR-ALOJAMENTO FICTICIO,,1000-043,LISBOA,-9.13703969385492,38.7386227381695
"2660849",pt.ine.add.PTCONT.3157292,ICOR-ALOJAMENTO FICTICIO,,1000-043,LISBOA,-9.13703969385492,38.7386227381695
"2660850",pt.ine.add.PTCONT.3157293,ICOR-ALOJAMENTO FICTICIO,,1000-043,LISBOA,-9.13703969385492,38.7386227381695
"2660871",pt.ine.add.PTCONT.3157294,ICOR-ALOJAMENTO FICTICIO,,1000-043,LISBOA,-9.13703969385492,38.7386227381695
"2661066",pt.ine.add.PTCONT.3157295,ICOR-ALOJAMENTO FICTICIO,,1000-043,LISBOA,-9.13703969385492,38.7386227381695
"2661165",pt.ine.add.PTCONT.3157296,ICOR-ALOJAMENTO FICTICIO,,1000-043,LISBOA,-9.13703969385492,38.7386227381695
"2661262",pt.ine.add.PTCONT.3157297,ICOR-ALOJAMENTO FICTICIO,,1000-043,LISBOA,-9.13703969385492,38.7386227381695
"2661338",pt.ine.add.PTCONT.3157298,ICOR-ALOJAMENTO FICTICIO,,1000-043,LISBOA,-9.13703969385492,38.7386227381695
"2670239",pt.ine.add.PTCONT.3155328,ICOR-ALOJAMENTO FICTICIO,,1000-043,LISBOA,-9.13703969385492,38.7386227381695
"2670807",pt.ine.add.PTCONT.3157274,ICOR-ALOJAMENTO FICTICIO,,1000-043,LISBOA,-9.13703969385492,38.7386227381695
"2670836",pt.ine.add.PTCONT.3157280,ICOR-ALOJAMENTO FICTICIO,,1000-043,LISBOA,-9.13703969385492,38.7386227381695
"2670911",pt.ine.add.PTCONT.3157275,ICOR-ALOJAMENTO FICTICIO,,1000-043,LISBOA,-9.13703969385492,38.7386227381695
"2670964",pt.ine.add.PTCONT.3157281,ICOR-ALOJAMENTO FICTICIO,,1000-043,LISBOA,-9.13703969385492,38.7386227381695
"2670969",pt.ine.add.PTCONT.3157273,ICOR-ALOJAMENTO FICTICIO,,1000-043,LISBOA,-9.13703969385492,38.7386227381695
"2670986",pt.ine.add.PTCONT.3157532,AV DIOGO CÃO,"18",2835-203,VALE DA AMOREIRA,-9.13703969385492,38.7386227381695
"2670993",pt.ine.add.PTCONT.3157531,R SÃO BENTO,"510",1250-221,LISBOA,-9.13703969385492,38.7386227381695
"2670994",pt.ine.add.PTCONT.3157533,R CIDADE DE SETÚBAL,,2975-220,QUINTA DO CONDE,-9.13703969385492,38.7386227381695
"2670995",pt.ine.add.PTCONT.3157534,PCT MALMEQUERES,,1685-878,FAM,-9.13703969385492,38.7386227381695
"2670996",pt.ine.add.PTCONT.3157535,AV MARIA HELENA VIEIRA DA SILVA,"8",1750-182,LISBOA,-9.13703969385492,38.7386227381695
"2670997",pt.ine.add.PTCONT.3157536,AV �LVARO PAIS,,1600-007,LISBOA,-9.13703969385492,38.7386227381695
"2670998",pt.ine.add.PTCONT.3157538,LG CONDE OTTOLINI,"2",1500-201,LISBOA,-9.13703969385492,38.7386227381695
"2670999",pt.ine.add.PTCONT.3157539,R MANUEL DE ARRIAGA,"3",2620-319,RAMADA,-9.13703969385492,38.7386227381695
"2671000",pt.ine.add.PTCONT.3157540,R SOCIEDADE FARMACÊUTICA,"21",1150-337,LISBOA,-9.13703969385492,38.7386227381695
"2671001",pt.ine.add.PTCONT.3157541,PCT FERNÃO LOPES CASTANHEDA,"3",2810-336,ALMADA,-9.13703969385492,38.7386227381695
"2671002",pt.ine.add.PTCONT.3157542,R VIRG�LIO MARTINHO,"10",2810-419,ALMADA,-9.13703969385492,38.7386227381695
"2671003",pt.ine.add.PTCONT.3157543,R VICENTE DIAS,"12",1400-358,LISBOA,-9.13703969385492,38.7386227381695
"2671004",pt.ine.add.PTCONT.3157544,R DO GRAJAL,"19",2735-617,AGUALVA-CAC,-9.13703969385492,38.7386227381695
"2671005",pt.ine.add.PTCONT.3157545,AV VASCO DA GAMA FERNANDES,"7",2685-330,PRIOR VELHO,-9.13703969385492,38.7386227381695
"2671006",pt.ine.add.PTCONT.3157546,AV DA LIBERDADE,"23",2620-318,RAMADA,-9.13703969385492,38.7386227381695
"2671007",pt.ine.add.PTCONT.3157547,AL ALTO DA BARRA,"5",2780-180,OEIRAS,-9.13703969385492,38.7386227381695
"2671008",pt.ine.add.PTCONT.3157548,AV NAT�LIA CORREIA,,2955-098,PINHAL NOVO,-9.13703969385492,38.7386227381695
"2671009",pt.ine.add.PTCONT.3157549,R GARCIA DE ORTA,"586",2975-275,QUINTA DO CONDE,-9.13703969385492,38.7386227381695
"2671010",pt.ine.add.PTCONT.3157550,R LU�S DE CAMÕES,"28",2855-469,CORROIOS,-9.13703969385492,38.7386227381695
"2671011",pt.ine.add.PTCONT.3157552,R ALMIRANTE REIS,"2",2855-407,CORROIOS,-9.13703969385492,38.7386227381695
"2671012",pt.ine.add.PTCONT.3157553,AV ENG ARANTES DE OLIVEIRA,"23",1900-221,LISBOA,-9.13703969385492,38.7386227381695
"2671013",pt.ine.add.PTCONT.3157554,R ALMADA NEGREIROS,"24",2650-423,AMADORA,-9.13703969385492,38.7386227381695
"2671014",pt.ine.add.PTCONT.3157555,PCT DAS COMUNIDADES LUS�ADAS,"10",2735-093,AGUALVA-CAC,-9.13703969385492,38.7386227381695
"2671015",pt.ine.add.PTCONT.3157556,R GUARDA-JÓIAS,"16",1300-293,LISBOA,-9.13703969385492,38.7386227381695
"2671016",pt.ine.add.PTCONT.3157557,R ALTO DO CARVALHÃO,"17",1070-048,LISBOA,-9.13703969385492,38.7386227381695
"2671017",pt.ine.add.PTCONT.3157558,PCT �LVARO CAVALHEIRO,"1",2840-489,SEIXAL,-9.13703969385492,38.7386227381695
"2671018",pt.ine.add.PTCONT.3157559,R FRANCISCO ANTÓNIO DE ALMEIDA,,2865-282,FERN,-9.13703969385492,38.7386227381695
"2671019",pt.ine.add.PTCONT.3157560,AV DE S. JOSÉ,"8",2685-108,SACAVAM,-9.13703969385492,38.7386227381695
"2671020",pt.ine.add.PTCONT.3157561,AV WENCESLAU BALSEIRO GUERRA,"145",2775-313,PAREDE,-9.13703969385492,38.7386227381695
"2671021",pt.ine.add.PTCONT.3157562,R GONÇALVES LOBATO,"2",2720-264,AMADORA,-9.13703969385492,38.7386227381695
"2671022",pt.ine.add.PTCONT.3157563,ESTR DA SERRA DA MIRA,"31",2700-789,AMADORA,-9.13703969385492,38.7386227381695
"2671023",pt.ine.add.PTCONT.3157564,R HELENA S� E COSTA,"13",2820-698,CHARNECA DA CAPARICA,-9.13703969385492,38.7386227381695
"2671024",pt.ine.add.PTCONT.3157565,AV 1º DE MAIO,"124",2840-547,ALDEIA DE PAIO PIRES,-9.13703969385492,38.7386227381695
"2671025",pt.ine.add.PTCONT.3157566,AV INFANTE D. AUGUSTO,"36",2845-115,AMORA,-9.13703969385492,38.7386227381695
"2671026",pt.ine.add.PTCONT.3157567,R VIEIRA DA SILVA,"12",2675-216,ODIVELAS,-9.13703969385492,38.7386227381695
"2671027",pt.ine.add.PTCONT.3157568,R SANTO ANTÓNIO DA BOLONHA,"17",2625-249,P4VOA DE SANTA IRIA,-9.13703969385492,38.7386227381695
"2671028",pt.ine.add.PTCONT.3157569,R LU�S DE CAMÕES,,2865-601,FERN,-9.13703969385492,38.7386227381695
"2671029",pt.ine.add.PTCONT.3157570,R LAURA AYRES,,2660-293,SANTO ANT NIO CAVALEIROS,-9.13703969385492,38.7386227381695
"2671030",pt.ine.add.PTCONT.3157571,R 1º DE MAIO,"32",1885-067,MOSCAVIDE,-9.13703969385492,38.7386227381695
"2671031",pt.ine.add.PTCONT.3157572,LG DE SANTO ANTÓNIO,"4",2665-001,AZUEIRA,-9.13703969385492,38.7386227381695
"2671032",pt.ine.add.PTCONT.3157573,R DE SÃO CRISTÓVÃO,"365",1685-820,FAM,-9.13703969385492,38.7386227381695
"2671033",pt.ine.add.PTCONT.3157574,R CIDADE DE BRASILIA,"3",2735-655,AGUALVA-CAC,-9.13703969385492,38.7386227381695
"2671034",pt.ine.add.PTCONT.3157575,R GENERAL JOSÉ CELESTINO DA SILVA,"6",1500-309,LISBOA,-9.13703969385492,38.7386227381695
"2671035",pt.ine.add.PTCONT.3157576,R ELVIRA VELEZ,"289",2785-028,S2O DOMINGOS DE RANA,-9.13703969385492,38.7386227381695
"2671036",pt.ine.add.PTCONT.3157577,R ANTÓNIO ALÇADA BAPTISTA,"6",1500-911,LISBOA,-9.13703969385492,38.7386227381695
"2671037",pt.ine.add.PTCONT.3157578,R SEVERIANO FALCÃO,"10",2660-532,SANTO ANTOO DO TOJAL,-9.13703969385492,38.7386227381695
"2671038",pt.ine.add.PTCONT.3157579,R ENG JOSÉ FREDERICO ULRICH,"41",2795-113,LINDA A VELHA,-9.13703969385492,38.7386227381695
"2671039",pt.ine.add.PTCONT.3157580,PCT ANTÓNIO JOSÉ DA SILVA,"3",2675-228,ODIVELAS,-9.13703969385492,38.7386227381695
"2671040",pt.ine.add.PTCONT.3157581,AV LU�S S�,"15",2700-181,AMADORA,-9.13703969385492,38.7386227381695
"2671041",pt.ine.add.PTCONT.3157582,R DO CONDE REDONDO,"9",1150-101,LISBOA,-9.13703969385492,38.7386227381695
"2671042",pt.ine.add.PTCONT.3157583,R DOS ABETOS,,2975-108,QUINTA DO CONDE,-9.13703969385492,38.7386227381695
"2671043",pt.ine.add.PTCONT.3157584,R DOS HERDEIROS,,2825-048,CAPARICA,-9.13703969385492,38.7386227381695
"2671044",pt.ine.add.PTCONT.3157585,R SOUSA TAVARES,"5",2780-204,OEIRAS,-9.13703969385492,38.7386227381695
"2671045",pt.ine.add.PTCONT.3157586,R DO CARRASCAL,"275",2755-101,ALCABIDECHE,-9.13703969385492,38.7386227381695
"2671046",pt.ine.add.PTCONT.3157587,R FREDERICO GEORGE,"29",1600-468,LISBOA,-9.13703969385492,38.7386227381695
"2671047",pt.ine.add.PTCONT.3157588,ESCNH DA CORVINA,"16",2825-832,TRAFARIA,-9.13703969385492,38.7386227381695
"2671048",pt.ine.add.PTCONT.3157589,R DR. MARQUES DA MATA,"175",2775-608,CARCAVELOS,-9.13703969385492,38.7386227381695
"2671049",pt.ine.add.PTCONT.3157590,R DOM LU�S DE CASTRO,"2",2790-188,CARNAXIDE,-9.13703969385492,38.7386227381695
"2671050",pt.ine.add.PTCONT.3157591,R JOÃO CHAGAS,"8",1500-493,LISBOA,-9.13703969385492,38.7386227381695
"2671051",pt.ine.add.PTCONT.3157592,R DA CRUZ A ALCÂNTARA,"30",1300-159,LISBOA,-9.13703969385492,38.7386227381695
"2671052",pt.ine.add.PTCONT.3157593,R LU�S S�,,2625-731,VIALONGA,-9.13703969385492,38.7386227381695
"2671053",pt.ine.add.PTCONT.3157594,R HENBRIQUES LOPES MENDONÇA,"3",1495-692,CRUZ QUEBRADA-DAFUNDO,-9.13703969385492,38.7386227381695
"2671054",pt.ine.add.PTCONT.3157595,R MARIANA VILAR,"1",1600-220,LISBOA,-9.13703969385492,38.7386227381695
"2671055",pt.ine.add.PTCONT.3157596,R GUERRA JUNQUEIRO,10 B,2660-266,SANTO ANT NIO CAVALEIROS,-9.13703969385492,38.7386227381695
"2671056",pt.ine.add.PTCONT.3157597,R ALTO DOS MO�NHOS,"6",1500-459,LISBOA,-9.13703969385492,38.7386227381695
"2671057",pt.ine.add.PTCONT.3157598,R SABINO DE SOUSA,"40",1900-397,LISBOA,-9.13703969385492,38.7386227381695
"2671058",pt.ine.add.PTCONT.3157599,R 25 DE ABRIL,"3",2695-788,S8O JOLO DA TALHA,-9.13703969385492,38.7386227381695
"2671059",pt.ine.add.PTCONT.3157600,R TERESA BORGES PORTA 3,,2830-106,BARREIRO,-9.13703969385492,38.7386227381695
"2751654",pt.ine.add.PTCONT.3450328,ICOR-ALOJAMENTO FICTICIO,,1000-043,LISBOA,-9.13703969385492,38.7386227381695
"2751655",pt.ine.add.PTCONT.3450329,ICOR-ALOJAMENTO FICTICIO,,1000-043,LISBOA,-9.13703969385492,38.7386227381695
"2751753",pt.ine.add.PTCONT.3450747,R DA CORDOARIA,"44",2845-054,AMORA,-9.13703969385492,38.7386227381695
"2751754",pt.ine.add.PTCONT.3450748,LG DAS ANDORINHAS,"14",2670-409,LOURES,-9.13703969385492,38.7386227381695
@joao se quiseres adicionar alguns pontos, também és muito bem vindo