Comments (7)
It's also weird how it's the near corner that happens to be lower res on multiple tiles
from pymartini.
Ok lets debug this tile, in the central grand canyon: zxy
=12/772/1607.terrain
. Full Url:
https://us-east-1-lambda.kylebarron.dev/dem/mesh/12/772/1607.terrain?url=terrarium&mesh_max_error=18.82
At first glance, you might think the mesh max error of 18.82 is too high, but even if you reduce it to 5
, the near corner is still low-res
When visualized with quantized-mesh-viewer
, the corner is still low-res, so we can rule out a rendering issue. (Note that the mesh being upside down is expected since it's designed to be the same coordinates as a png in this case for use with deck.gl)
from pymartini.
To be blatantly obvious, it's clear that the actual topography of that section of the canyon is detailed, so there should be a more detailed mesh
from pymartini.
Swapping the Mapbox terrain source with Terrarium tiles, it's clear the Terrarium tiles aren't wrong.
from pymartini.
Bug looks to be in the rescale_positions
step. When I use
rescaled = rescale_positions(
vertices, tile, bounds=bounds, flip_y=flip_y, column_row=True)
I see the correct mesh, just rotated
When I use
rescaled = rescale_positions(
vertices, tile, bounds=bounds, flip_y=flip_y, column_row=False)
I see it in the "correct direction" (i.e. looking south (north?), which makes sense since I want it to be the same orientation as the PNG), but with incorrect mesh
from pymartini.
Ok so this is a bug in pymartini in rescale_positions
. Specifically, when you set column_row=False
you're using a different transposed matrix for the Martini errors step and for the terrain lookup step!
See how sparse the triangles are in the bottom right, but how there are so many in the flat area on the rim!
from pymartini.
So basically column_row
should always be True
so that you're using the same axis ordering for generating the mesh and the terrain lookup, and just add better documentation about whether a .T
is needed before passing the tile to pymartini.
from pymartini.
Related Issues (20)
- "Automated" tests against Martini
- Failing tests with lower max_error HOT 2
- Debug terrarium output HOT 2
- Terrain input not contiguous
- Skirting HOT 1
- Note numpy must be installed first HOT 1
- Allow decode_ele to take multiple numpy shapes
- Make backfilling optional for decode_ele
- Allow ndarray input to create_tile
- Add tests for rescale_positions
- Web-mercator latitude adjustment?
- Reshape indices/triangles output
- Add mypy
- IndexError: tuple index out of range HOT 4
- ValueError: Expected grid size to be 2^n+1, got 1441. HOT 1
- ValueError: cannot reshape array of size 90158 into shape (3) HOT 1
- TypeError: __init__(): incompatible constructor arguments. The following argument types are supported
- ValueError: Invalid number of dimensions for argument 'v_positions'. Expected 2 but got 1.
- AxisError: axis 1 is out of bounds for array of dimension 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pymartini.