Re: [Qgis-user] QField Scale settings

2024-05-21 Thread Adam Nielsen via QGIS-User
> at the moment I am using QGIS Desktop 3.22.9 und QField. After preparing
> and packaging my QGIS project for QField I regonized that the scale ist
> showing a very low number (Unit: mm).
> But I can not find the settings. Is it possible to change the scale? And
> how does it work?

You might be seeing the same issue I've been getting recently as well.
When you import a project into QField it's just excessively zoomed in.
You have to pinch-zoom with your fingers to zoom out a bunch of
times until you're at the right scale.

I guess someone should submit a bug report because it used to open
showing the same view you last saved in QGIS but now it's not only
zoomed in but also offset quite a ways from the QGIS view.

Cheers,
Adam.
___
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-Developer] Announce - migrate our mailing lists to Discourse

2024-04-10 Thread Adam Nielsen via QGIS-User
> I didn't see it coming honestly.  Make it hard for them so only the
> best ones can join us?

Not quite - make asking questions take more effort than doing your own
research, so lazy people are encouraged to find their own answers
before asking.  It's not about excluding people, it's about minimising
the types of questions that could be solved by looking at the
documentation or by doing a web search.

> > In my own experience, if it's too easy for people to ask questions,
> > then they tend to do so before doing their own research.
> 
> Don't you think it is already the case. Moderators everywhere are
> doing this job to remind people to just do their homework before
> asking.

Yes and this is my argument exactly.  Those places make it too easy for
lazy people to ask questions, and so you end up with moderators
spending large amounts of time reminding people of basic things.  In my
opinion, instead of bringing in more moderators, it is better to reduce
the amount of these low-effort questions.

> Would you want to make life harder for those who still want to learn, 
> but just don't get the mailing list stuff?

It is very easy to subscribe to a mailing list.  If you can't figure
that out, I think you will have no hope understanding QGIS.  But it is
not about making it hard or complicated, it is making it so that people
are encouraged to do at least a little work on their own before asking
questions.

> From my experience, stupid questions are either not answered, or very 
> gently refocused on the good way of asking questions, which is also 
> something I like in our communities.

That is true, but it seems this list does not get very many questions
like that.  If we start to get a lot of them, the community's attitude
could change.

> > This is why generally speaking, it's often better to add some
> > hurdles in before people can ask questions, such as figuring out
> > how to subscribe to an e-mail list.
> 
> This is a radical point of view. Another option is to make them pass 
> through helpers that reminds them to search before asking. Something 
> positive, like when you create an issue in gitlab and the UI gently 
> propose you existing similar questions when you start typing.

That is fine too, as long as people cannot ignore it and just keep
typing their simple question.

Look at the Microsoft support forums for example.  They are next to
useless, because it is so easy to post questions.  There are hundreds
of questions asking the same thing, and almost as many "answers" by
people who have no idea what they are talking about, but are trying to
be helpful by suggesting something that worked for them once when they
had a completely different problem.

So although their forums are easily searchable, it is incredibly rare
to get a usable answer from them because the posts are of such low
quality and often outright wrong.

Contrast that to StackExchange.  Yes, the Q format is limited,
however by removing low-effort posts and incorrect answers, their
content is consistently high quality and extremely useful.  Many times
I have done a web search and found my answer on a StackExchange site.

Perhaps these are two extremes and the best solution is somewhere in
the middle, but hopefully it at least explains the reasons behind my
arguments.

> > If you still think Discourse is the way to go, I would suggest
> > running it in parallel with the e-mail list for a few months, and
> > compare how many questions get answered there vs here.  
> 
> We can't mirror with both sides being written. If we go this way, we 
> would all have to follow both channels.

I think it would be a mistake to switch entirely in one go.  I am not
saying we run both permanently, just temporarily, to give it a trial
run and see how it goes.  This will give the list users time to try out
Discourse and see how it goes.  Many of the list people will likely set
up Discourse to work like a mailing list anyway, so they won't have to
follow both channels - everything will come into the same inbox.

If Discourse works, then as more and more questions are asked there,
fewer questions will be asked on the lists, and perhaps at some point
they can be turned off and nobody will even notice.

I am reminded of the recent Reddit debacle, where management forced
their changes onto their community of volunteers, and as a result, a
large majority of them left the community entirely.  It does seem like
there is a similar push here, to move everyone to Discourse whether we
like it or not.

And that is fine, I am not paying for the servers, but if having a
helpful community is of value to the project, it is probably best to
take things slowly and give people a chance to adjust, rather than to
dictate what is happening.

> Older ones will stay in mailing lists, Users will try Discourse,
> community is split in half.

Remember the community being split in half, is exactly the same as half
the community leaving because they do not like the change.

> I remind 

Re: [Qgis-user] [QGIS-Developer] Announce - migrate our mailing lists to Discourse

2024-04-10 Thread Adam Nielsen via QGIS-User
> At PSC, we discussed this topic and decide to phase the migration plan, 
> by starting  QGIS PSC and QGIS users first. Those are the first places 
> we want users to jump in easily.

What's the reason you want users to be able to jump in easily?

In my own experience, if it's too easy for people to ask questions,
then they tend to do so before doing their own research.  This runs the
risk that they will ask a question before bothering to do even a simple
web search, resulting in many low-effort questions that the askers
could easily have solved themselves.

The end result is that humans end up functioning like AI LLMs - they
simply repeat parts of the documentation that people could not be
bothered to search for themselves.

Now if you like repeating similar answers to simple questions then
that's fine, but most people tend to get bored with that and lose
interest fairly quickly, or become rude with their replies as they are
tired of repeating the same basic information over and over again, and
this then tarnishes the community as "hostile" or "toxic" to new users.

This is why generally speaking, it's often better to add some hurdles
in before people can ask questions, such as figuring out how to
subscribe to an e-mail list.  It means people will do some web searches
first as they are the easier option, and only ask the community for help
if they really are stuck and really do need help.  This cuts down on a
lot of low-effort questions and demands less time from community
volunteers responding.

Now if you are a paid company accepting money for support agreements
then this does not matter, but if you are relying on the goodwill of
volunteers to answer the incoming questions, then it is most important
to cater to the needs of those volunteers.  If they all become unhappy
and leave, then it does not matter how easy it is to ask a question if
there is nobody around to answer it.

If you still think Discourse is the way to go, I would suggest running
it in parallel with the e-mail list for a few months, and compare how
many questions get answered there vs here.  If Discourse questions are
getting answered then it means it is a viable replacement for the
lists and the list can be closed, but if the questions are going
unanswered then it may be Discourse that should be discontinued and the
e-mail lists retained.  Either way you will have some real-world
statistics to back up the decision one way or another.

Cheers,
Adam.
___
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] Python console sys.stdout.encoding

2024-04-10 Thread Adam Nielsen via QGIS-User
> Effectively it is part of the answer I am looking for.  But my problem is
> "higher" in the python settings for QGIS. If I write 'sys.stdout.encoding =
> "utf-8"' to the console, my plugin will be loaded without problem. I am
> developing a plugin whit "from ultralytics import YOLO" and I am receiving
> the following message :
> 
>File
> "C:\Users\pierr\AppData\Roaming\Python\Python39\site-packages\ultralytics\ut
> ils\__init__.py", line 238, in set_logging
>  if WINDOWS and sys.stdout.encoding != "utf-8":
> AttributeError: 'NoneType' object has no attribute 'encoding' 
> 
> Ultralytics YOLO needs an encoding attribute for "sys.stdout" to be
> imported. I didn't find any solution to set the encoding attribute with the
> startup.py file.

