[Qgis-user] Qgis-user Digest, Vol 100, Issue 55

Julian Schall j.schall at ff-forst.de
Tue Jul 1 09:02:31 PDT 2014


Hi Bernhard,

thank you for your help! I tried it and it worked perfect!

All questiones answered! :-)

Julian

------------------------------------------------

Message: 2
Date: Fri, 27 Jun 2014 09:10:56 +0200
From: Bernhard Str?bl < >
To: qgis-user at lists.osgeo.org
Subject: Re: [Qgis-user] Reproduction of Northarrow-function from
	ArcView 3 in QGIS
Message-ID: <53AD1900.4040407 at jena.de>
Content-Type: text/plain; charset=windows-1252; format=flowed

Hi Julian,

AFAIU this is what you want to achieve:
Have lines (having only two nodes, no vertices) in a map with CRS
GaussKr?ger 3 (EPSG:31467 ?) that are labeled with a) their length (in
meters) and b) their angle towards north (in degrees), i.e. North is 0, East
90 etc.
You can do that with the expression based labelling, please check the
documentation for an introduction [1] esp. "Define labels based on
expressions"


Am 26.06.2014 17:39, schrieb Julian Schall:
> Hello together,
>
> is there any possibility known in QGIS to reproduce the 
> Northarrow-function from ArcView 3.0?
> Background is having a tool to easy generate a way to find boundary 
> stones or landmarks from a known place.
>
> The Northarrow-Button works as follows:
>
> After clicking the northarrow-button you can click in the map an draw 
> a line and clicking again defines the end of the line (comparable to 
> line measurement in QGIS). Then automatically the line is labeled with 
> the angle (0-360? and the length from start to endpoint). Difference 
> between the two informations/decimal numbers gets understandable 
> through parallel declaration of the unit (for example: 25,7 m on top 
> of the line and 23,5? below the line). In ArcView that is actually a 
> label, not a vectorlayer.
>
> I was searching for plugins first, but didn?t find any suitable.
> Then I tried to rebuild the function through line-vectorlayer with 
> columns ?Angle? and ?Length? and predefined labeling. Problems are
>
> 1.That I couldn?t calculate the angle between north and the line (GK3).
> I only found a term for UTM: (atan((xat(-1)-xat(0))/(yat(-1)-yat(0)))) 
> *
> 180/3.14159 + (180 *(((yat(-1)-yat(0)) < 0) + (((xat(-1)-xat(0)) < 0 
> AND
> (yat(-1) - yat(0)) >0)*2)))

Why not? Both, UTM and GaussKr?ger are transversale mercator projections. I
parsed this expression as labelling expression for one of my line layers
(EPSG:31468) and it works. Be careful with the line direction.

>
> 2.That I couldn?t manage automatic calculation of length and angle in 
> the attribute table after adding a line to the layer. It?s very 
> painful to every time calculate length and angle again.

You need not store it in the table (which means updating all the time), the
expression-based labels calculate this on-the-fly from your geometry

>
> 3.That I couldn?t display to labels respectively the content of two 
> attribute columns.
>
> 4.That I couldn?t manage to label the units ? and m.

sse [1]
>
>
> I would be very thankful for help or advices how to do that.
>
>
> *Julian***
>
>

Bernhard

[1]
http://docs.qgis.org/2.2/en/docs/user_manual/working_with_vector/vector_prop
erties.html#labels-menu


__________ Information from ESET Mail Security, version of virus signature
database 10008 (20140627) __________

The message was checked by ESET Mail Security.
http://www.eset.com



*************************




More information about the Qgis-user mailing list