Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple amenities in a single POI point #633

Open
rafleo2008 opened this issue Jun 15, 2020 · 4 comments
Open

Multiple amenities in a single POI point #633

rafleo2008 opened this issue Jun 15, 2020 · 4 comments

Comments

@rafleo2008
Copy link
Contributor

There is a possibility of having more than one amenity in a specific geographic point (like sports complex entry points/shopping mall doors) that groups different amenities. But, It is necessary to avoid to duplicate points. Therefore, a solution is needed.

One first approach is to group different amenities in a new array type column, but there are some issues when the new array type amenity column is implemented. In the score calculations, for example, is possible to match the amenity with a category, but it is not possible to get a double score when we have double matches. (like in thematic_data_sum). And the function will calculate only one value, even though when there are more values in the arrays.

A second approach could be to create an "unnest function" only for accessibility calculations and create "temporal points" only for the calculation process,
I am looking for a suitable approach.

@rafleo2008
Copy link
Contributor Author

Update:
Considering that we accept the duplicated points with one single amenity each(and same but duplicated geometry), one solution could be to "displace" the elements a little bit to manage to show both in the map, even with an overlap.

I did some testings with primary and secondary schools. First, I counted how many points are overlapped comparing geometries, and then assign a number to them. After that, according to that number, define a displacement in one specific direction, adding or subtracting 10 meters (used in the example) to each coordinate. This is better explained with this figure:
imagen

here, the original point is modified according to the assigned number.

In the real-life example,there is the case of the Grund und Mittelschule an der Toni-Pfülf Strasse. Here, the original points (blue) has been displaced to the positions 1 and 2.

imagen

Now I am dealing with the coordinates and the change of the geometry back in pois.

@EPajares
Copy link
Collaborator

This seems to be a good approach. I think we should make sure that the new geometries are still intersecting the building. Currently for the POIs derived from polygons we simply take the centroid. Usually this is fine but the issue comes with buildings that have holes. Maybe we could also make sure here to snap to the closest part of the polygon.

@rafleo2008
Copy link
Contributor Author

According to our last meeting, the approach has been changed to handle angles that vary according to the number of repeated entities. This new approach has been implemented and tested and will be added in the next PR.

This was referenced Nov 2, 2020
@UJehle
Copy link
Contributor

UJehle commented Nov 13, 2020

Hey @rafleo2008 @EPajares ,
I just checked the PR. I think it looks good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants