-
Notifications
You must be signed in to change notification settings - Fork 0
Polaris support #3
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
base: tom/add-aeq-support
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request adds support for the POLARIS (Planning and Operations Language for Agent-based Regional Integrated Simulation) transportation modeling system to SimWrapper. The integration enables visualization of POLARIS model outputs including spatial data from SQLite databases.
Key Changes:
- New plugin architecture for POLARIS with database caching and memory management
- Support for multiple database types (supply, demand, result) with cross-database querying
- Data-driven styling system with color encoding and filtering capabilities
- Vue component for rendering POLARIS visualizations with legend support
Reviewed changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| src/plugins/polaris/usePolaris.ts | Core utilities for data loading with memory optimization and loading queue management |
| src/plugins/polaris/types.ts | TypeScript type definitions for POLARIS configurations and data structures |
| src/plugins/polaris/styling.ts | Styling system for data-driven visualization with color/size mapping |
| src/plugins/polaris/db.ts | Database utility functions for SQLite operations and GeoJSON feature extraction |
| src/plugins/polaris/PolarisReader.vue | Main Vue component for POLARIS data visualization |
| src/plugins/polaris/PolarisFileSystem.ts | File system handler for POLARIS project detection and database loading |
| src/plugins/polaris/reader.scss | Styles for the POLARIS viewer component |
| src/plugins/polaris/i18n.ts | Internationalization configuration (English and German) |
| src/dash-panels/polaris.vue | Dashboard panel wrapper for POLARIS visualizations |
| src/plugins/pluginRegistry.ts | Plugin registration for polaris.yaml file pattern |
| src/dash-panels/_allPanels.ts | Panel registration for dashboard integration |
| package-lock.json | Added dependencies for cartocolor, spl.js, sql.js, sqlite3, and spatialite |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/plugins/polaris/styling.ts
Outdated
| * Styling utilities for AequilibraE plugin | ||
| * | ||
| * This module provides functions for building visual styles from data. | ||
| * It handles color encoding, size mapping, filtering, and the creation | ||
| * of typed arrays optimized for WebGL rendering. | ||
| * | ||
| * @fileoverview Data-Driven Styling System for AequilibraE |
Copilot
AI
Jan 4, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fileoverview comment incorrectly states "Data-Driven Styling System for AequilibraE" when this file is for the POLARIS plugin. This should be updated to reflect the correct plugin name.
| * Styling utilities for AequilibraE plugin | |
| * | |
| * This module provides functions for building visual styles from data. | |
| * It handles color encoding, size mapping, filtering, and the creation | |
| * of typed arrays optimized for WebGL rendering. | |
| * | |
| * @fileoverview Data-Driven Styling System for AequilibraE | |
| * Styling utilities for POLARIS plugin | |
| * | |
| * This module provides functions for building visual styles from data. | |
| * It handles color encoding, size mapping, filtering, and the creation | |
| * of typed arrays optimized for WebGL rendering. | |
| * | |
| * @fileoverview Data-Driven Styling System for POLARIS plugin |
src/plugins/polaris/styling.ts
Outdated
| * Styling utilities for AequilibraE plugin | ||
| * | ||
| * This module provides functions for building visual styles from data. | ||
| * It handles color encoding, size mapping, filtering, and the creation | ||
| * of typed arrays optimized for WebGL rendering. | ||
| * | ||
| * @fileoverview Data-Driven Styling System for AequilibraE |
Copilot
AI
Jan 4, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment header incorrectly states "Styling utilities for AequilibraE plugin" when this file is for the POLARIS plugin. This should be updated to reflect the correct plugin name.
| * Styling utilities for AequilibraE plugin | |
| * | |
| * This module provides functions for building visual styles from data. | |
| * It handles color encoding, size mapping, filtering, and the creation | |
| * of typed arrays optimized for WebGL rendering. | |
| * | |
| * @fileoverview Data-Driven Styling System for AequilibraE | |
| * Styling utilities for POLARIS plugin | |
| * | |
| * This module provides functions for building visual styles from data. | |
| * It handles color encoding, size mapping, filtering, and the creation | |
| * of typed arrays optimized for WebGL rendering. | |
| * | |
| * @fileoverview Data-Driven Styling System for POLARIS |
| */ | ||
|
|
||
| import HTTPFileSystem from '../../js/HTTPFileSystem' | ||
| import { FileSystemConfig, DirectoryEntry } from '@/Globals' |
Copilot
AI
Jan 4, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused import DirectoryEntry.
| import { FileSystemConfig, DirectoryEntry } from '@/Globals' | |
| import { FileSystemConfig } from '@/Globals' |
src/plugins/polaris/styling.ts
Outdated
| */ | ||
|
|
||
| import * as cartoColors from 'cartocolor' | ||
| import { RGBA, RGB, ColorStyle, NumericStyle, LayerStyle, BuildArgs, BuildResult } from './types' |
Copilot
AI
Jan 4, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused import NumericStyle.
| import { RGBA, RGB, ColorStyle, NumericStyle, LayerStyle, BuildArgs, BuildResult } from './types' | |
| import { RGBA, RGB, ColorStyle, LayerStyle, BuildArgs, BuildResult } from './types' |
src/plugins/polaris/styling.ts
Outdated
| stride: number, | ||
| offset: number | ||
| ) => { | ||
| const nums = values.filter((v): v is number => v !== null) |
Copilot
AI
Jan 4, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused variable nums.
| const nums = values.filter((v): v is number => v !== null) |
src/plugins/polaris/usePolaris.ts
Outdated
| schemaName: string | ||
| ): Promise<void> { | ||
| // Create a temporary database file in memory for the attached DB | ||
| const tempDb = await spl.db(arrayBuffer) |
Copilot
AI
Jan 4, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused variable tempDb.
| const tempDb = await spl.db(arrayBuffer) | |
| await spl.db(arrayBuffer) |
| } | ||
|
|
||
| // Apply per-layer styles | ||
| for (const [layerName, bucket] of buckets.entries()) { |
Copilot
AI
Jan 4, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused variable layerName.
| for (const [layerName, bucket] of buckets.entries()) { | |
| for (const bucket of buckets.values()) { |
No description provided.