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

Save created sources in StateDB #127

Open
martinRenou opened this issue Sep 11, 2024 · 2 comments
Open

Save created sources in StateDB #127

martinRenou opened this issue Sep 11, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@martinRenou
Copy link
Member

In QGIS, once you created a source, it will always show up in the source panel for new created files or newly opened files.

This allows keeping in memory some sources somewhere to be able to reuse them quickly after.

We could provide the same feature by saving created sources in StateDB and showing them in the source panel, allowing to quickly create layers from them.

@martinRenou martinRenou added the enhancement New feature or request label Sep 11, 2024
@brichet
Copy link
Collaborator

brichet commented Sep 11, 2024

Yes, that would be nice.
However, we'll have to consider the sources using local files (GeoJSON for example), where the path is saved relatively to the JGIS file, AFAIK.

let dir = PathExt.dirname(this._filePath);
if (dir.includes(':')) {
dir = dir.split(':')[1];
}
const absolutePath = PathExt.join(dir, filepath);

@martinRenou
Copy link
Member Author

However, we'll have to consider the sources using local files (GeoJSON for example), where the path is saved relatively to the JGIS file, AFAIK.

Indeed 👍🏽

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants