BONSAMURAIS / schema

Relational database schemas for BONSAI
BSD 3-Clause "New" or "Revised" License
0 stars 2 forks source link

smarter locations #24

Open BenPortner opened 4 years ago

BenPortner commented 4 years ago

Right now, entries in the location table are countries according to https://www.geonames.org/countries/. This won't do for the future. Here are two problematic examples:

1) ecoinvent RoW activities are not countries. If anything they are logical expressions of the scheme "world minus region x, y, z"

2) regional LCA can demand locations on sub-country or cross-country scale

How to deal with this? I think we need GIS. Maybe @cmutel has some advice on this based on bw_regional?

cmutel commented 4 years ago

A few thoughts, as someone with some experience in this area:

We would then have a separate repo with a PostGIS database which would store the actual GIS info for all locations used in Bonsai. Such separation of concerns is very much in the philosophy of Bonsai.

BenPortner commented 4 years ago

@cmutel

There is nothing in the schema limiting location entries to only be countries.

That's true. But the given entries don't give any clue how to implement non-country locations.

"RoW" locations were a mistake. I am strongly opposed to including this concept in Bonsai. We never have real data for "RoW" in any case, just global or country-specific data.

I agree that there should be no RoW in bonsai. But there is RoW in ecoinvent. If we want to include ecoinvent in Bonsai we will have to find a way to translate from ecoinvent to bonsai. And that means we will have entries like "world minus region x, y, z"

It would be much simpler to store a correspondence table, as we do for activities and flow_objects, for geographical relations (e.g. inside, overlaps, contains).

First time I hear about correspondence tables in this context. Can you provide an example?