Open lucas-abbate opened 2 years ago
Have a look at https://github.com/pelias/interpolation
Isn't that what I've done when installing Pelias??
Pelias is composed of several smaller components, the interpolation service is a SQLite database which is built independently of the elasticsearch index.
So while the interpolation database preserves the side of the street (what is called 'parity' in the SQLite database) it's not exposed to other services as this requirement has never been requested before.
If you have installed Pelias using the pelias/docker
utility then you will find the address.db
and street.db
SQLite databases in your configured DATA_DIR
.
I recommend you have a look in the address.db
as it likely has the information you require.
Out of curiosity; how do you define 'left' and 'right'? We base it on the bearing from the start point to the end point of the linestring, but this can obviously be reversed and therefore return the opposite classification, do you have a suggestion of how best to normalize this?
I've seen the parity thing. Is there a way to find out on whick side the linestring starts and then define left or right? Maybe the linestrings could be arbitrarily defaulted to start always on the same side (i.e, the southern dot of the linestring is always the start). Then, all left or right side could be normalized (but I don't know if it is possible to arbitrarily define the starting point of the linestring). Anyways. Thanks for the help!
No problem, please close this issue if you found a solution.
Like you mentioned, you could (for instance) select the most southerly point as the starting point, it would make the calculation deterministic but I don't think that would guarantee that Argentine addresses are given the correct parity.
I was wondering if the Argentinian authority has some sort of official policy in this regard about which is the start and the end of a street?
Use-cases
Our team wants to categorize houses according to their census tract, based on the people's address. Most census tracts (at least in Argentina's big cities) are defined by 2 o 3 squares and use streets as delimiters. Therefore, being able to determine on which side of the street a house is is key.
Proposal
I don't even know if it is possible to return the side of the road based on the address, but in Argentina (and I think in some other countries too), one side of a street is even while the other is odd. Also, other geocoders like Nominatim (or Google Maps), returns the coordinates on the correct side of the street.
(the yellow dots are extracted from Nominatim, the red ones from Pelias, and the green lines are the census tracts. There are fewer because we are still running our queries, but by checking their info, some should be on a side and the rest on the other).
Thanks for the attention and sorry for the poor english :)