I'm no Python expert, but can you change that code so that it does not
rely on that property? e.g.

if WINDOWS and hasattr(sys.stdout, 'encoding') and sys.stdout.encoding != 
"utf-8":

If that works maybe you can submit an upstream patch to the ultralytics
package?

Otherwise your only option would be to add the 'encoding' property to
the QGIS stdout redirection module as Andrea posted about earlier.

Cheers,
Adam.
___
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] Cross layer filtering

2024-03-28 Thread Adam Nielsen via QGIS-User
> I've been filtering a layer by adding a virtual column populated with
> is_selected() and then creating a virtual layer from it using the
> filter: WHERE virtualField = 1
> 
> This is working well and allows you to have a copy of the layer that
> only shows the selected records when you are creating a layout.

What's your use case for this?  I just wonder whether there is an
alternative that might be easier?

For example if you're always selecting the same set of features, you
could add a category/classification column and then filter based on
that.

> I now need to bring in an associated layer, but I can't find a
> reliable way to cross layer filter because QGIS just hangs for ages
> and crashes.

I have found that QGIS can be extremely slow sometimes when joining
tables and can often crash, so if there's a solution that can avoid
this you might find it more robust.

> I've searched around and can see a lot of people talk about making
> the database do the work but of course it can't if you are trying to
> use a selection filter.

So there's definitely no way you can classify your data such that you
don't need to use a selection filter?

> What is the most reliable way of setting up a filter based on a join
> because QGIS tells me that I must use a virtual layer and even
> creates it for me; but then it just hangs and crashes.

I suppose you could export the virtual selection layer (or even forget
the layer and just use "export selected features") and put those in a
real database table, which you then link off instead?  It would be a
more laborious process having to do an export each time you wish to
select different features but it might at least allow the workflow to
complete.

Cheers,
Adam.
___
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] Problem with contour algorithm

2024-03-13 Thread Adam Nielsen via QGIS-User
> I am trying to contour a grid file using the QGIS raster > extract>contour
> and I get getting errors saying "Warning 1: Model file not specified" or
> "ERROR 4: No such file or directory".
> 
> I am using 3.34 and 3.36 and get the same error.

I did this yesterday and it worked fine for me, but my command has:

  -f "SQLite" /tmp/xxx/OUTPUT.sqlite

Instead of the -f parameter in your screenshots.  I'm not sure how to
change this - can you see any options that let you select this output
format?

I am just wondering whether the two formats you've selected need
additional parameters.  The SQLite format appears not to need anything
else.

Cheers,
Adam.



QGIS version: 3.36.0-Maidenhead
Qt version: 5.15.12
Python version: 3.11.8
GDAL version: 3.8.4
GEOS version: 3.12.0-CAPI-1.18.0
PROJ version: Rel. 9.4.0, March 1st, 2024
PDAL version: 2.6.3 (git-version: Release)
Algorithm started at: 2024-03-14T01:51:00
Algorithm 'Contour' starting…
Input parameters:
{ 'BAND' : 1, 'CREATE_3D' : False, 'EXTRA' : '', 'FIELD_NAME' : 'ELEV', 
'IGNORE_NODATA' : False, 'INPUT' : 'GPKG:/data/input.gpkg:dem_1m', 'INTERVAL' : 
10, 'NODATA' : None, 'OFFSET' : 0, 'OUTPUT' : 'TEMPORARY_OUTPUT' }

GDAL command:
gdal_contour -b 1 -a ELEV -i 10.0 -f "SQLite" GPKG:/data/input.gpkg:dem_1m 
/tmp/processing_tKnWEA/c3d239d7319c4c728a2cadb22ec047d5/OUTPUT.sqlite
GDAL command output:
0...10...20...30...40...50...60...70...80...90...100 - done.
Process completed successfully
Execution completed in 1.13 seconds
Results:
  OUTPUT: /tmp/processing_tKnWEA/c3d239d7319c4c728a2cadb22ec047d5/OUTPUT.sqlite

Loading resulting layers
Algorithm 'Contour' finished
___
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] adding an image to a callout box

2024-03-11 Thread Adam Nielsen via QGIS-User
> i would like to add a graphic image such as a tiff to an annotation layer
> that i can turn off/off.  is there any way to paste an image into a text
> box or polygon that i have pointing to a location?

Can you set the annotation to show HTML then use an "img" tag to show
an image that's saved in your project folder?  e.g.

  

You may not be able to show TIFFs, but if you convert them to .png or
.jpg then it should work.

I haven't tried this with annotation layers but it works in map tips to
have an image appear when you hover over a feature.

A quick Google suggests annotation layers have the option to render HTML
so I would imagine it would work there too.

Cheers,
Adam.
___
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] MacOS GeoJSON download from Google bucket

2024-03-08 Thread Adam Nielsen via QGIS-User
> Hi Adam, thank you very much for the feedback. I made following experience
> since the post. The same file uploaded (using in both cases Chrome) by
> macOS and then uploaded by windows is resulting in different
> datatype assignments on the Google bucket. That gives the impression that
> the OS of the file upload is setting up the data type (text or /
> binary-download). I will try to find a setting in macOS to setup GeoJSON as
> binary instead of a text file. Is this the right way to go?

This could be one solution, although it might be a bit harder to
control the upload settings (because you are trying to upload GeoJSON
as the "wrong" MIME type) so it may stop other programs from
recognising the files properly as well.

Another solution is to work out how to tell the browser or OS that
"application/geo+json" should be downloaded rather than viewed.

I always had trouble getting this to work properly as it seems to be
handled quite differently for each OS (e.g. with Firefox on Linux the
settings are in the browser but on Windows it uses the same settings as
Windows Explorer).

For years I used a Firefox extension that overrode the standard
settings and forced most files to be downloaded instead of viewed.  You
might just have to Google a bit to see if you can work out which
settings to change to get a given MIME type (like
"application/geo+json") to download instead of open.

Sorry I couldn't be of more help!

Cheers,
Adam.
___
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] Inquiry Regarding Hardware Requirements for QGIS

2024-03-07 Thread Adam Nielsen via QGIS-User
> What are the minimum and recommended hardware requirements for QGIS?

For normal application use, a computer that's less than 10 years old is
probably fine.  I'm running it on a second hand office Dell from 2017
with no issues at all.  If your computer is capable of viewing modern
web sites then it is capable of running QGIS quite well.

These days computers are so fast that outside of some specific fields,
pretty much any computer will do the job for most things.

QGIS is not a particularly demanding application as far as these things
go.

> What type of graphics card is required/recommended: OpenGL (Open Graphics
> Library), NVIDIA CUDA (Compute Unified Device Architecture), or RTX (Ray
> Tracing eXtensions)?

If you use any of these things for your work, you will already know
exactly what you need.  If you have to ask the question, then you are
unlikely to need particular support for these technologies.

The aforementioned Dell I am using does not have a dedicated video card
and is using Intel onboard graphics (one of the most basic setups you
can get), and it works just fine with QGIS.

Cheers,
Adam.
___
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] MacOS GeoJSON download from Google bucket

2024-03-07 Thread Adam Nielsen via QGIS-User
> When I use QGIS under Windows and save a vector as a GeoJSON file,
> the uploaded file can be downloaded from the Google bucket as a file. When
> I use QGIS under MacOS, the GeoJSON file opens as a text file, when you
> push the download button in the Google bucket, instead of downloading the
> file.

I think this is probably down to the configuration of the web browser
and/or the operating system.

It's been a while, but you used to be able to configure "helper
applications" in the browser settings that controlled what action
happens when you open certain files.  I guess on one system it has set
up GeoJSON as a text file but you want to change it to a
binary/download instead.

