-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[Bug] 2D object is smaller than 3D on the map #9162
Comments
Does it work if in QGIS you use Cartesian instead of Ellipsoidal? |
I work in EPSG:3857 Pseudo-Mercator so cartesian gives me irrelevant 3385 meters. If I change QGIS CRS to, let's say, WGS_1984_Complex_UTM_Zone_30N (ESRI:102580), Cartesian measurement on this object gives 2000.00 meters. Anyway, it is nowhere near the difference mentioned above. |
By the way, using Turf.js I measured distance between [ -5.280356221393128, 53.86928337707964 ] and [ -5.249963734890388, 53.869857228664557 ] and got ~1993.65 meters. This seems like something very close to what I see. Can this be any helpful? |
Yes, I believe that is the difference you see. |
Is there a way to avoid this behaviour when 2d and 3d object differ in size in Deck? |
What exactly is the bug you are reporting here? The GeoJSON you supply is smaller than the mesh and the rendering result is true to the data. |
Trying to go deeper I found a clue in Postgis docs. It seems desktop GIS applications work with spheroids and web applications work with spheres so the same data gives different result. But 3D model in the scenegraph layer was generated in different, cartesian environment. So my question would be: is it possible to somehow bring all my data into line so they would be the same on the deck map? |
@yaras-phoenix Your model data in 3D tiles might be in meter offsets where each tile has a lng/lat anchor. You could try to hook into the tile loading and use something like |
More precisely the lng/lat anchor is probably calculated by loaders.gl from the WGS84 world centric coordinates, you might also be able to access the WGS84 "anchor" coordinates in the loaded tile and reproject directly from those. |
Description
Flavors
Expected Behavior
No response
Steps to Reproduce
Using codepens from deck.gl GeoJSON layer and Scenegraph layer docs made my own here.
Links to sample objects (JSON and GLB) are attached in the code.
Environment
Logs
No response
The text was updated successfully, but these errors were encountered: