add ask angela bordeaux et poitiers, fix exclusion on key not undefined

This commit is contained in:
Tykayn 2024-10-17 11:08:30 +02:00 committed by tykayn
parent 2348d4f3e6
commit 6c7ea998bd
3 changed files with 2886 additions and 5 deletions

View File

@ -207,7 +207,7 @@ function convertDataFromSource(sourceFilePath: string, mapping: MappingConfigTyp
// fix des jeux de données qui ne sont pas des geojson // fix des jeux de données qui ne sont pas des geojson
let properties_list:any = Object.keys(feature_point) let properties_list:any = feature_point.properties.tags
if(feature_point.geo_point_2d){ if(feature_point.geo_point_2d){
feature_point["type"] = "Feature" feature_point["type"] = "Feature"
@ -225,6 +225,7 @@ function convertDataFromSource(sourceFilePath: string, mapping: MappingConfigTyp
} }
} }
if(!feature_point["properties"]){ if(!feature_point["properties"]){
console.log('jeu de données sans properties à la base. On tente un mapping interne...')
let properties_list_to_move:any = Object.keys(feature_point) let properties_list_to_move:any = Object.keys(feature_point)
feature_point["properties"] = {} feature_point["properties"] = {}
@ -233,10 +234,22 @@ function convertDataFromSource(sourceFilePath: string, mapping: MappingConfigTyp
}) })
} }
properties_list?.forEach((tagKey: string, tagValue: string) => {
if (mapping.filters && mapping.filters.exclude_point_if_tag_not_empty?.indexOf(tagKey) !== -1 // debug sur un offset de 1 seul point
&& tagValue.length // console.log('properties_list', properties_list)
&& tagValue !== 'null') {
/**
* exclusion des points sur un filtrage exclude_point_if_tag_not_empty
* utile pour les analyses comportant des points déjà présents dans osm qui ont un id_osm par exemple.
*/
let properties_keys = Object.keys(properties_list)
properties_keys.forEach((tagKey: string) => {
let tagValue = properties_list[tagKey]
if (mapping.filters?.exclude_point_if_tag_not_empty?.indexOf(tagKey) !== undefined && tagValue && tagValue !== null) {
// console.log('la clé est elle présente dans les filtres d exclusion?', tagKey, mapping.filters?.exclude_point_if_tag_not_empty?.indexOf(tagKey))
// console.log('tagValue', tagValue)
// console.log('remove original' , tagKey )
remove_original_key = true; remove_original_key = true;
} }
}) })
@ -245,6 +258,9 @@ function convertDataFromSource(sourceFilePath: string, mapping: MappingConfigTyp
} }
/**
* filtre sur les départements selon la propriété consolidated_code_postal ou adresse_station
*/
if (enable_filter_on_department) { if (enable_filter_on_department) {
debugLog('filtre sur les départements activé') debugLog('filtre sur les départements activé')
regex_filter_test_result = ( regex_filter_test_result = (
@ -256,6 +272,9 @@ function convertDataFromSource(sourceFilePath: string, mapping: MappingConfigTyp
debugLog('pas de filtre sur les départements') debugLog('pas de filtre sur les départements')
} }
/**
* filtre sur un carré de coordonnées
*/
if (filterOnBoundingBox) { if (filterOnBoundingBox) {
debugLog('filtre sur les coordonnées bounding box activé') debugLog('filtre sur les coordonnées bounding box activé')

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,985 @@
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.340983,
46.581241
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "5xIqqD4w8sHvdFZcTRVlj"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.341059,
46.581164
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "m5Rw0tiHwZqRGNjt-Vmuo"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.343807,
46.582386
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "DUu2A3I_ZTKfJMrY_oYaW"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.344697,
46.582092
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "6VIbEiUgHIf45fjOeWk2i"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.340752,
46.58085
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "x0xACaGGKz4ZeyAkoIXE0"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.341423,
46.582338
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "vK8BU95lc708h1cipKD46"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.333024,
46.581552
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "uDhUgFlcC_xKJRvNkSEvR"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.346384,
46.582537
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "t_1jHsQj5RJ2pkhW4pIOR"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.345719,
46.582561
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "4ASpkKVKwqCn9nyLTbESn"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.345792,
46.582662
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "CvwqdxWTOtPIEng6yZvl8"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.343238,
46.582453
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "VBbcldjeUfYlGI6d9UaHr"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.344873,
46.582819
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "qIayggxEbUFiNWyKSl3dX"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.345219,
46.582775
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "bMpcEkgZCQvXPrb9K1pQ7"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.340942,
46.580862
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "8bDKryElT1SG3RtiDUaKE"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.334718,
46.582791
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "_62fbbTqBn6z1A8Rdk0o7"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.339916,
46.580662
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "e9J6kwPTwF89yu3IEbayy"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.344301,
46.584295
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "j-RVdv60dy-jw9tHUEw66"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.337101,
46.583617
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "ipRzuh3KW93MFlUZ4FAgr"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.341742,
46.583444
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "SfbyeRC5wejVwU5JckBn2"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.344331,
46.582844
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "hlE2yGz3ndp3WMigkhgfF"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.342215,
46.582319
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "gYYL2KCUdTK-D3U1xzS0k"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.340071,
46.579907
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "eGtd6WnR5ELYjZYpoovIG"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.34198,
46.582927
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "JaOqAhgRV5xcPt5uL_BIQ"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.341583,
46.583349
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "Ek2BAVxZw4HXC9H9lJXTy"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.345609,
46.582705
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "Gw-UCsZGfTtHiVp8h3bFL"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.340845,
46.581781
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "kcfdtifvBzEkA01oRUn6Z"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.341702,
46.58288
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "BrfiLMC8fQuFdSYbhtUWT"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.340963,
46.582065
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "krLXQUUCDxTpHO-eku_3c"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.340082,
46.581662
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "DAZmSW3NYBmSCKiXvkSz6"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.341468,
46.582408
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "X3M6okzwdJG32kXWRGhTb"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.341534,
46.580463
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "_b2tVIu5zfyA6HciJKUnf"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.345595,
46.582616
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "Y1VbGMCGdQFPah2rW7t4n"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.342755,
46.583456
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "7VP_kjQNOHop_SSS2uJXw"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.343115,
46.582516
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "naoutEMW6IgEYXxyVsl_Q"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.343001,
46.583382
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "X00zJJ7Qe-sjxDtWmsgdQ"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.338954,
46.579375
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "cso69bcCIf0OCS36a8RcW"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.339287,
46.579814
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "sddroS3kXSQHHUxiLXTrR"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.341101,
46.579789
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "qLjL6p2BTiJwPceFEO9cP"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.378139,
46.574384
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "1bHdXJfqzOfe6UqrDbQ_9"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.323907,
46.590319
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "B8WOs5xVWKfAoveIqV6Xn"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.312367,
46.565861
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "aXb-gP1-fsKmwCAMeQ-02"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.360724,
46.588644
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "kNKYvnx-Wq3-4mxQC0Gw1"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.38297,
46.589976
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "f9WeVOuv2Iq_e-K-rRp4m"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.343056,
46.566858
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "uZcrEX7gssGDQ-PGFFyH2"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.36869,
46.56619
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "hHt08Y2_S1lKOn6vowu79"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.34281,
46.58941
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "fSdW8Ao_v6rLvrZ3gMYrl"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.345314415707848,
46.6083116761172
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "fUsgYYV_qMtdRGVq-poAZ"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.34603097843623,
46.5791672937988
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "HkYMGFWY2UWbNhI8WW_oZ"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.361246746257053,
46.5901079733998
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "5iCQh9OlG05VEKTCuDtfk"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.3589,
46.58621
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "wRbE5Z6nNVBn0yzkFw6S-"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.365141642493461,
46.5920960041224
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "lLThHzT1HVMm1fVxzvWqX"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.365598591755046,
46.5890680301989
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "EAvVooCu_CtN3MOaKfkr_"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.380059980442726,
46.5906072814057
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "o6a_OmG4qfhZlhkc4VN9I"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.3132,
46.56613
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "zsjmEr1VZJuWMVTexRX_P"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.34276,
46.58417
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "0owwaOvZx7CP2Iyq8fVjq"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.32181,
46.59196
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "v8ryX84MdNb1o4GV-r9P_"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.35659,
46.58917
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "gw4LhvjZtSqVhQDK-xE9I"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.31205,
46.5664
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "wx1UyI7jeDY9fk8gWizmw"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.34285,
46.5668
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "e-SnsWGSCZh_jFBP3QwU3"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.38283,
46.59002
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "4J4XJR8ijXUqTdFRBCfvb"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.358408,
46.58692
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "J_wVe5LhZrr4p-_UAT6yc"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.383301954047633,
46.5754104324705
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "ckhfKk9yEceT7IcUjZ3Ra"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.342514,
46.58345
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "NCk15j1f2YsIOU3hs4yDa"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.345305,
46.583559
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "AAn3Ce4Ou07hqxRTo7Q7A"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.34476,
46.583043
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "GI9puDraU3uFW3fhTAVlZ"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.345196,
46.583472
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "yB7373PF99G-hKWl_lT76"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.342195,
46.584309
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "92yDLC0TyNb6ohJVin_7V"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.34164,
46.584202
]
},
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "NX6BrqR7_0OUbD8_9EMBU"
}
},
{
"type": "Feature",
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "Y1pA8f7EUbS3apTgHBPWS"
}
},
{
"type": "Feature",
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "0IQqSAgItLcS-Rp2o_Z7M"
}
},
{
"type": "Feature",
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "jFeVGCHXZkejM2xvAGeE8"
}
},
{
"type": "Feature",
"properties": {
"harassment_prevention": "ask_angela",
"ref:FR:Poitiers:ask_angela_id": "YPfwgUSO4vURygziKwDDm"
}
}
]
}