[Qgis-user] Shape Tools New Capabilities - Compass cardinal directions

2023-03-10 Thread C Hamilton via QGIS-User
I thought I would highlight a couple of updates to the Shape Tools plugin.
For those who are not aware, Shape Tools has a measuring tool that not only
includes the distance from point A to B, but also displays the azimuth from
A to B and from B to A. It shows each segment with these features and the
total distance. It also has a measurement layer algorithm that creates a
new layer from a polygon or line layer with already styled measurements of
the line segments.

The recent addition is to also include the compass cardinal directions such
as N, S, E, W or NE, WSW, or NEbE depending on the number of compass points
that are selected. This has to be enabled from Vector->Shape
Tools->Settings and then look for "Points of the compass" and you can
select None, 4, 8, 16, or 32. It defaults to None.

The other addition is a related expression function with some examples

st_compass( azimuth[, number_of_points, mode] )

st_compass(33) → 'NNE'
st_compass(33, 8) → 'NE'
st_compass(33, 32) → 'NEbN'
st_compass(33, 16,'full') → 'north-northeast'
st_compass(33, 32,'full') → 'northeast by north'
st_compass(33, 32,'trad') → 'Quarto di Greco verso Tramontana'

Enjoy,

Calvin
___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Shape Tools New Capabilities - Compass cardinal directions

2023-03-10 Thread Kirk Schmidt via QGIS-User

Nice Update Calvin.

What is your 0 or 360 degree reference?  I assume it is grid north if 
you use a projected coordinate system.


Kirk Schmidt

On 3/10/2023 8:04 AM, C Hamilton via QGIS-User wrote:
I thought I would highlight a couple of updates to the Shape Tools 
plugin. For those who are not aware, Shape Tools has a measuring tool 
that not only includes the distance from point A to B, but also 
displays the azimuth from A to B and from B to A. It shows each 
segment with these features and the total distance. It also has a 
measurement layer algorithm that creates a new layer from a polygon or 
line layer with already styled measurements of the line segments.


The recent addition is to also include the compass cardinal directions 
such as N, S, E, W or NE, WSW, or NEbE depending on the number of 
compass points that are selected. This has to be enabled from 
Vector->Shape Tools->Settings and then look for "Points of the 
compass" and you can select None, 4, 8, 16, or 32. It defaults to None.


The other addition is a related expression function with some examples

st_compass( azimuth[, number_of_points, mode] )

st_compass(33) → 'NNE'
st_compass(33, 8) → 'NE'
st_compass(33, 32) → 'NEbN'
st_compass(33, 16,'full') → 'north-northeast'
st_compass(33, 32,'full') → 'northeast by north'
st_compass(33, 32,'trad') → 'Quarto di Greco verso Tramontana'

Enjoy,

Calvin

___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


--
Kirk Schmidt, MScF, BScF, RPF
General Manager
Nortek Resource Solutions Inc.
26 Church Road
Sutherlands River, NS
B0K 1W0
Tel (902) 922.3607
Email: k...@nortekresources.com
Web: www.nortekresources.com

___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


[Qgis-user] Display of non-axis-aligned pixels

2023-03-10 Thread Daniel Evans via QGIS-User
Hello,

I have some raster data where the pixels are not
coordinate-system-aligned - i.e. the geotransform has significant
diagonal components. `gdalinfo` reports:

GeoTransform =
  444048.6420808117, 6.302162394202463, 6.152691784443768
  5417729.777950762, 4.143808265940849, -3.26376570161891

When viewing the raster in QGIS, I am surprised to find that it
displays the pixels as north-aligned. An example is here:
https://i.imgur.com/i6y1gtM.png

If I make nodata visible, it seems that QGIS is displaying an
axis-aligned image corresponding to the bounding box of my original
image (data in white, nodata in black). Screenshot here:
https://i.imgur.com/ZQJ6Mi5.png

This behaviour surprised me, as QGIS is capable of showing pixels at a
slant in some circumstances. For example, if I set QGIS to render
using a different UTM zone, the pixels are slanted - although in this
case, it's applying a second rotation on top of the north-aligning
rotation it's already applying: https://i.imgur.com/LoC7jyk.png

1. Is it possible to have QGIS display a raster without resampling the
pixels to axis-aligned?
2. Is there a reason for making this the default (or only) behaviour?
It caused quite some confusion when trying to diagnose a
geotransform-related issue elsewhere.