Alternatively when it opens up as a text file you can just save that
(e.g. through the File menu) as it will give you the same result.

Cheers,
Adam.
___
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 and FileGDB

2024-03-06 Thread Adam Nielsen via QGIS-User
> I will try to understand the problem better and maybe in the future I
> will open an issue.

I googled FileGDB as I don't know much about it, and came across this
info:

> The driver implements transactions at the database level, through an
> emulation. This works by backing up the current state of the modified
> parts of a geodatabase after StartTransaction(force=TRUE) is called.
> If the transaction is committed, the backup copy is destroyed. If the
> transaction is rolled back, the backup copy is restored.
>
> Note that this emulation has an unspecified behavior in case of
> concurrent updates (with different connections in the same or another
> process).

This means that if you have more than one connection to the same file
(e.g. perhaps two layers coming from the same file, or have it open in
QGIS and another program at the same time), there is a risk of the file
being corrupted upon write.

It sounds like this data format might be one to avoid for datasets you
want to modify with QGIS.

Cheers,
Adam.
___
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] Cannot erase a polygon

2024-03-06 Thread Adam Nielsen via QGIS-User
> Thanks for replying. Yes I can zoom in and out of the polygon. I also
> closed the Project several times and nothing happens.
> 
> If it is a QGIS bug, it means I better redo the Project? Or is ther a
> alternative solution?

I'm sure there's a way around the problem.  It seems quite unusual.

How did you add the polygon initially?  That might shed some light on
why it's there and how to remove it.

You don't have any print layouts or anything active?

If you don't have any luck, and the project is not confidential, it
could be useful to share it so we can try it for ourselves.  You can
save a copy of the project for this, and then delete all the layers
from the copy so the only thing in the project is the polygon.  You may
even find as you do this the polygon disappears when you delete a
certain layer which might give some hints about where it's coming from.

Cheers,
Adam.
___
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] Cannot erase a polygon

2024-03-06 Thread Adam Nielsen via QGIS-User
> I created a vector layer to make a polygon. I later accidentally
> erased the layer but the polygon was not erased. Now it seems like a
> template and hides all the layers below. Even if I turn off all
> layers, the polygon is still there. How can I erase the polygon?

Can you zoom in on the polygon or is it fixed?  If you can zoom in then
it looks like a QGIS bug, but if the polygon is fixed and you cannot
zoom in on it then it looks like a bug in your graphics card drivers.

Have you tried to close and re-open the project to see if that gets rid
of it?

Cheers,
Adam.
___
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] Risk of security vulnerability using older version of QGis

2024-02-27 Thread Adam Nielsen via QGIS-User
> As a private and amateur end-user of QGis I would really like to know
> if not running the latest version of QGis is a (serious) security
> risk for my Computer?

Do you open projects and data sources from untrusted people?  If so
then it can be a security risk if you are opening a malicious data
file.  If you trust the files and data sources then the risks are
minimal, although of course those people could be hacked so there's
always some unavoidable risk.

> Because of concerns regarding the bug-less performance and
> compatibility of my old project files (albeit potentially
> unjustified) and the inconvenience resulting from a missing built in
> Update feature of QGis, I have not installed the latest version of
> the program yet.

There's no harm in making a copy of your projects, upgrading QGIS, and
testing them out.  If they break and you can't fix it, you can install
the old version and restore the project from the copy you made.

I've only been using QGIS for a little over a year now, and kept
regularly up to date.  I've never had a problem with upgrades and even
going backwards in versions.  Different versions have different
features and bug fixes but so far the likelihood of breaking my projects
seems pretty low.  Of course I still keep backups just in case, because
there are many other things that can go wrong as well (hardware failure,
ransomware, etc.)

> As I am quite new to Mac computers and (as many people convinced me
> it is not necessary) I am not using extra anti-virus software, I have
> serious concerns if an older version of QGis could be a security risk
> for my computer.

When security problems are discovered in popular programs like QGIS,
they are typically recorded in an online vulnerability database.  You
can search this for your favourite programs to see how many
vulnerabilities there are and how old they are, then do your own
research to find out what version they were fixed in.  The search for
QGIS shows no security issues found so far:

  https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=qgis

It doesn't mean there aren't any security flaws, just that nobody has
found any yet.

Often security issues will be in an obscure part of a program that you
are unlikely to use, so even if there are issues, they may not affect
you anyway.  You'll have to read the details listed on the issue to find
that out.

Cheers,
Adam.
___
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] Geotiff from Google Network planner to QGIS

2024-02-27 Thread Adam Nielsen via QGIS-User
> I am reposting this question.

You only waited 10 hours, you need to be more patient.  Give it a week
or two so people have time to read your message and reply.

> I exported this image to geotiff from GNP. Then added it to QGIS, I am not
> getting the device information, I am only getting the RGB values as shown
> below. What should I do to display the device information in QGIS?

GeoTIFF is an image format, like PNG or JPEG.  There is no device
information in .png or .jpg files, so there is no device information in
TIFF either.

If you want device information you will need to find some way of
exporting it.  If you selected GeoTIFF then you are only exporting the
picture without any device information.

I have not used GNP so cannot offer advice on how to do this, either.

Cheers,
Adam.
___
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] Help with building from source

2024-02-23 Thread Adam Nielsen via QGIS-User
> I am also having problems building QGIS. Actually it built but the 
> gui/menu/display is messed up.  Some of the items in the windows are 
> missing.  Not all my projects are shown.

I think that'll happen if you don't have all the libraries installed
when you compile.  If it can't find them it will just compile without
those features.

Depending on your OS you may have to install "development" versions of
the packages in order to get the additional source code files
("headers") that are needed for source compilations to work.  Or if
that's not an option, you may have to compile and install those from
source first before you start with QGIS.

When following the instructions at the start for configuring the build
you should be able to see which libraries it has picked up, so you at
least know which ones you still need to work on.

Compiling a large project like QGIS from source isn't for the faint of
heart.  I've been compiling code personally and professionally for many
years and it still took me a while to figure it out and get it working.

Unless you plan on changing the code and submitting a patch as I was, I
definitely recommend sticking to the usual downloads as getting those
working is considerably easier than getting a fully functional source
build.

Cheers,
Adam.
___
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] Help with building from source

2024-02-22 Thread Adam Nielsen via QGIS-User
> All works well until part way through, when I get an error:
> 
> [ 63%] Built target provider_postgres_a
> [ 63%] Built target qgis_gui_autogen
> make: *** [Makefile:166: all] Error 2
> 
> I can't see a log file anywhere.

It looks like it's a parallel build and the error happened earlier so
it's not visible in your output.  You can try disabling the parallel
build (used to be "make -j1" but I forget if that works here) which
should at least make the errors appear at the end of the output so you
can more easily locate them.

Cheers,
Adam.
___
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] Hillshade default direction

2024-01-23 Thread Adam Nielsen via QGIS-User
> Thank you to both of you for your informative responses.
> This prompted me to look at some satellite imagery and while the
> plateau vs. valley effect is not as distinct, the reversal of hills
> persists. Never noticed that before.

Off topic but it's something that has always bugged me about so many of
NASA's images of the lunar surface.  The lighting is so often from the
bottom right of the image making them look like bumps instead of
craters.

For example this looks like it's covered in pimples to me rather than
small craters:

  https://phys.org/news/2016-10-reveals-lunar-surface-features-younger.html

I always assumed it was because I spent so much time on computers,
where all the user-interface buttons are lit from the top-left.  When
you click a button to make it look like it's being pushed in, the
border colours around the button change to make it look the same as if
it was lit from the bottom-right instead (plus the text is moved a few
pixels to add to the 3D effect).

