question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Closed paths with binary attributes and PathLayer

See original GitHub issue

Hi all, I was experimenting with switching my non-binary PolygonLayer’s over to using the binary PathLayer option with the _pathType property. I do see that property is still experimental so perhaps what I’m experiencing are already known issues…

Deck Version: 8.0.16 OS: Windows 10 Graphics Card: NVIDIA NVS 510 Browser: Chrome

With that said, I’m using the PathLayer to create a closed (i.e., last vertices same as first) polygon outline but am getting unexpected results when using the _pathType property.

Unless I’m mistaken, I’m assuming that if I set the _pathType to loop the path should be completely closed so long as I close the path. However, what I am seeing is a gap in the path; like it’s missing a small segment to close it.

If I set the _pathType to null then the path closes without issue. However, based on the docs this suggests I will miss out on gaining the full performance benefit of using the binary option as normalization won’t be skipped when _pathType is null.

I assume I am misunderstanding the _pathType options? Any clarification would be helpful…

Additionally, when I use a binary PathLayer on a decent size dataset (~1100 polygons with 120 point vertices) I get a spider web effect where the paths go all haywire. If I break up the data into smaller chunks (i.e., multiple binary PathLayer layers) or use a single non-binary PolygonLayer the spider web effect goes away.

Is there a limit to the number of vertices you can have in a binary PathLayer? If so, any recommendation on the size (i.e., number of vertices) to limit layers to?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7

github_iconTop GitHub Comments

3reactions
Pessimistresscommented, Mar 10, 2020

Are you using a Uint16Array as startIndices? Uint16’s max value is 65535.

1reaction
jfuehnercommented, Mar 11, 2020

face palm… That was it… Simply changing the startIndices typed array from Uint16 to Uint32 resolved the spider-web effect. I no longer have to chunk my dataset.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Closed paths with binary attributes and PathLayer · Issue #4345
With that said, I'm using the PathLayer to create a closed (i.e., last vertices same as first) polygon outline but am getting unexpected...
Read more >
PathLayer - deck.gl
Use binary attributes. This section is about the special requirements when supplying attributes directly to a PathLayer . Because each path has a...
Read more >
Wetland Connectivity Processing Steps - Index of /
Wetland path processes. Generate Cost Paths from each wetland outlet point to NHDPlus stream lines for each NLCD year; Fix duplicated PathIDs in ......
Read more >
PathLayer — pydeck 0.8.0b4 documentation - Read the Docs
Layer( type="PathLayer", data=df, pickable=True, get_color="color", width_scale=20, width_min_pixels=2, get_path="path", get_width=5, ) r = pdk.
Read more >
deck.gl | What's New
ArcLayer and LineLayer now render the shortest path with wrapLongitude: true . ... pydeck now uses the binary attribute API to communicate between...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found