Cheers,
Daniel
___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] QGIS for Windows with GSS/Kerberos/Active Directory

2023-03-10 Thread Tomas Pospisek via QGIS-User

On 06.02.23 09:53, Tomas Pospisek via QGIS-User wrote:


On 04.02.23 16:56, Jürgen E. Fischer via QGIS-User wrote:

On Fri, 03. Feb 2023 at 16:41:28 +0100, Tomas Pospisek via QGIS-User 
wrote:
So it seems QGIS as shipped by qgis.org does not ship with GSS 
support? Is

that correct?


Yes.


Does anybody use QGIS on Windows with GSS?


Apparently not.



Any pointers/suggestions/help?
Please try libpq 15.1-1 from OSGeo4W (choose "Advanced Install" and 
enable

Exp.)


Thanks a lot! I will!


OK, so I was finally able to set up:

* Postgresql with Kerberos on Linux
* psql/QGIS with SSPI on Windows

and thus to authenticate from QGIS via Active Directory to the 
Postgresql server.


The details can be found 
[here](https://www.postgresql.org/message-id/08b836a7-272a-2309-da45-ac691fccacb8%40sourcepole.ch).


I short:

* don't use GSS on the Windows side
* only set the DB name and the DB derver (not the password,
  not the user, no authentication method or anything) and
  QGIS/psql/libpq will by default and out of the box use the SSPI
  interface that will use Active Directory that will use the Kerberos
  protocol and everything will work magically by itself, without any
  further intervention. This is only the client side. The server side
  (that is the postgresql server), still needs to be set up to do
  Kerberos via GSS).

Shout outs go to Stephen Frost and Jürgen E. Fischer for helping and 
caring. Many, many, many thanks for that!!!


And least but not least. It seems like libpq from the "Advanced 
Installer" from OSGeo4W can *not* do SSPI. It's always trying to use GSS 
and failing to do so. I'm not 100% clear on that since I was not able to 
test further, since I do not have direct access to the systems in 
question, however for anybody getting stuck in the same mud as me or 
those that build the "Advanced Installer" that's certainly something to 
be aware of.


Thanks & greetings,
*t
___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


[Qgis-user] Add distance to shapefile M

2023-03-10 Thread Stewart Holt via QGIS-User
I do volunteer GIS work for an organization which maintains the Georgia
part of the Appalachian Trail. Given that the trail climbs over mountains,
elevation and distance are important data.  In the early days I developed a
large number of Perl scripts to do things like lookup elevation and
calculate 3D distance to create a PolyLineZM shapefile from collected data.
I have used QGIS for 6 or 7 years but mostly for making maps and organizing
data. I am now in the process of switching the remaining workflow to QGIS
so that others can do the work. The Drape function serves the need of
adding LIDAR based elevation but I am still reliant on a Perl script to
calculate the cumulative distance to put on each point of the line. I have
not been able to find any tool or plugin in QGIS to do this. Please let me
know if there is one.

If not...

I was a software developer for 43 years and have used Python for several
things. The recent Friday talk on plugins has inspired me. If there is no
alternative, I would like to create a plugin to calculate and add the 3D
distance to a PolylineZM shapefile. The data is all in Geo coordinates so I
would need to use a QGIS method to calculate the 2D distance. I would have
an option to use cartesian coordinates as well. The Drape function is
exactly the interface that would work well. This function could be added as
an option to Drape, but I think it is native code. I am not afraid of C++
but have not set up a development environment.

If a new plugin is the best approach, I would start with someone's existing
plugin which uses a layer as input, does something with it, and saves it to
a new layer. I would also need to find the method to calculate geo
distance. Any help in getting started would be greatly appreciated.

Stewart Holt
Georgia Appalachian Trail Club
___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Add distance to shapefile M

2023-03-10 Thread Andrea Giudiceandrea via QGIS-User

Hi Stewart,
it is not clear to me exactly what to want to achieve. If you want to 
calculate the 3d length of a 3d line, then you can use the length3d 
function 
https://docs.qgis.org/3.22/en/docs/user_manual/expressions/functions_list.html#length3d


Best regards.

Andrea Giudiceandrea
___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Add distance to shapefile M

2023-03-10 Thread Stewart Holt via QGIS-User
The need is to put cumulative distance on each point, so P1.M would be
zero, P2.M would be the 3D distance from P1 to P2 and P3.M would be the sum
of P2.M plus the 3D distance from P2 to P3, etc. The M value of each point
would be the cumulative 3D distance from P1.