I wonder - does that mean everyone who is used to south-east lighting
sees UI buttons as being pushed in by default, and they pop out when
you click on them?

Cheers,
Adam.
___
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] Migrating QGIS User mailing list to OSGeo Discourse, yes or no?

2024-01-19 Thread Adam Nielsen via QGIS-User
> > Perhaps it needs to be a bit more obvious, but you can search the list
> > for old topics if you use a query like this in most search engines:
> >
> >site:lists.osgeo.org/pipermail/qgis-user/ search terms here
> 
> That often does not work.
> 
> Try finding this post 
> https://lists.osgeo.org/pipermail/qgis-user/2023-February/052437.html

Interesting, it looks like the archive hasn't been fully indexed.
Point taken.  However I will also point out that most forum software
I've used has an awful search as well (usually I resort to Google) so
I'm not sure whether Discourse is any better.

> A forum also makes it possible for someone to continue a thread from x 
> years ago with new related questions or information. Something that is 
> really hard to do on a mailing list from what I know.

Most forums frown on "necro-posting" like that because it's often
misused and reopens a completed discussion with something barely
related (and forces everyone to re-read a bunch of long forgotten posts
to get the context), so I'm not so sure that's a positive.

Cheers,
Adam.
___
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] Is there any CLI to create and manage a QGIS project

2024-01-18 Thread Adam Nielsen via QGIS-User
> I would like to create a project and then, for example, given a list of
> files, put all those whose names begin with "OC" in the ocean group, and
> all others in the root of the project, and finally sort them
> programmatically, according to values I have in a list of my own.
> 
> I know it is an XML file and I can use an XML cli utility.
> 
> Here I am asking if there is anything already dedicated to QGIS project.

There is quite extensive support for working with QGIS projects via
Python.  You could write a Python script and run it from the CLI.

Cheers,
Adam.
___
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 Qt6 Wayland ongoing status

2024-01-17 Thread Adam Nielsen via QGIS-User
> I have been trying to find a mostly definitive and mostly up-to-date
> conversation about the status of QGIS, Qt6 and Wayland and I'm not having
> any luck.

What's the underlying need for this information?

> There is some stuff on GitHub but it seems to be at least a year or two
> old, talking about Qt6.0 and I gather we are at Qt6.6 by now.  Plus endless
> short conversations in places like Reddit that throw off more heat than
> light.

Updating to a new Qt version is likely going to be a lot of work, so I
imagine nobody is that keen on starting until there's really no choice.

> Does anyone have any suggestions as to where to keep informed on this
> topic?  Because it seems like Wayland is coming whether we want it or not...

Wayland has been around for many years at this point, and is already the
default on some Linux distributions, which have no problem running
QGIS.  There is so much legacy code that they are always going to have
compatibility modules to keep non-Wayland programs usable.  I wouldn't
worry about any programs suddenly breaking due to Wayland.

Cheers,
Adam.
___
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] Migrating QGIS User mailing list to OSGeo Discourse, yes or no?

2024-01-16 Thread Adam Nielsen via QGIS-User
> The main advantage of the forum like mode is the ability to search
> for old topic and possibly easily get answers for your questions
> before posting a new question

Perhaps it needs to be a bit more obvious, but you can search the list
for old topics if you use a query like this in most search engines:

  site:lists.osgeo.org/pipermail/qgis-user/ search terms here

There is also https://gis.stackexchange.com/ which has a lot of Q
posts related to QGIS for people who prefer a more modern interface.

> also might be a bit more attractive for new comers

I think the main issue when discussing where to provide support is
what's easiest for the people who answer the questions.  If you make it
too easy for people to post questions, they will post before doing their
own research which just leads to the same questions coming up
repeatedly.  If you make it too hard for the people with the answers -
like asking them to refresh a dozen different web pages every day
looking for new questions - then they will give up and the questions
will go unanswered.

So really, where the communication happens is ultimately up to whoever
is willing to answer the incoming questions.  The people with questions
will find you no matter where you are, it's the ones willing to provide
the answers that you need to cater for.

Personally, having the questions arrive with no interaction on my part,
and all in one place (my inbox, from many different projects, not just
QGIS) and only requiring one button click to send a reply, makes it
really easy to send a response if I feel I can provide an answer.  So as
long as a new system makes the process just as easy then there's
certainly no harm in trying it out.

Cheers,
Adam.
___
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] Fail to show markers in a vector layer

2024-01-13 Thread Adam Nielsen via QGIS-User
> I created a vector layer and I can show correctly a georeferenced pdf 
> image.
> Then I added another transparent layer  (vector layer) and I tried to 
> add markers in lat,long points.
> Using QgsSimpleMarkerSymbolLayer I can inserted correctly all markers of 
> the same shape and color. Then I tried to add markers with different 
> shapes and colors on the same layers; using QgsSimpleMarkerSymbolLayer I 
> show only one kind of marker. Browsing on internet I found an example to 
> use QgsCategorizedSymbolRenderer. I tried to implement it in my code but 
> no markers shown. Can you suggest a correct way to do this?

You should try to do this through the normal QGIS GUI, then once you
have it working in the GUI you will have a better understanding of what
your code needs to achieve.

I haven't tried to do it in code, but:

> def_symbol->symbolLayers()[0]->setColor(Qt::red);
> def_symbol->symbolLayers()[0]->setColor(Qt::blue);

Here you're just changing settings on the same symbol, so you'll only
end up with one symbol.

> QgsCategorizedSymbolRenderer*categorizedRenderer=newQgsCategorizedSymbolRenderer("Category");
> QgsRendererCategorybsprxCategory("A",def_symbol->clone(),"RX",true);
> categorizedRenderer->addCategory(bsprxCategory);
> 
> QgsRendererCategorybsptxCategory("B",def_symbol->clone(),"TX",true);
> categorizedRenderer->addCategory(bsptxCategory);

Here you're saying when your Category field is "A", use the same symbol
as when your Category field is "B".  You'll have to assign different
symbols if you want them to appear differently.

I guess you want to call def_symbol->clone() first, then change the
colour on the clone, before assigning it to Category A or B.

Cheers,
Adam.
___
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] Accessing iface from jupyter to create map from QGIS

2023-12-06 Thread Adam Nielsen via QGIS-User
> While trying to activate with iface.setactivelayer I am facing an error.

The error is complaining that iface is None.  Your code doesn't show
what value you assigned to this variable - where did you set iface and
what value did you set it to?  I think you forgot to set it and that is
why you are getting this error.

Cheers,
Adam.
___
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 attribute forms question

2023-12-04 Thread Adam Nielsen via QGIS-User
> It can take several hours to create such a form where there are 80+
> columns in the underlying database table,
> 
> I now have the situation where the underlying table needs columns
> added or removed.
> 
> QGIS will not apply a saved form to a layer unless the structure is
> identical.
> 
> How can I reuse a form for a layer representing a database table with
> (say) a single new column, by adding the new column to the form,
> rather than manually creating the whole form from scratch?

I'm not sure if there's a better way, but can you duplicate the form,
add or remove columns as needed to match the target, then use that as
your saved form?

In other words, instead of copying one form and trying to make it fit
onto a different structure, can you modify the source form/structure so
you get a new saved form that already matches the updated structure?

I'm assuming you're talking about copying and pasting the "Attributes
Form" from one layer to another but I could be misunderstanding.

Cheers,
Adam.
___
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] Donation

2023-11-27 Thread Adam Nielsen via QGIS-User
> Tried to download. It was impossible without donating.
> I did donation. I have a reciept of that.

