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 Image Rotation Support #644

Merged
merged 9 commits into from
Sep 5, 2019

Conversation

wallw-teal
Copy link
Contributor

@wallw-teal wallw-teal commented Jun 28, 2019

This adds image rotation support and then uses it in KML GroundOverlays to address some of our issues with displaying those.

Additionally, if the GroundOverlay contains an unsupported LatLonQuad value, then a warning is issued. I can write a ticket for further support of that. It requires non-affine transforms which are not supported in CanvasRenderingContext2D but could be done by us since the image would only need to be redrawn once.

I have not decided what warnings to show or not show regarding the lack of projection information for the raster image. Right now it is simply assumed to be in the application projection (probably a bad assumption).

Test Files (test in 2D/3D and in multiple projections):
GroundOverlays_etna_rotation_compare.txt
GroundOverlay_unsupported_quad.txt
GroundOverlay_rotation_test.txt

  • Extent reduction from the KML tree is not working as expected, so I'm going to see if I can clean that up here since it is affecting the ease of viewing GroundOverlay items.
  • 3D Image Layer Sync

@wallw-teal wallw-teal changed the title WIP: Add Image Rotation Support Add Image Rotation Support Jul 5, 2019
Copy link
Contributor

@schmidtk schmidtk left a comment

Choose a reason for hiding this comment

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

I have one code comment, and in testing found the following:

  • When animating ground overlays with a timestamp in 3D, the overlay flickers on each timeline change.
  • When switching projections in 3D, the ground overlay image clips the globe.

src/plugin/file/kml/kml.js Show resolved Hide resolved
@wallw-teal
Copy link
Contributor Author

wallw-teal commented Jul 5, 2019

When animating ground overlays with a timestamp in 3D, the overlay flickers on each timeline change.

This is an unrelated issue with KMLSource's override of updateAnimationOverlay().

When switching projections in 3D, the ground overlay image clips the globe.

Ignoring all the other projection assumptions we have already made for this (... ew), I am not getting that artifact. Your screenshot that you sent me (which you should post) looks like raster reprojection from OpenLayers, which we should have off by default. Is that enabled in your environment?

I also updated with a projection bug fix in 3f552c3.

@schmidtk
Copy link
Contributor

schmidtk commented Jul 5, 2019

I'm seeing the artifacts in both Chrome and Firefox on macOS, in both debug and compiled builds. It doesn't seem to matter which projection I start in (only trying 3857 and 4326), I get the same result. I do not have raster reprojection enabled.

Here's the screenshot:

Screen Shot 2019-07-05 at 2 17 41 PM

And the KML: Overlays.txt

This happens in 3D mode if I load the file and switch to a different projection.

@schmidtk
Copy link
Contributor

schmidtk commented Jul 8, 2019

One more issue in 3D mode:

If a ground overlay isn't within the view extent when loaded, it will not be visible on the globe when the view extent does contain the overlay.

@wallw-teal
Copy link
Contributor Author

wallw-teal commented Jul 8, 2019

The latest commit adds a synchronizer specific to static image sources. This essentially just loads and adds the primitive once and controls visibility only with primitive.show, which makes it much slicker when animating and also means that it is no longer concerned with the view extent.

I still have concerns about the original raster projection for GroundOverlay images.

schmidtk
schmidtk previously approved these changes Jul 8, 2019
jsalankey pushed a commit to jsalankey/opensphere that referenced this pull request Jul 10, 2019
…ensphere:THIN-12875 to master

* commit '76580d1144061a437a01ed14f0c4ae6587705a51':
  feat(basecombinator): Make onRemove protected for use in subclasses
schmidtk
schmidtk previously approved these changes Sep 5, 2019
@wallw-teal wallw-teal merged commit c5b6c18 into ngageoint:master Sep 5, 2019
@wallw-teal wallw-teal deleted the feat-image-rotation branch September 5, 2019 16:00
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

3 participants