Uses of the M value are the ability to click on line and get distance and
in producing elevation profiles.

Stewart

On Fri, Mar 10, 2023 at 2:44 PM Andrea Giudiceandrea via QGIS-User <
qgis-user@lists.osgeo.org> wrote:

> Hi Stewart,
> it is not clear to me exactly what to want to achieve. If you want to
> calculate the 3d length of a 3d line, then you can use the length3d
> function
>
> https://docs.qgis.org/3.22/en/docs/user_manual/expressions/functions_list.html#length3d
>
> Best regards.
>
> Andrea Giudiceandrea
> ___
> QGIS-User mailing list
> QGIS-User@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>
___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Add distance to shapefile M

2023-03-10 Thread Nicolas Cadieux via QGIS-User
This should helpWriting a feature-based processing algorithm at the example of M-value interpolationopengis.chhttps://docs.qgis.org/3.22/en/docs/user_manual/expressions/functions_list.html#make-point-m12.2. List of functions — QGIS Documentation documentationdocs.qgis.orgEnvoyé de mon iPadLe 10 mars 2023 à 15:25, Stewart Holt via QGIS-User  a écrit :The need is to put cumulative distance on each point, so P1.M would be zero, P2.M would be the 3D distance from P1 to P2 and P3.M would be the sum of P2.M plus the 3D distance from P2 to P3, etc. The M value of each point would be the cumulative 3D distance from P1.Uses of the M value are the ability to click on line and get distance and in producing elevation profiles.StewartOn Fri, Mar 10, 2023 at 2:44 PM Andrea Giudiceandrea via QGIS-User  wrote:Hi Stewart,
it is not clear to me exactly what to want to achieve. If you want to 
calculate the 3d length of a 3d line, then you can use the length3d 
function 
https://docs.qgis.org/3.22/en/docs/user_manual/expressions/functions_list.html#length3d

Best regards.

Andrea Giudiceandrea
___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

___QGIS-User mailing listQGIS-User@lists.osgeo.orgList info: https://lists.osgeo.org/mailman/listinfo/qgis-userUnsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Display of non-axis-aligned pixels

2023-03-10 Thread Alister Hood via QGIS-User
>
> Date: Fri, 10 Mar 2023 13:52:42 +
> From: Daniel Evans 
> To: qgis-user@lists.osgeo.org
> Subject: [Qgis-user] Display of non-axis-aligned pixels
> Message-ID:
> <
> cannaqay0-e_hio8dww88zo-ahi4gsjsmterlbe0dth_xqps...@mail.gmail.com>
> Content-Type: text/plain; charset="UTF-8"
>
> Hello,
>
> I have some raster data where the pixels are not
> coordinate-system-aligned - i.e. the geotransform has significant
> diagonal components. `gdalinfo` reports:
>
> GeoTransform =
>   444048.6420808117, 6.302162394202463, 6.152691784443768
>   5417729.777950762, 4.143808265940849, -3.26376570161891
>
> When viewing the raster in QGIS, I am surprised to find that it
> displays the pixels as north-aligned. An example is here:
> https://i.imgur.com/i6y1gtM.png
>
> If I make nodata visible, it seems that QGIS is displaying an
> axis-aligned image corresponding to the bounding box of my original
> image (data in white, nodata in black). Screenshot here:
> https://i.imgur.com/ZQJ6Mi5.png
>
> This behaviour surprised me, as QGIS is capable of showing pixels at a
> slant in some circumstances. For example, if I set QGIS to render
> using a different UTM zone, the pixels are slanted - although in this
> case, it's applying a second rotation on top of the north-aligning
> rotation it's already applying: https://i.imgur.com/LoC7jyk.png
>
> 1. Is it possible to have QGIS display a raster without resampling the
> pixels to axis-aligned?
>

I don't believe so.


> 2. Is there a reason for making this the default (or only) behaviour?
> It caused quite some confusion when trying to diagnose a
> geotransform-related issue elsewhere.
>

Several bug reports have been filed about this over the years, (e.g.
https://github.com/qgis/QGIS/issues/23760, which should really be reopened,
unless someone files a new ticket instead), and no one has ever tried to
say it "should" be this way.  I'm no expert, but I presume the problem is
simply that no one has been both motivated and able to do the work to fix
it, or to fund someone to do it.
I'm not even sure if a fix would involve work on QGIS itself, or gdal, or
perhaps both.

Regards,
Alister
___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user