I think you were scammed, there is no donation requirement on the
official QGIS website.  Who did you give your money to?

> But could not download?

When I go to the official download page I see plenty of download links
but nothing about donating money:
https://qgis.org/fi/site/forusers/download.html

> I am really angry because of that kind of behavior.
> In the beginning, I got the impression that donation is not needed.
> However, as I could not do anything I did a small 10€ donation. But good 
> bye money.

Yes, that is a problem with scammers.  It is best to always go to the
official web sites to avoid falling for these tricks.  Any time you are
forced to give money for a free product like QGIS it is a scam -
donations are certainly welcomed but never mandatory.

Cheers,
Adam.
___
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] How to make HTML map tip size larger in QGIS 3.32

2023-10-20 Thread Adam Nielsen via QGIS-User
> > Now, in QGIS 3.32, the map tip seems to be limited to a postage-stamp
> > sized box with scroll bars, so the image is the same size as before,
> > but now I have to scroll around and I can only see a tiny bit of the
> > photo at any one time.

> FYI, this is the MapTip template used in QGIS 3.32
> 
> 
> [...]
> 
> 
> The HTML code typed by the user is actually inserted in place of the '%7'
> placeholder.

Thanks for that, it helps explain what's going on.  Unfortunately it
doesn't look like I can insert my own  tags to override any of
those styles, as being able to change the body width looks like it may
solve my problem.

> Note that in 3.32 the maptip WebView is at most (canvas_width/2) *
> (canvas_height/2).
> This will change in 3.34 where it will take the space available in the
> largest quadrant around the cursor.

That would be very useful!  At the moment my canvas size is around
3000x2000 pixels but the map tip is always 256x192, so the WebView in
3.32 doesn't seem to look at the canvas size at all.

Cheers,
Adam.
___
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] Cannot generate slope - how to specify MINUSERPIXELVALUE?

2023-10-06 Thread Adam Nielsen via QGIS-User
Hi all,

Although I used the slope tool successfully a few months ago, I am
trying to run it again but it's currently failing.  It doesn't give me
any error but I was able to run the command manually and it tells me it
is missing the MINUSERPIXELVALUE option.

I logged a bug report[1] as this failure is new, but it was closed
saying I just need to specify the MINUSERPIXELVALUE option myself.

Unfortunately I can't see where in the slope tool to do this.  I go to
the Processing Toolbox, under "Raster terrain analysis", open "Slope",
select my .tif but I can't see anywhere to enter in custom values.

What am I missing, where is the option to specify MINUSERPIXELVALUE?  I
tried adding it to the end of the command manually and it both picked it
up as a parameter as well as telling me I didn't specify it (see command
output below).

Thanks,
Adam.

[1] https://github.com/qgis/QGIS/issues/54848


qgis_process run native:slope --distance_units=meters --area_units=m2 
--ellipsoid=EPSG:7030 --INPUT=/path/to/file.tif --Z_FACTOR=1 
--OUTPUT=TEMPORARY_OUTPUT --MINUSERPIXELVALUE=1


Inputs


INPUT:  /path/to/file.tif
MINUSERPIXELVALUE:  1
OUTPUT: TEMPORARY_OUTPUT
Z_FACTOR:   1

Using ellipsoid:EPSG:7030
Using distance unit:meters
Using area unit:square meters

ERROR 5: MINUSERPIXELVALUE must be specified.


Results


OUTPUT: /tmp/processing_KvAQKp/14e33f1ed4da411fa29f8f048cf8be1b/OUTPUT.ter
___
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] Flatgeobuf in google drive ?

2023-10-06 Thread Adam Nielsen via QGIS-User
> However, I would like to use Google Drive as a data repository instead 
> of the website,  so I uploaded the same file to (my) Google Drive in the 
> "Shared Data" directory and made it public viewable using a https 
> address similar to this:
> 
> *https://drive.google.com/file/d/180sZv a lot of letters and 
> numbersUe/view?usp=sharing*
> 
> The question: Is there any method so QGIS can access to the .fgb file 
> located in Google Drive using the information in the above https address ?

I'm no expert on Google Drive but it looks like you're using the URL
for the friendly "view this file" page, rather than the URL that
contains the raw file content itself.

You'll probably have to try to download the file and grab the download
URL it gives you there and use that instead.

Cheers,
Adam.
___
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] The Google maps satellite layer for my project background only appears on half of the page

2023-09-20 Thread Adam Nielsen via QGIS-User
> I have a QGIS problem with Google satellite images only appearing
> over half of the screen

I had the same problem under Linux with 3.28.  However I am only focused
on a small area and I wanted it to work offline, so I exported the layer
to a GeoPackage and that local copy seems to render correctly.

So depending on how large the satellite area is that you're looking at,
exporting it to a local file and using that instead might be a
workaround.

Cheers,
Adam.
___
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] action to open an HTML file with arguments

2023-09-09 Thread Adam Nielsen via QGIS-User
> then the web page opens.  But if the "Action Text"  is
>   C:/temp/receiveParms.html?arg1=C=D
> the web page fails to open.

Probably because a question mark isn't a valid filename character so
it gets escaped as %3F, and then the file doesn't exist with %3F in the
filename so you get the error.  The question mark isn't a traditional
URL separator, it's passed to the server unchanged and the server may
choose to only look at the part of the filename before the question
mark but it doesn't have to.  When there is no server and it's just on
your filesystem the actual behaviour is probably browser-specific.

> I wrote sendParms.html which includes the following line:
> 

This isn't a valid URL because it doesn't contain a protocol.  It would
have to be a file:// URL which contains its own rules and semantics.

You could try using the hash (#) symbol instead of the question mark,
as the browser does not send the part after the hash to the server, so
it should work with local files as well (just remember to use the
file:// URL scheme to avoid unpredictable behaviour).

You can pick out the part after the hash in the HTML by using
Javascript code.

Cheers,
Adam.
___
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] Question Concerning Incorrect Color Shading in QGIS

2023-09-06 Thread Adam Nielsen via QGIS-User
> The poverty rate layer is the only one displayed and has been assigned a
> pink gradient. Nonetheless, the map displays colors completely different
> than the gradient assigned. When I try to change the gradient to a
> different color, the displayed color changes as well but it is still
> incorrect. Does anyone know why this is happening and how to fix this
> issue? Thank you for your consideration.

Can you view the layer properties and look at the Symbology section,
and maybe post a screenshot of that?

QGIS has a few different places you can set a fill colour so it's
possible that one of those settings is overriding your gradient.  You
can have a look through all the settings in there and see if you can
find where the actual colour you're seeing is set, and change that to
'none'.

Also make sure you don't have any blending effects enabled (e.g. in the
"Layer rendering" section at the bottom of the Symbology page).  These
should all be set to 'normal' otherwise they can cause colour changes
when they are rendered and mixed with whatever colour is behind the
layer.

Cheers,
Adam.
___
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] Problem with Georeferences on AutoCAD version

2023-09-01 Thread Adam Nielsen via QGIS-User
> When importing a .dwg file generated by AutoCAD, the application is
> not able to import the file in versions later than 2018. How could I
> import a file from a more current version?

