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

More rational Scales in composer and support for nautical miles on them #995

Closed
wants to merge 4 commits into from
Closed

Conversation

jtornero
Copy link
Contributor

This is a little effort to make QGIS more usable for people related to the sea and marine scientists in particular, but also to provide a more rationale graphical scale system for the composer.

Scales in previous versions look somehow strange, because number of automatic units are sort of random. I propose to make more rationale scales. For instance, an automatic scale will be always be sort of "decimal" multiples, like 10, 20, 30or 25, 50, 75 or 5, 10, 15; The maginitude order of the quantity of the unit displayed in the scale is proportional to the width of the map but also is always multiple of ten.

I've tried to follow the schema provided in the previous code, making it possible to use multiples of the base units (meters and kilometers, for instance). also for imperial units; because I'm a metrical system user (except for nautical miles), I don't know if it's practical to use feet and miles, so please take a view on it, maybe it's better to use feet/yards/miles. In the case of Nautical miles, I don't know about practical uses of submultiples, but the same schema could be implemented.

Best regards,

Jorge Tornero

@gioman
Copy link
Contributor

gioman commented Nov 15, 2013

@nyalldawson @mhugent

@nirvn
Copy link
Contributor

nirvn commented Nov 16, 2013

@jtornero would be nice of you to have a look at http://hub.qgis.org/issues/9050 (unable to user non-degree units with scale bar when project's CRS is set to wgs84), seems the issue overlaps with some of the improvements your trying to achieve. Good luck :)

@jtornero
Copy link
Contributor Author

@nirvn @gioman
Well I've tested my code against what you relate in issue 9050; in fact in fact I opened a feature request http://hub.qgis.org/issues/9065 where I suggest that both issue 9050 and my proposal could be somehow connected. My code works well when OTF projection is on, as you can see in the attached screenshot.

When I use a projected CRS, like ED50 / UTM zone 30N (EPSG:23030), the scale gets mangled and nonsense, wrong magnitudes are shown in the scale.

But in both cases, it looks that if you choose the right numbers, scales in map units (degrees) look good. In the case of Map Units, choosing 1 both for map units by bar unit and segment size renders nice scales in degrees. But for scales in feet/meters/NM it doesn't work.

I'll try to do my best with C++ but I can't promise much. I'd love if someone gets involved with this.

Best regards,

Jorge Tornero
qgis_scale_test

…plyDefaultSize

makes possible to get right scalebars
…plyDefaultSize

makes possible to get right scalebars
@jtornero
Copy link
Contributor Author

Sorry about the multiple commits... not a git advanced user... just wanted to notify you

@ghost ghost assigned mhugent Nov 19, 2013
@mhugent
Copy link
Contributor

mhugent commented Nov 19, 2013

assigned to @mhugent

@nirvn
Copy link
Contributor

nirvn commented Dec 2, 2013

@jtornero thanks for looking into this. It seems to me that the user-friendly behavior here would be to disable non map-based unit on scale item when OTF is off. Or at least add a label mentioning that the scale item's meter unit won't work under non-meter projection when OTF is off.

@nyalldawson
Copy link
Collaborator

@jtornero Thanks for this valuable work -- sorry it's taken so long to review. I've manually merged a modified version of this commit to master!

@nyalldawson nyalldawson closed this Jan 8, 2014
@jtornero
Copy link
Contributor Author

@nyalldawson Sorry for my little git/developing skills but... does it mean that the feature has been incorporated to qgis and will be available on 2.2 and I can consider the work done???

@NathanW2
Copy link
Member

I does indeed.

  • Nathan

On Tue, Jan 14, 2014 at 8:04 AM, Jorge Tornero notifications@github.comwrote:

@nyalldawson https://github.com/nyalldawson Sorry for my little
git/developing skills but... does it mean that the feature has been
incorporated to qgis and will be available on 2.2?


Reply to this email directly or view it on GitHubhttps://github.com//pull/995#issuecomment-32216676
.

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.

6 participants