Giter VIP home page Giter VIP logo

Comments (3)

pauldendulk avatar pauldendulk commented on May 22, 2024

This issue has big impact and there are many ways to approach it so it requires some thinking. Some initial thoughts in random order:

  • There should be a Rotation field in IViewport
  • First focus on WPF only. Everything else should keep working as long as IViewport.Rotation is zero.
  • Projects affected will be:
    • Mapsui.Rendering.Xaml
    • Mapsiu.UI.Xaml
    • parts of Mapsui (Viewport)
  • Two approached:
    • Render everything as if rotation is zero and rotate the entire result. So in WPF the main render canvas should be rotated. Without further measures the consequence will be that data will be missing in the corners. To counter this the Viewport.Extent should be increased in size to fill the complete viewport. The disadvantage is that more data will be fetched than necessary. I prefer this approach.
    • Rotate every feature individually. Use a rectangular Geometry not a BoundingBox to fetch data so only data is fetched that is actually used. This approach is more in line with how a 3D graphics engine works but has a bigger impact.
  • Perhaps it is also possible to keep the Extent as is and correct for rotation when necessary. But I don't like the idea that the Extent is actually not correct. I expect many places where this correction should be necessary.
  • In the Viewport.Extent the extent should be grown if rotated so all corners of the map are covered.
  • In Mapsui.Rendering.Xaml there are 4 uses of extent of which 3 are in GetFeaturesInView. There you just need the grown extent. One is in the RasterizingProvider. This can be ignored for now.
  • The Viewport.Transform should take rotation into account. This might be hard to get right.

from mapsui.

pauldendulk avatar pauldendulk commented on May 22, 2024

Above comments were made when quickly glancing at the code. If anyone else looks into this I would like to hear your thoughts.

from mapsui.

pauldendulk avatar pauldendulk commented on May 22, 2024

fixed with #11

from mapsui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.