The AutoCAD .dwg format is proprietary, and to my knowledge Autodesk
does not release any public specifications on how the file works.  The
Wikipedia page on .dwg (https://en.wikipedia.org/wiki/.dwg) explains
many times Autodesk have tried to sue people who make software that
works with .dwg files.

So this makes it very difficult for free projects like QGIS to support
these file formats when the companies that develop them are so hostile.

> Knowing that most AutoCAD users use current versions with the latest
> tools, I think it would be very useful to be able to import files
> from any version of AutoCAD.

I'm sure it would be very useful.  Perhaps you can contact Autodesk and
ask them for information on the latest .dwg file specification?
Without information on how their latest changes work, it is very
difficult for other software to support the file format.

Otherwise your only option is probably to export the file from AutoCAD
into a different file format that QGIS can read - either one that is
more open and involves fewer lawsuits than .dwg, or as Richard
suggested, an older DWG version that hackers have previously reverse
engineered and made public without permission from Autodesk.

Cheers,
Adam.
___
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] Company wide templates

2023-09-01 Thread Adam Nielsen via QGIS-User
> Hi, I do not know how this works, but I will give it a shot I reckon.
> 
> My company uses QGIS for producing screening reports, contracts,
> applications and so on, it's quite a lot we use it. We would therefor
> like to set up templates for everyone to use, especially for things
> like symbology and layout. Any help on how we can do this?

I'm still new to QGIS so there's probably a better way, but one option
might be to save all your template layers to a dedicated project.

Then you can open both the template project and the real one at the
same time (in two separate instances of QGIS), and copy and paste the
styles between the two.  This would be most useful if the target layer
already exists and you just want to make the symbology or other styles
match the template.

You can also use the Browser pane to locate and expand the template
project (while your real project is open), which will reveal all its
layers. You can double-click on them to copy those layers into your
real project, where you can then modify them as needed.  This would be
most useful if you want the template layer's data source to be reused
in the real project, as well as the symbology and other details.

It's probably a bit clunky but I haven't come across any other
templating facility in QGIS yet.

Cheers,
Adam.
___
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] QGIS is great! (and fixed the broken geotagging in my Insta360 photos)

2023-08-23 Thread Adam Nielsen via QGIS-User
Hi all,

This isn't a request for help, I just wanted to give a big thanks to
everyone involved in the development of QGIS.  I have never used a
program that seems to be able to cater to everything I might want to do.

I recently purchased an Insta360 camera, with the goal of going walking
and having it collect a bunch of 360 degree photos, that I could turn
into my own private Google Street View.

Unfortunately having just loaded the photos in using the "import
geotagged photos" tool, it turns out that in their infinite wisdom, the
Insta360 developers thought it would be sufficient to just use the GPS
coordinates of the first photo taken.  So now I have 400 photos at the
exact same GPS coordinate, making the camera entirely unsuitable for
Street View photography!  (Funny how you find all the complaints on
Google only AFTER you've bought a product.)

However I was also recording my track using the GPS Logger app on my
phone.  I wondered whether perhaps there was a way to somehow apply
that GPS track against the photos.

As it turned out, the .gpx export from the app includes a track_points
table, which has one row every second with the current GPS coordinates.
This means there is a timestamp in that table, with GPS coordinates,
for every timestamp in the photo table!  Unfortunately one is UTC and
the other is local time, but a little maths should be able to solve
that.

In the end I worked out that I could create a virtual layer, which uses
an SQL query to join the two tables together and pick the GPS
coordinates out of the GPS track but the rest of the data from the
photos table.  This worked perfectly and now I have a proper layer with
each of the 400 photos at the correct location!

This was another feature I never thought I would need but QGIS provided
the means to get it done.

In case anyone else ever needs to do something similar, here is the
query I used:

  SELECT
"photos"."fid",
"photo",
"filename",
"directory",
"ele" AS "altitude",
"direction",
"rotation",
X("track_points"."geometry") AS "longitude",
Y("track_points"."geometry") AS "latitude",
"timestamp",
"track_points"."geometry" AS "geometry"
  FROM "photos"
  JOIN "track_points"
ON unixepoch("track_points"."time") = unixepoch("photos"."timestamp") - 
36000;
-- (36000 converts UTC+10 into UTC)

To use it, create a new virtual layer, import the geotagged photos
layer (and call it "photos") then add the "track_points" layer from the
.gpx file (and call it "track_points") then click the Test button and
it should come back as OK.  Then you can add the layer.

Just be aware that it's quite slow and makes QGIS freeze for a few
minutes - you just have to leave it alone and it will eventually come
back to life.  The first thing I did was to quickly hide the new virtual
layer seconds after I added it (to stop it from rendering and freezing
QGIS), then I exported the virtual layer to a new layer in a temporary
.gpkg file.  This way I could remove the slow virtual layer and continue
working with the faster temporary .gpkg file.

Anyway, I just wanted to say thanks for all the effort everyone has put
into such a fantastic program!

Cheers,
Adam.
___
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] How to quickly open Layer Properties in QGIS 3.32?

2023-08-13 Thread Adam Nielsen via QGIS-User
> Is there a way to get the old behaviour back, either with the original
> right-click menu or at least some way to configure QGIS to open the
> Layer Properties on double-click instead of the Symbol Selector?

Ok I'm embarrassed now, it's been a while since I used QGIS and my
layer had a bunch of categories in it.  I was trying to right-click and
double-click on one of the categories...

If I right-click or double-click on an ACTUAL layer then it works as
normal.

My bad, sorry for the noise :)

Cheers,
Adam.
___
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] How to make HTML map tip size larger in QGIS 3.32

2023-08-13 Thread Adam Nielsen via QGIS-User
Hi all,

Since upgrading to QGIS 3.32 the map tips are now working for me.
However the HTML formatting seems to have changed.  I can adjust the
HTML to mostly work around it, however the one thing I can't figure out
how to do is to change the frame size so the popup itself appears
larger on the screen.

Previously I was putting a photo in the map tip with 
and it would open up in a map tip 1024 pixels wide, so I could clearly
see the whole photo.

Now, in QGIS 3.32, the map tip seems to be limited to a postage-stamp
sized box with scroll bars, so the image is the same size as before,
but now I have to scroll around and I can only see a tiny bit of the
photo at any one time.

I have tried using 

[Qgis-user] How to quickly open Layer Properties in QGIS 3.32?

2023-08-13 Thread Adam Nielsen via QGIS-User
Hi all,

In QGIS 3.28 and 3.30 I was able to right-click on a layer to open the
layer properties.

I just moved to a new PC with a fresh QGIS install of 3.32.1-Lima
(didn't carry my old profile across) and now when I right-click on a
layer it gives me a popup where I can do very little, only show/hide
the layer and change the symbol colour.

If I double-click on the layer it brings up the "Symbol Selector"
window where I can further tweak the symbol but do nothing else.

If I go to the Settings menu and choose Options, then select the
"Canvas & Legend" page, there is an option "Double-click action in
legend".  If this is set to either "Open attribute table" or "Open
layer styling dock" then double-clicking a layer does just that,
however setting it to "Open layer properties" causes a double-click to
open the Symbol Selector window instead of the layer properties.

The only way I have found to get the Layer Properties to open is to
choose that menu item from the Layer menu, which is quite slow for
something I do all the time.

Is there a way to get the old behaviour back, either with the original
right-click menu or at least some way to configure QGIS to open the
Layer Properties on double-click instead of the Symbol Selector?

Thanks,
Adam.
___
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] How to have photos appear in HTML tips *and* the attribute editor?

2023-04-21 Thread Adam Nielsen via QGIS-User
> I have imported some geotagged photos via the Processing toolbox, and
> now I have a layer with a bunch of photos that have absolute paths:
> 
>   /project/example/photos/2023-01-01/img1.jpg
> 
> However, when I move the project to a different computer, this no
> longer works, because the project and photos are located under a
> different path, even though the photos are in the same path relative to
> the project file.
> 
> If I change my layer so that the "photo" field is a relative path
> [...]
> the attribute form is no longer able to display the photo, and
> if I use the browse button to select a different file, it saves the
> absolute path again.

I ended up logging a bug request for this but it turns out it was my
own inexperience with QGIS.

It turns out that you can go into the layer properties, and under the
"Attributes Form" item, you can set whether a filename field should use
a relative or an absolute path.

This defaults to 'absolute', so changing it to 'relative' fixed the
problem.

I used the attribute editor and some string functions to do a bulk
search-and-replace to remove the leading path elements from all
features in the layer, turning them all into relative links.

The preview image still shows in the attribute editor, and I can use
the browse button and get a relative path returned upon file selection.
So with this small change, everything works fine now with relative
paths.

I did have to update the HTML map tip to include the project path as
per my original message:

  

And this works fine on whatever Linux machine I open the project on.  I
guess it won't work on a Windows machine though (see the other messages
in this thread) but I don't have one handy to confirm.

Cheers,
Adam.
___
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] Github Access Problems

2023-04-19 Thread Adam Nielsen via QGIS-User
> I understand a lot of organisations have migrated off Github since 
> Microsoft took it over for various reasons. 

A few did in the early days for ideological reasons, but Microsoft have
actually done a surprisingly good job (so far) of just leaving GitHub
alone, so it seems to be more popular than ever.

> I do not know if the Qgis project has considered this option, but it
> seems to me that there is nothing I can do to solve what appears to
> be ongoing issues between MS and Google and therefore there is no
> obvious other solution to address the problems I have with my login,
> other than changing to a non-Google email account.

This is one of the drawbacks of relying on a third party for a service
that you deem critical - and one of the reasons why I run my own e-mail
server.  Sure it's a lot more work, but I don't have to worry about the
whims of a corporation I have no control over.

Having said that, I did not realise GitHub offered e-mail as a 2FA
option.  I have only ever used TOTP, which is an "offline" method as it
doesn't require Internet access to work.  If you're having issues with
e-mails taking too long to get delivered, I suggest switching to TOTP
for 2FA as per GitHub's guidelines:

https://docs.github.com/en/authentication/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication

You don't have to use the apps they recommend.  Personally I started
off with Google Authenticator but as I wanted my codes on multiple
devices, I ended up switching to the command-line "oathtool" program
from the OATH Toolkit (https://www.nongnu.org/oath-toolkit/).  Whenever
I need to log in to GitHub, I have a script that runs
"oathtool --totp -b 12345" where 12345 is the key GitHub gave me when I
set up TOTP, and the program spits out a six digit code.  I enter that
code into the GitHub login page and I'm in, no need for e-mail.

Cheers,
Adam.
___
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] file URIs (was: How to have photos appear in HTML tips *and* the attribute editor?)

2023-04-16 Thread Adam Nielsen via QGIS-User
> > P.S. I have seen many things saying you must specify the URL as
> > file:/// with three slashes to make it work under Windows, but under
> > Linux you must have only two slashes.  It would be nice if any solution
> > to this worked across all platforms.
> >  
> 
> I can't speak to solving your problem, but as to your PS:
> 
> 
> https://en.m.wikipedia.org/wiki/File_URI_scheme
> 
> will help you understand file URLs. Specifically the format is
> 
> file://host/path
> 
> and when host is omitted the slash delimiter is not.
> 
> Note especially the comment
> 
> ... two slashes, without a hostname) is never correct, but is often used

This is what I am doing.  If you look at that Wikipedia page and
compare the sections "Unix" and "Windows" you can see the issue.

Linux/Unix paths start with a leading slash already (no drive letters)
so the path "/project" with "file://" on the front ends up as
"file:///project" with three slashes, which is correct.

The problem is that same concatenation seems to break on Windows, as
"file://" and "c:/project" ends up with only two slashes which is not
correct.

The online guides tell you to use three slashes - "file:///" plus
"c:/project" which works on Windows, but when you move to Linux
"file:///" plus "/project" means you end up with four slashes which
does not work.

So there doesn't seem to be a way to convert the same path into a file
URI that works across both platforms.

Cheers,
Adam.
___
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] How to have photos appear in HTML tips *and* the attribute editor?

2023-04-16 Thread Adam Nielsen via QGIS-User
Hi all,

I have imported some geotagged photos via the Processing toolbox, and
now I have a layer with a bunch of photos that have absolute paths:

  /project/example/photos/2023-01-01/img1.jpg

In the layer I have specified this as:

  

This works fine:

 1. When I open the attribute editor form, the actual image is loaded
and shown in the form.
 2. When I hover over the feature on the map, the tip appears and the
photo is shown.

However, when I move the project to a different computer, this no
longer works, because the project and photos are located under a
different path, even though the photos are in the same path relative to
the project file.

If I change my layer so that the "photo" field is a relative path (by
stripping off the leading path and adding a dot, making the filename
"./photos/2023-01-01/img1.jpg"), and change the HTML tip to this:

  

Then the map tips show the correct photo regardless of the path.
However the attribute form is no longer able to display the photo, and
if I use the browse button to select a different file, it saves the
absolute path again.

Is there some way to achieve one of the following:

  1. Have the attribute editor display and populate fields with
 relative paths instead of absolute paths.

  2. Use an expression to trim off the project path from the front of a
 field, so the HTML tip can extract a relative path from the
 absolute path stored in the layer.

The first option is probably preferable, but I can't seem to find
anything to make the attribute editor work with relative paths.

Many thanks,
Adam.

P.S. I have seen many things saying you must specify the URL as
file:/// with three slashes to make it work under Windows, but under
Linux you must have only two slashes.  It would be nice if any solution
to this worked across all platforms.
___
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] what setting effect topological editing performance?

2023-04-09 Thread Adam Nielsen via QGIS-User
> Thanks for your suggestions. I added the layer to the slow project
> and it's still slow. The project, and the layers in it, are generally
> responsive and there's no especially complex styling. The issue is
> only when editing, specifically editing nodes, with topological
> editing enabled, on PostGIS layers (not memory layers or shapefiles).

Did you re-add the PostGIS connection too, or reuse the existing one?
I'm just wondering whether there could be something different in the
connection settings that leads to one being slower than the other.

In the fast project, once you have edited the features, did you then
try to save the changes?  I am just wondering whether the slow project
is configured to commit changes to the DB after every modification,
whereas the fast project might default to not writing anything to the
DB until you save the layer.  If so, the fast project may still be
sluggish when you go to save your changes back to the DB.

> The PostGIS server is running on an AWS EC2 instance via an ssh
> tunnel. I'm traveling and I went from a fairly fast internet to a
> slower one and the slow project went from slow to very slow. So I
> guess that's a clue.

If you're on a Linux-like platform, you could try using zcat or gunzip
to decompress the project file into an XML file, and then examine it in
a text editor or web browser.  You could find the section where the
PostGIS connection details are stored, and compare them between the
fast and slow project, to see if there is any difference?

Likewise you could find the section where the layer is described and see
if there are different options applied to it.

> It's not a big deal, obviously I can recreate the project. I was
> mainly curious since I have not run into this in other projects and I
> thought that maybe I was overlooking something.

I would think comparing the two decompressed project files might be the
most likely way to figure out what differences exist that might be
causing this.

To simplify things you might want to compare that slimmed down version
of the slow project, where you removed all the layers except for the
slow one.

Cheers,
Adam.
___
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] what setting effect topological editing performance?

2023-04-09 Thread Adam Nielsen via QGIS-User
> I have an old project that is painful to edit with topological editing
> activated. I put a couple of the layers into a new project and topological
> editing is very quick. Specifically, in the old project, moving a single
> node on a polygon with the vertex tool that does not require any additional
> vertices to be moved takes about 2 minutes to complete but is nearly
> instantaneous in the new project.

