Skip to content
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

Add progress to parseShapefileInBatches. #2073

Closed
wants to merge 1 commit into from

Conversation

nickpeihl
Copy link

Based on the work in #1105. This modifies zipBatchIterators to return an object with keys progress and data rather than an array so we can return parsing progress for the parseShapefileInBatches function.

This will be useful for returning a progress indicator in a UI when loading large shapefiles.

This modifies `zipBatchIterators` to return an object with keys `progress` and `data` rather than an array.
@@ -1,3 +1,8 @@
type Batch = {
data: number[] | number[][];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the union? Seems like you'd only need one type?

return null;
}

// Non interleaved arrays
const batch: number[][] = [batch1.slice(0, batchLength), batch2.slice(0, batchLength)];
const result: any = {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be result: Batch?

@kylebarron kylebarron mentioned this pull request Mar 8, 2022
@nickpeihl
Copy link
Author

I'm grooming my backlog and closing stale PRs.

@nickpeihl nickpeihl closed this May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants