forked from MapComplete/MapComplete
Better filtering of some LOD-properties
This commit is contained in:
parent
087c099e2e
commit
6b381e05c6
2 changed files with 80 additions and 53 deletions
|
@ -24,7 +24,8 @@ export default class LinkedDataLoader {
|
|||
image: { "@id": "http://schema.org/image", "@type": "@id" },
|
||||
opening_hours: { "@id": "http://schema.org/openingHoursSpecification" },
|
||||
openingHours: { "@id": "http://schema.org/openingHours", "@container": "@set" },
|
||||
geo: { "@id": "http://schema.org/geo" }
|
||||
geo: { "@id": "http://schema.org/geo" },
|
||||
"alt_name": {"@id":"http://schema.org/alternateName"}
|
||||
}
|
||||
private static COMPACTING_CONTEXT_OH = {
|
||||
dayOfWeek: { "@id": "http://schema.org/dayOfWeek", "@container": "@set" },
|
||||
|
@ -188,6 +189,11 @@ export default class LinkedDataLoader {
|
|||
compacted["geo"] = <any>await LinkedDataLoader.geoToGeometry(compacted["geo"])
|
||||
}
|
||||
|
||||
if(compacted["alt_name"]){
|
||||
if(compacted["alt_name"] === compacted["name"]){
|
||||
delete compacted["alt_name"]
|
||||
}
|
||||
}
|
||||
|
||||
for (const k in compacted) {
|
||||
if (compacted[k] === "") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue