visgl / visgl/deck.gl

[Feat] MVTLayer Cartesian Coordinates

Open
#9,355 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
TypeScript
Stars
14.6k
Forks
2.3k
Avg merge
2d 9h
Merged PRs (30d)
42

Description

Target Use Case

MVTLayer incorrectly visualizes a vector tile dataset in Cartesian coordinates in OrthographicView.

https://codepen.io/s-n-i/pen/KwPeapW

I would like to make MVTLayer compatible with this use case.

Proposal

Changing the modelMatrix like this results in correct visualization:

https://github.com/s-n-i/deck.gl/commit/4cacc13111b6204430ce8f6445726d8c9f691216

https://codepen.io/s-n-i/pen/ZYzRLYX

I was wondering if MVTLayer is already intended to support Cartesian coordinates because it appears to infer a Cartesian coordinate system from !this.context.viewport.resolution in the source code here. If Cartesian coordinates are already intended to be supported, I can change this issue to a bug ticket.

https://github.com/visgl/deck.gl/blob/e9eada678c485520e0e63cff9436230ae7d34fa8/modules/geo-layers/src/mvt-layer/mvt-layer.ts#L268

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at modules/geo-layers/src/mvt-layer/mvt-layer.ts around line 268 and compare its coordinate-system handling with commit 4cacc13111b6204430ce8f6445726d8c9f691216. Use the linked CodePen examples to verify that MVTLayer renders Cartesian-coordinate vector tiles correctly in OrthographicView.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
data-visualization
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.