Re: [Qgis-user] Cannot save

2023-11-29 Thread Pekka Sarkola via QGIS-User
Hi!

It seems that you are trying to convert vector data to geopackage. What
tool are you using?

Rgs,

Pekka

Pekka Sarkola
Gispo Oy
pekka.sark...@gispo.fi   - GSM +358 40 725 2042
www.gispo.fi – www.paikkatieto.com


ke 29. marrask. 2023 klo 12.22 Ilkka Haapalinna via QGIS-User (
qgis-user@lists.osgeo.org) kirjoitti:

> Hi
> What is the problem as I cannot save.
> I have version 3.28.13 Firenze.
> When trying to save this is what I get in the attachment.
> Please advice
> Ilkka
> ___
> 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] QGIS project templates and PostGIS connections

2021-11-23 Thread Pekka Sarkola
Hi Frank and lists members,

We use to identify different PostgreSQL clusters/databases with
PGServicefile: this gives flexibility to change PostgreSQL cluster and/or
databases without annoying users. Authentication of the users is done via a
personal authentication database.

Old, but still valid QGIS and PostgreSQL service connection file
documentation is here:
https://docs.qgis.org/2.14/en/docs/user_manual/working_with_vector/supported_data.html#service-connection-file

Rgs,

Pekka

Pekka Sarkola
Gispo Oy
pekka.sark...@gispo.fi   - GSM +358 40 725 2042
www.gispo.fi – www.paikkatieto.com


ma 22. marrask. 2021 klo 21.42 Frank Broniewski (ha...@frankbroniewski.com)
kirjoitti:

> Hi fellow QGIS user!
>
> I am scratching my head on the following problem. I want to create a
> QGIS project template which has PostGIS layers in it. I want to be able
> to pass this template to other users who might use them for different
> tasks.
>
> The problem now is the connection string to the PostGIS database. When
> using the authentication manager each PostGIS connection gets its own ID
> which in turn is then referenced in the connection string to the layer.
> But now this ID to the PostGIS connection is different for each user, so
> the stored connection string in the template is not valid anymore. And
> each user has his own credentials for logging into PostGIS as well.
>
> I see that I can give a custom ID to a connection in the authentication
> manager, but it is locked by default, so I am hesitant to unlock it. But
> is this a viable option? Create the PostGIS connection under the same ID
> for each user?
>
> There's also the PostgreSQL connection service file [1] which might be
> an option? Does anyone have some experience to share, especially when
> talking Windows PC?
>
> How do you manage PostGIS connections for "simple" users on a somewhat
> larger scale? I am talking about 20 users, just enough to be annoying
> enough for manual deployment ...
>
> Many thanks for any tips,
>
> Frank
>
>
> [1] https://www.postgresql.org/docs/12/libpq-pgservice.html
>
> ___
> 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


[Qgis-user] Attributes in N-M relations

2021-08-31 Thread Pekka Sarkola
Dear friends,

I have created N-M relation between two tables (as mentioned in
documentation
https://docs.qgis.org/3.16/en/docs/user_manual/working_with_vector/attribute_table.html#creating-one-or-many-to-many-relations
).

I have added some attributes to the relationship table, is it possible to
easily (?) edit relationship attributes in QGIS forms? I can see and edit
relationship table attributes in attribute table, but in forms.

I presume this is a feature request.

Rgs,

Pekka

Pekka Sarkola
Gispo Oy
pekka.sark...@gispo.fi   - GSM +358 40 725 2042
www.gispo.fi – www.paikkatieto.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


Re: [Qgis-user] Editing attributes in embedded forms

2021-06-03 Thread Pekka Sarkola
Hi Bo,

Yes, serial -type has been working always. But since PostgreSQL 10 identity
has been preferred (?) way to handle primary keys, I have followed that
guideline:
https://www.depesz.com/2017/04/10/waiting-for-postgresql-10-identity-columns/

But, I see that this has already been fixed. Thank you, I will test later
on.

Rgs,

Pekka

Pekka Sarkola
Gispo Oy
pekka.sark...@gispo.fi   - GSM +358 40 725 2042
www.gispo.fi – www.paikkatieto.com


to 3. kesäk. 2021 klo 11.07 Bo Victor Thomsen (bo.victor.thom...@gmail.com)
kirjoitti:

> Hi Pekka -
>
> I think you ran into a QGIS - Postgres problem using the "identity" type
> qualifier.
>
> I tried to execute your "create table" example with the "Identity" type
> definition for the primary key. It doesn't create the sequence that QGIS
> assumes exist.
>
> Changing you sample code to:
>
> CREATE TABLE IF NOT EXISTS data.sample_point2
> (
> fid serial NOT NULL,
> wkb_point geometry(Point,3067),
> name varchar,
> CONSTRAINT sample_point2_pk PRIMARY KEY (fid)
> );
>
> i.e change the PK column to a "serial" will produce the expected sequence
> in Postgres. The last table will probably function correctly in QGIS  (Not
> tested, and yes - I know: Identity and Serial types is not the same)
>
>
> Med venlig hilsen / Kind regards
>
> Bo Victor Thomsen
>
> Den 03-06-2021 kl. 08:23 skrev Pekka Sarkola:
>
> Hi,
>
> You repeat this "ERROR: column "sample_point_fid_seq" does not exist"
> -problem with:
> Create very simple table to PostGIS (choose your own CRS):
>
> CREATE TABLE IF NOT EXISTS sample_point
> (
> fid integer NOT NULL GENERATED ALWAYS AS IDENTITY,
> wkb_point geometry(Point,3067),
> name varchar,
> CONSTRAINT sample_point_pk PRIMARY KEY (fid)
> );
>
> Add table to QGIS. Editing works, without errors.
>
> If you tick on from project properties: "Evaluate default values on
> provider side", error will happen:
>
> 2021-06-03T09:22:31 WARNINGErroneous query: SELECT
> nextval("sample_point_fid_seq"::regclass) returned 7 [ERROR: column
> "sample_point_fid_seq" does not exist
>
>  LINE 1: SELECT nextval("sample_point_fid_seq"::regclass)
>
>   ^
>
>  ]
>
> Rgs,
>
> Pekka
>
> Pekka Sarkola
> Gispo Oy
> pekka.sark...@gispo.fi   - GSM +358 40 725 2042
> www.gispo.fi – www.paikkatieto.com
>
>
> to 3. kesäk. 2021 klo 8.47 Pekka Sarkola (pe...@gispo.fi) kirjoitti:
>
>> Hi Alexandre et al,
>>
>> I re-create a database (sample one), create a new QGIS project, add
>> layers => same error. Maybe I open an issue in Github and I can share more
>> SQL and snapshots.
>>
>> Rgs,
>>
>> Pekka
>>
>> Pekka Sarkola
>> Gispo Oy
>> pekka.sark...@gispo.fi   - GSM +358 40 725 2042
>> www.gispo.fi – www.paikkatieto.com
>>
>>
>> ti 1. kesäk. 2021 klo 16.36 Alexandre Neto (senhor.n...@gmail.com)
>> kirjoitti:
>>
>>> From that last error...
>>>
>>> Are you sure your table was not changed after being loaded to QGIS? It
>>> seems to expect a sequence that no longer exists.
>>>
>>> Alexandre Neto
>>>
>>> A terça, 1/06/2021, 12:22, Pekka Sarkola  escreveu:
>>>
>>>> Hi Andreas,
>>>>
>>>> Trasnsactions groups are enabled: editing is working (not in embedded
>>>> forms) as expected.
>>>>
>>>> If I enable "Evaluate default values.."-option, I will get error:
>>>>
>>>> 2021-06-01T14:11:44 WARNINGErroneous query: SELECT
>>>> nextval("sample_point_fid_seq"::regclass) returned 7 [ERROR: column
>>>> "sample_point_fid_seq" does not exist
>>>>  LINE 1: SELECT nextval("sample_point_fid_seq"::regclass)
>>>>
>>>> Primary key of the geometry table is "fid" and it has been defined as
>>>> IDENTITY column (fid integer NOT NULL GENERATED ALWAYS AS IDENTITY (
>>>> INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 2147483647 CACHE 1 ).
>>>>
>>>> I presume this evaluation of the default values is not the solution for
>>>> this case.
>>>>
>>>> Rgs,
>>>>
>>>> Pekka
>>>>
>>>> Pekka Sarkola
>>>> Gispo Oy
>>>> pekka.sark...@gispo.fi   - GSM +358 40 725 2042
>>>> www.gispo.fi – www.paikkatieto.com
>>>>
>>>>
>>>&g

Re: [Qgis-user] Editing attributes in embedded forms

2021-06-02 Thread Pekka Sarkola
Hi,

You repeat this "ERROR: column "sample_point_fid_seq" does not exist"
-problem with:

Create very simple table to PostGIS (choose your own CRS):

CREATE TABLE IF NOT EXISTS sample_point
(
fid integer NOT NULL GENERATED ALWAYS AS IDENTITY,
wkb_point geometry(Point,3067),
name varchar,
CONSTRAINT sample_point_pk PRIMARY KEY (fid)
);


Add table to QGIS. Editing works, without errors.


If you tick on from project properties: "Evaluate default values on
provider side", error will happen:


2021-06-03T09:22:31 WARNINGErroneous query: SELECT
nextval("sample_point_fid_seq"::regclass) returned 7 [ERROR: column
"sample_point_fid_seq" does not exist

 LINE 1: SELECT nextval("sample_point_fid_seq"::regclass)

  ^

 ]


Rgs,

Pekka

Pekka Sarkola
Gispo Oy
pekka.sark...@gispo.fi   - GSM +358 40 725 2042
www.gispo.fi – www.paikkatieto.com


to 3. kesäk. 2021 klo 8.47 Pekka Sarkola (pe...@gispo.fi) kirjoitti:

> Hi Alexandre et al,
>
> I re-create a database (sample one), create a new QGIS project, add layers
> => same error. Maybe I open an issue in Github and I can share more SQL and
> snapshots.
>
> Rgs,
>
> Pekka
>
> Pekka Sarkola
> Gispo Oy
> pekka.sark...@gispo.fi   - GSM +358 40 725 2042
> www.gispo.fi – www.paikkatieto.com
>
>
> ti 1. kesäk. 2021 klo 16.36 Alexandre Neto (senhor.n...@gmail.com)
> kirjoitti:
>
>> From that last error...
>>
>> Are you sure your table was not changed after being loaded to QGIS? It
>> seems to expect a sequence that no longer exists.
>>
>> Alexandre Neto
>>
>> A terça, 1/06/2021, 12:22, Pekka Sarkola  escreveu:
>>
>>> Hi Andreas,
>>>
>>> Trasnsactions groups are enabled: editing is working (not in embedded
>>> forms) as expected.
>>>
>>> If I enable "Evaluate default values.."-option, I will get error:
>>>
>>> 2021-06-01T14:11:44 WARNINGErroneous query: SELECT
>>> nextval("sample_point_fid_seq"::regclass) returned 7 [ERROR: column
>>> "sample_point_fid_seq" does not exist
>>>  LINE 1: SELECT nextval("sample_point_fid_seq"::regclass)
>>>
>>> Primary key of the geometry table is "fid" and it has been defined as
>>> IDENTITY column (fid integer NOT NULL GENERATED ALWAYS AS IDENTITY (
>>> INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 2147483647 CACHE 1 ).
>>>
>>> I presume this evaluation of the default values is not the solution for
>>> this case.
>>>
>>> Rgs,
>>>
>>> Pekka
>>>
>>> Pekka Sarkola
>>> Gispo Oy
>>> pekka.sark...@gispo.fi   - GSM +358 40 725 2042
>>> www.gispo.fi – www.paikkatieto.com
>>>
>>>
>>> ti 1. kesäk. 2021 klo 11.10 Andreas Neumann (a.neum...@carto.net)
>>> kirjoitti:
>>>
>>>> Hi Pekka,
>>>>
>>>> Have you enabled the  transaction mode in your project?
>>>>
>>>> See menu "Project" --> "Properties" --> "Data Sources".
>>>>
>>>> I usually enable all three check boxes:
>>>>
>>>> - Automatically create transaction groups where possible
>>>>
>>>> - Evaluate default values on provider side
>>>>
>>>> - Trust project when data source has no metadata
>>>>
>>>> The transaction mode allows to edit all layers from the same data base
>>>> connection (needs identical db connection string and credentials) and -
>>>> together with "evaluate default values on provider side" - immediately
>>>> retrieves primary keys from the DB, so that you can link objects
>>>> immediately, without having to save first.
>>>>
>>>> Greetings,
>>>>
>>>> Andreas
>>>>
>>>> On 2021-06-01 09:55, Pekka Sarkola wrote:
>>>>
>>>> Hi folks!
>>>>
>>>> I have a problem editing feature attributes in embedded forms. Data is
>>>> stored in PostGIS and I have a simple 1:1 relationship with the geometry
>>>> table and an additional attribute table. QGIS version is 3.18.3 on Ubuntu.
>>>>
>>>> I have created a custom form with a drag-and-drop designer. I can edit
>>>> additional attribute table attributes in embedded form, but those edits are
>>>> not stored anywhere. I have to open a separate form and then edit attribute
>>>> values of the related attribu

Re: [Qgis-user] Editing attributes in embedded forms

2021-06-02 Thread Pekka Sarkola
Hi Alexandre et al,

I re-create a database (sample one), create a new QGIS project, add layers
=> same error. Maybe I open an issue in Github and I can share more SQL and
snapshots.

Rgs,

Pekka

Pekka Sarkola
Gispo Oy
pekka.sark...@gispo.fi   - GSM +358 40 725 2042
www.gispo.fi – www.paikkatieto.com


ti 1. kesäk. 2021 klo 16.36 Alexandre Neto (senhor.n...@gmail.com)
kirjoitti:

> From that last error...
>
> Are you sure your table was not changed after being loaded to QGIS? It
> seems to expect a sequence that no longer exists.
>
> Alexandre Neto
>
> A terça, 1/06/2021, 12:22, Pekka Sarkola  escreveu:
>
>> Hi Andreas,
>>
>> Trasnsactions groups are enabled: editing is working (not in embedded
>> forms) as expected.
>>
>> If I enable "Evaluate default values.."-option, I will get error:
>>
>> 2021-06-01T14:11:44 WARNINGErroneous query: SELECT
>> nextval("sample_point_fid_seq"::regclass) returned 7 [ERROR: column
>> "sample_point_fid_seq" does not exist
>>  LINE 1: SELECT nextval("sample_point_fid_seq"::regclass)
>>
>> Primary key of the geometry table is "fid" and it has been defined as
>> IDENTITY column (fid integer NOT NULL GENERATED ALWAYS AS IDENTITY (
>> INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 2147483647 CACHE 1 ).
>>
>> I presume this evaluation of the default values is not the solution for
>> this case.
>>
>> Rgs,
>>
>> Pekka
>>
>> Pekka Sarkola
>> Gispo Oy
>> pekka.sark...@gispo.fi   - GSM +358 40 725 2042
>> www.gispo.fi – www.paikkatieto.com
>>
>>
>> ti 1. kesäk. 2021 klo 11.10 Andreas Neumann (a.neum...@carto.net)
>> kirjoitti:
>>
>>> Hi Pekka,
>>>
>>> Have you enabled the  transaction mode in your project?
>>>
>>> See menu "Project" --> "Properties" --> "Data Sources".
>>>
>>> I usually enable all three check boxes:
>>>
>>> - Automatically create transaction groups where possible
>>>
>>> - Evaluate default values on provider side
>>>
>>> - Trust project when data source has no metadata
>>>
>>> The transaction mode allows to edit all layers from the same data base
>>> connection (needs identical db connection string and credentials) and -
>>> together with "evaluate default values on provider side" - immediately
>>> retrieves primary keys from the DB, so that you can link objects
>>> immediately, without having to save first.
>>>
>>> Greetings,
>>>
>>> Andreas
>>>
>>> On 2021-06-01 09:55, Pekka Sarkola wrote:
>>>
>>> Hi folks!
>>>
>>> I have a problem editing feature attributes in embedded forms. Data is
>>> stored in PostGIS and I have a simple 1:1 relationship with the geometry
>>> table and an additional attribute table. QGIS version is 3.18.3 on Ubuntu.
>>>
>>> I have created a custom form with a drag-and-drop designer. I can edit
>>> additional attribute table attributes in embedded form, but those edits are
>>> not stored anywhere. I have to open a separate form and then edit attribute
>>> values of the related attribute table. This is quite annoying for the end
>>> user.
>>>
>>> Any suggestions? Or should I write a better description to the Github?
>>>
>>> Rgs,
>>>
>>> Pekka
>>>
>>> Pekka Sarkola
>>> Gispo Oy
>>> pekka.sark...@gispo.fi   - GSM +358 40 725 2042
>>> www.gispo.fi – www.paikkatieto.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 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] Editing attributes in embedded forms

2021-06-01 Thread Pekka Sarkola
Hi Andreas,

Trasnsactions groups are enabled: editing is working (not in embedded
forms) as expected.

If I enable "Evaluate default values.."-option, I will get error:

2021-06-01T14:11:44 WARNINGErroneous query: SELECT
nextval("sample_point_fid_seq"::regclass) returned 7 [ERROR: column
"sample_point_fid_seq" does not exist
 LINE 1: SELECT nextval("sample_point_fid_seq"::regclass)

Primary key of the geometry table is "fid" and it has been defined as
IDENTITY column (fid integer NOT NULL GENERATED ALWAYS AS IDENTITY (
INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 2147483647 CACHE 1 ).

I presume this evaluation of the default values is not the solution for
this case.

Rgs,

Pekka

Pekka Sarkola
Gispo Oy
pekka.sark...@gispo.fi   - GSM +358 40 725 2042
www.gispo.fi – www.paikkatieto.com


ti 1. kesäk. 2021 klo 11.10 Andreas Neumann (a.neum...@carto.net) kirjoitti:

> Hi Pekka,
>
> Have you enabled the  transaction mode in your project?
>
> See menu "Project" --> "Properties" --> "Data Sources".
>
> I usually enable all three check boxes:
>
> - Automatically create transaction groups where possible
>
> - Evaluate default values on provider side
>
> - Trust project when data source has no metadata
>
> The transaction mode allows to edit all layers from the same data base
> connection (needs identical db connection string and credentials) and -
> together with "evaluate default values on provider side" - immediately
> retrieves primary keys from the DB, so that you can link objects
> immediately, without having to save first.
>
> Greetings,
>
> Andreas
>
> On 2021-06-01 09:55, Pekka Sarkola wrote:
>
> Hi folks!
>
> I have a problem editing feature attributes in embedded forms. Data is
> stored in PostGIS and I have a simple 1:1 relationship with the geometry
> table and an additional attribute table. QGIS version is 3.18.3 on Ubuntu.
>
> I have created a custom form with a drag-and-drop designer. I can edit
> additional attribute table attributes in embedded form, but those edits are
> not stored anywhere. I have to open a separate form and then edit attribute
> values of the related attribute table. This is quite annoying for the end
> user.
>
> Any suggestions? Or should I write a better description to the Github?
>
> Rgs,
>
> Pekka
>
> Pekka Sarkola
> Gispo Oy
> pekka.sark...@gispo.fi   - GSM +358 40 725 2042
> www.gispo.fi – www.paikkatieto.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 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] Editing attributes in embedded forms

2021-06-01 Thread Pekka Sarkola
Hi folks!

I have a problem editing feature attributes in embedded forms. Data is
stored in PostGIS and I have a simple 1:1 relationship with the geometry
table and an additional attribute table. QGIS version is 3.18.3 on Ubuntu.

I have created a custom form with a drag-and-drop designer. I can edit
additional attribute table attributes in embedded form, but those edits are
not stored anywhere. I have to open a separate form and then edit attribute
values of the related attribute table. This is quite annoying for the end
user.

Any suggestions? Or should I write a better description to the Github?

Rgs,

Pekka

Pekka Sarkola
Gispo Oy
pekka.sark...@gispo.fi   - GSM +358 40 725 2042
www.gispo.fi – www.paikkatieto.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] Windows UNC paths in output dir

2017-10-03 Thread Pekka Sarkola
Hi!

I was in digest mode in this list, so I need re-start this thread. Sorry.

Ok, I see when you add manually UNC's to QGIS (tested with 2.18.5 and 3.0
nighly build) you can browse UNC directories for data input/output.

I think it will more "user friendly", if those network drives will show up
automatically when you like to add data or output/export data.

Maybe I need forward this question to developer mailing list.

Rgs,

Pekka

Pekka Sarkola
Gispo Oy
pekka.sark...@gispo.fi   - GSM +358 40 725 2042
www.gispo.fi – www.paikkatieto.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] Windows UNC paths with QGIS

2017-10-03 Thread Pekka Sarkola
Hi!

Is it possible using Windows UNC paths (
https://en.wikipedia.org/wiki/Path_(computing)#Uniform_Naming_Convention)
in QGIS?

For me it seems that you can open project files from UNC drives, but not
data sources. Not for input neither output.

I tried to found some relevant discussion web pages, but really didn't
found anything relevant. Maybe this is trivial, please point me to right
place. Thank you

Note: mapping network drive to letter is not solution. Asking for a friend,
not have rights to map network drive to letter (like T:\). Only UNC's like
\\server\directory

Rgs,

Pekka

Pekka Sarkola
Gispo Oy
pekka.sark...@gispo.fi   - GSM +358 40 725 2042
www.gispo.fi – www.paikkatieto.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