-
-
Notifications
You must be signed in to change notification settings - Fork 339
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
3D models #2205
Comments
Can you post an example building, best with a screenshot? |
For example, the f4 map shows those things well, here an example location: https://demo.f4map.com/#lat=43.3668114&lon=-8.4205919&zoom=21&camera.theta=47.055&camera.phi=-4.896 if you compare it with streetcomplete, everything is the same height |
https://www.openstreetmap.org/relation/11696459 https://www.openstreetmap.org/way/853493334 for OSM objects. StreetComplete screenshot is missing for now |
The building itself is a multipolygon relation with
All the building parts are correct, though a building part for the building part that runs alongside Gregorio Hernandez is missing. f4-Map and OsmBuildings interpret this missing data differently. OsmBuildings concludes that then there can be no building, F4-Map concludes that then it must have also 4 building levels. @Joxit could this be a problem with the tiles? The data for the tiles look like this:
|
Hi there, So we chose to do this to determine the height:
This building has 4 levels... So the height will be 3 * 4 = 12. I don't know when polygon/multi polygon with
We do not do this because it could have a negative impact on the rendering time of our tiles. But we could still investigate and see the real impacts. |
Is it feasible to check for |
I will do some research/experiment on this |
Here is a performant point in polygon algorithm in case you are looking for one. It is the winding number algorithm. // Copyright 2000 softSurfer, 2012 Dan Sunday
// This code may be freely used and modified for any purpose
// providing that this copyright notice is included with it.
// SoftSurfer makes no warranty for this code, and cannot be held
// liable for any real or imagined damage resulting from its use.
// Users of this code must verify correctness for their application.
// http://geomalgorithms.com/a03-_inclusion.html
static boolean isPointInPolygon(Point p, Point[] v )
{
int wn = 0;
for (int j = 0, i = v.length-1; j < v.length; i = j++) {
if (v[i].y <= p.y) {
if(v[j].y > p.y) {
if (isLeft(v[i],v[j],p) > 0)
++wn;
}
} else {
if(v[j].y <= p.y) {
if (isLeft(v[i],v[j],p) < 0)
--wn;
}
}
}
return wn != 0;
}
private static long isLeft(Point p0, Point p1, Point p)
{
return (p1.x - p0.x) * (p.y - p0.y) - (p.x - p0.x) * (p1.y - p0.y);
} Though of course if you are going to do something like that, it doesn't matter how performant that algorithm is if you don't sort the buildings first into some kind of spatial data structure (i.e. "spatial index") like a quadtree or raster in order to reduce the number of PIP-checks you need to do. |
So anyway, I think it makes no sense to leave this issue open. There is nothing that can be done about that in this project. The map tile provider (Jawg) is informed about this problem, maybe they will do something about it, maybe they won't. I can very well understand if to fix this is not very high on JawgMaps' priority list, given that MapBox GL JS, a framework on which JawgMaps heavily relies on is no longer open source, they have other worries right now. |
Hi there, I hope you are doing well ! It's been a loooong time I know, 2021 was busy with partial satellite imagery and 2022 many stuff about geocoding and stuff I didn't write about it yet. Anyway, I had some time for this issue and I published a new version of our streets-v2 tileset. We should support more cases when there is an outline. I don't think we have a 100% coverage, but if we have 80% it's enough for me 😄 You may see a difference from 24h to 48h |
For the 3d building models you do represent the building:part if they are taller than the main building but if the building:part are lower or have fewer floors (levels) than the main building you do not represent it, it would be fine, I suppose it is something that does not cost a lot and does not affect performance, since they are already represented but not as they should...
Thanks!
The text was updated successfully, but these errors were encountered: