Skip to content

Fix GISDocument not applying projection argument #732

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

Draft
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

elifsu-simula
Copy link
Collaborator

@elifsu-simula elifsu-simula commented Jun 4, 2025

Description

Resolves #688

Due to the new view missing center and zoom, extent was not being calculated, which caused projection to not being applied. Now we set the new view to this._Map before calling _moveToPosition function. We also set the projection in state to update the projection in status bar.

Checklist

  • PR has a descriptive title and content.
  • PR description contains references to any issues the PR resolves, e.g. Resolves #XXX.
  • PR has one of the labels: documentation, bug, enhancement, feature, maintenance
  • Checks are passing.
    Failing lint checks can be resolved with:
    • pre-commit run --all-files
    • jlpm run lint

📚 Documentation preview: https://jupytergis--732.org.readthedocs.build/en/732/
💡 JupyterLite preview: https://jupytergis--732.org.readthedocs.build/en/732/lite

Copy link
Contributor

github-actions bot commented Jun 4, 2025

Binder 👈 Launch a Binder on branch elifsu-simula/jupytergis/fix-projection-in-widget

@elifsu-simula elifsu-simula added the bug Something isn't working label Jun 4, 2025
Copy link
Contributor

github-actions bot commented Jun 4, 2025

Integration tests report: appsharing.space

@mfisher87
Copy link
Member

Nice! I do see that the projection is correctly set in the .jgis file, but the status bar is still showing EPSG:3857

image

mfisher87 and others added 15 commits June 12, 2025 14:05
* Attempt support for path alias "@"

Co-authored-by: Arjun Verma <arjxn.py@gmail.com>
Co-authored-by: Yao-Ting Yao <94820616+YaoTingYao@users.noreply.github.com>
Co-authored-by: Jon Marokhovsky <jmarokhovsky@users.noreply.github.com>

* Support absolute paths with typescript-transform-paths and ts-patch

Requires using `tspc` as compiler instead of `tsc`. Would be better to
switch to the "use NX" approach of typescript-transform-paths, but I
wasn't able to get that to work.

Co-authored-by: martinRenou <martin.renou@gmail.com>

* Revert "Attempt support for path alias "@""

This reverts commit 5f9255b.

* Remove baseUrl from tsconfig -- it is equivalent to the default value

* Lint 🔔

* Update all imports which include `../`

I skipped updating sibling imports (`import ... from './foo'`) because
often sibling imports reflect that the code is tightly coupled. We can
always replace those with absolute imports if we feel it's necessary as
we continue along.

* Lint 🔔

---------

Co-authored-by: Arjun Verma <arjxn.py@gmail.com>
Co-authored-by: Yao-Ting Yao <94820616+YaoTingYao@users.noreply.github.com>
Co-authored-by: Jon Marokhovsky <jmarokhovsky@users.noreply.github.com>
Co-authored-by: martinRenou <martin.renou@gmail.com>
…yter#744)

* Processing: Bounding boxes of a vector layer(geojupyter#734)

* Change Bounding Boxes and Centroids labels to correspond to qgis naming convention
* Enhance proxy

* Test fix

* Use os environ for exempt domains
* Create some shared components

* Add tabs; Add CSS

* Button CSS

* Use newer button

* Add components for date picker

* Add pagination component

* Iterate on paginator

* Tiny tweaks

* Use the correct package.json

* lint

* Woops

* Use jupyter css vars

* Add sr-only class

* Lint

* Clean up
…jupyter#714)

Co-authored-by: Matt Fisher <3608264+mfisher87@users.noreply.github.com>
Co-authored-by: Matt Fisher <mfisher87@gmail.com>
@elifsu-simula
Copy link
Collaborator Author

elifsu-simula commented Jun 12, 2025

The issue was that the status bar was being updated in moveend, that's why it was not immediately updated. It is now updated when we update the projection in updateOptions function. It works fine almost always for JGIS files. However for QGS and QGZ files it does not apply the projection about half of the time. Unfortunately I could not find out why this happens. I realized that when we are building the widget for the second time (when we provide a filename), sometimes the arguments of the GISDocument is lost, that is why the default projection is applied. I am happy to work more on this issue, but I will be off for the next 3 weeks. If this is something that needs to be solved immediately, then if someone else can take a look it would be great. Otherwise I will continue with my work when I'm back.

@elifsu-simula elifsu-simula marked this pull request as draft June 12, 2025 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GISDocument's projection argument is not respected
7 participants