What happens if you add the layer again to your existing project,
following the exact same procedure as when you added it to the new
project? (i.e. adding the PostGIS connection again from scratch).

If that's fast then it would point to either an issue with the
PostGIS connection or something to do with layer style.

You could also try using the layer right-click menu to copy the styles
from the old slow project to the new fast one to see if that also slows
down the new project.  I wouldn't have thought it would be the styles
causing the slowdown because although a re-rendering happens when
editing the features, it also happens when dragging the map which you
haven't said is slow, but it can't hurt to rule it out.

Is it only slow when editing the features, or is it also slow when you
first open the project and it's loading the list of features from the
DB?  That could also hint at an issue with the DB connection.

These are only guesses, but perhaps they might help narrow down the
cause of the slowness.

Cheers,
Adam.
___
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] How to permanently enable a plugin?

2023-04-07 Thread Adam Nielsen via QGIS-User
> If this is not working for you, I could think of some reasons:
> - your profile folder is read only (OR the QGIS3.ini is not writable)
> - your company let you start every time with a pristine copy of your
> profile (loosing your 'ticks') Is that possible?

Ahh, you are right!  For some reason my QGIS3.ini was owned by root
instead of my own user, thus making it read-only.  I changed the owner
back to my user and now the plugins remain loaded!

Thanks Richard and Raymond for your solutions!

Cheers,
Adam.
___
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] How to permanently enable a plugin?

2023-04-07 Thread Adam Nielsen via QGIS-User
Hi all,

Every time I load QGIS, I have to go to the Plugins menu, choose
"Manage and Install Plugins", then go to the "Installed" section and
tick the plugins that I want to use, in order for them to become
available in the menu and on the toolbar.

Is there a way to permanently have them ticked, like the system plugins
are, so that I don't have to go in and re-enable them every time I load
QGIS?

Thanks,
Adam.

QGIS version: 3.30.0-'s-Hertogenbosch
Qt version: 5.15.8
Python version: 3.10.10
___
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] Zoom QGIS to specific location by command line

2023-04-04 Thread Adam Nielsen via QGIS-User
> I would like to zoom QGIS to a specific location (lat/lon coordinate)
> or area (lat/lon bounding box) using a command line argument
> generated outside of QGIS. I have looked through the available
> command line arguments and cant see anything that will allow this.

I'm not sure whether you mean you want to load QGIS with a project
showing a particular location, or whether QGIS is already running and
you want to use a command line to zoom the already running QGIS to that
location.

> Does anyone know of a method that this could be accomplished?

If you are loading a new QGIS instance it looks like --extent will open
it with a specific view?

I'm not familiar enough with it to know what values to pass, but if you
get the view how you want it then create a new spatial bookmark (on the
View menu) and then look at the properties of that, it will show you the
extents.  They appear to be lat/long if that's what your CRS uses.  If
not, you might have to change the project CRS to one that uses lat/long.

Note that I haven't tested this and I'm new to QGIS myself, so my
apologies if this turns out to be incorrect.

Cheers,
Adam.
___
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] Map tips not showing

2023-03-23 Thread Adam Nielsen via QGIS-User
Hi Andrea,

> have you tried if the issue does occur also using a new QGIS user 
> profile [1]?

I tried this, but there was no change.

> Have you tried if the issue does occur also installing and using the
> same version of QGIS from Flatpack [2]?

I had a look at Flatpak but it seemed rather scary - it wanted to
install a whole bunch of dependencies - Gnome, KDE, etc. so I didn't
want to risk it breaking my system.

Instead I downloaded the Docker version and ran that, and that worked -
it showed the popups!

However that is version 3.31.0-Master, apparently a development
version, but with an older Qt version (5.15.3, vs my system with
5.15.8).  It's also running an older Python (3.10.6 vs 3.10.10), older
GDAL (3.4.1 vs 3.6.3), and so on.

I will experiment a bit more with different versions, but it looks like
the problem is that some newer library version breaks the popups?

Cheers,
Adam.
___
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] Map tips not showing

2023-03-22 Thread Adam Nielsen via QGIS-User
Hi Thayer,

Many thanks for your reply!

> Make sure you have the layer selected in the table of contents

I can't find anything called "table of contents" but there is a panel
called "Layers" where I can tick/untick them to show/hide layers, and
if I click on a layer to select it (a layer with HTML in the Display
properties) then the layer name is drawn in the layer list with a blue
background to indicate it is selected, however I still don't see any
popups when hovering over that layer's markers on the map.

> and hover over the feature for several seconds (e.g. 2 or 3). When I
> say hover, I mean do not move the pointer.

I have hovered for 10 seconds with my hand off the mouse to be extra
sure and still nothing appears.  In the options, the popup time is the
default of 850 milliseconds.  If I hover over the buttons on the
toolbar then tooltips appear successfully, as they do throughout the
various dialog boxes, so it doesn't appear to be a problem with my
technique.

I am not sure how exact you have to be when hovering over the symbol on
the map, but I have tried hovering over a bunch of symbols that were
clustered together, a few pixels above/below/beside the marker,
enlarging the marker, etc. but nothing is popping up.

> Make sure that there is a check mark by "Show Map Tips" in the "View"
> top menu.

There is no check mark but the icon is drawn "pressed" (like the
toolbar button) when it is activated.  I can select it multiple times
to alternate between "normal" and "pressed", just like the toolbar
button.  Regardless of whether the menu item is drawn in the pressed
state or not, there are no popups.

> You might want to try changing the tool, and click on the map window
> or pan the window and try hovering again.

I tried changing to the zoom tool and clicking a few times, then
hovering - no popup.  I changed back to the pan tool - no popup.  I
tried panning around a bit and hovering again - no popup.

> Also you may want to restart QGIS and start from scratch setting up
> the Display tab of the Layer Properties.

I have restarted QGIS and added new HTML to a different feature, but
there is still no popup.

> I am using the same QGIS version but it is built with an older Qt,
> etc. and it works for me, I just have to change the text or
> background color to make it legible.  style="background-color:Tomato;">[% "LABEL_TEXT" %]

I tried changing the colour like this but still no popup.  I have tried
it with a dark satellite map background and the default grey background
and can't see any hint of a popup.  I have also tried setting the popup
to just plain text without using any fields (so it should always
display even if the fields are all blank) but still no popup.

Any other ideas what could be happening?

Many thanks,
Adam.
___
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] Map tips not showing

2023-03-22 Thread Adam Nielsen via QGIS-User
Hi all,

I'm new to QGIS and I followed some instructions for importing
geotagged images and displaying them on the map.

Everything seems to work fine, except I don't see any popups when
hovering over the points.

I have enabled the "Show map tips" option but it makes no difference.

I think with this option enabled, I should get popups for other items
too (not just the geotagged image points) however I have never seen a
single map popup in the whole time I've been using QGIS.  If I add HTML
to other features I don't get any popups either.

I checked the manual[1] but can't seem to see anything I have missed.
I originally got a few errors at startup about missing packages, but I
installed those and I no longer get any errors at startup, but the map
tips still won't appear.

I'm running 3.30.0 with Qt 5.15.8, Python 3.10.10, and GDAL 3.6.3 under
Arch Linux.

Are there additional steps required beyond "Show map tips" in order to
get map tips showing?

Many thanks,
Adam.

[1]: 
https://docs.qgis.org/testing/en/docs/user_manual/working_with_vector/vector_properties.html#display-properties
___
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