Re: [Qgis-user] Editing Oracle table - can't add feature

2020-02-19 Thread SPeillet
Ok, I made a PR to fix this  here   

But in the same time, I saw that your first message was posted before the
changes on Identity type ( merged

  
the 13th January) so it can't be the only problem.

At least we resolve a new one...

SPeillet



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.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

Re: [Qgis-user] Editing Oracle table - can't add feature

2020-02-19 Thread Prud'homme Jérémie
You're right I inverted the two function names.
And I confirm I am on Oracle 11g so no handling of IDENTITY type. We should
migrate to 12c someday, I will see if it's better then.

Jérémie.
___
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 Oracle table - can't add feature

2020-02-19 Thread SPeillet
Hi,

I'm not sure to understand, did you invert "determineAlwaysGeneratedKeys"
and "determinePrimaryKey" in your last sentence ?
I guess that because all_tab_identity_cols table is only requested in
"determineAlwaysGeneratedKeys" function.

What is your version of Oracle ? Because all_tab_identity_cols table is a
feature since Oracle 12.1.0.2. It allow the use of IDENTITY type (a kind of
equivalent SERIAL type in postgresql).

But if you use a previous version of Oracle (and so the table doesn't
exist), it could be the cause of your problem. If the request fails, the
layer will be considered as invalid.

Can you confirm me that you're using a Oracle version under 12.1.0.2 ?



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.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

Re: [Qgis-user] Editing Oracle table - can't add feature

2020-02-19 Thread Prud'homme Jérémie
 Hi,

I have the spatial metadata in the both MDSYS.ALL_SDO_GEOM_METADATA and
USER_SDO_GEOM_METADATA views.
The SRID is well retrieved by Qgis in the add Oracle layer menu. But when I
add the layer to the project QGIS tells me that the CRS is not defined (and
it takes the default one).

The other problem is on the primary key that is not retrieved in the add
Oracle layer menu at all.
I saw in your link that there are 2 functions about primary key :
determinePrimaryKey() and  determineAlwaysGeneratedKeys().
I don't really understand what means AlwaysGeneratedKeys but what I'm sure
about is that the request made in the function works if I run it in SQL
Developer (I get the column name of the primary key for the table 'X')
whereas the request in determinePrimaryKey can't as the table/view
all_tab_identity_cols doesn't exists in my database !


Jérémie.

Le mar. 18 févr. 2020 à 16:45, SPeillet  a
écrit :

> Hello,
>
> I add my few knowledge about the srid definition. Currently oracle provider
> only check srid in the MDSYS.ALL_SDO_GEOM_METADATA view and not the
> MDSYS.USER_SDO_GEOM_METADATA.
>
> cf.
>
> https://github.com/qgis/QGIS/blob/master/src/providers/oracle/qgsoracleprovider.cpp#L2635
>
> I made some changes about this on my side to check it on both views, I will
> do a PR soon.
>
>
>
> --
> Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.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

Re: [Qgis-user] Editing Oracle table - can't add feature

2020-02-18 Thread SPeillet
Hello,

I add my few knowledge about the srid definition. Currently oracle provider
only check srid in the MDSYS.ALL_SDO_GEOM_METADATA view and not the
MDSYS.USER_SDO_GEOM_METADATA.

cf.
https://github.com/qgis/QGIS/blob/master/src/providers/oracle/qgsoracleprovider.cpp#L2635

I made some changes about this on my side to check it on both views, I will
do a PR soon.



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.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

Re: [Qgis-user] Editing Oracle table - can't add feature

2019-12-17 Thread Maria Grazia Cuzzani
Hi Jeremie
we found this about 3D data in Oracle and QGis:
https://gis.stackexchange.com/questions/251768/only-last-line-of-oracle-spatial-multiline-is-drawn-in-qgis
We had geometries with Z and M that gave problems (GType 4401,4402,4406), we 
have re-imported the data in 2D and now we see them well.

About PK issue we are studying..
We found that Primary Key CONSTRAINT_NAME maybe must be egual to the INDEX_NAME 
to work well (otherwise Attribute table was filtered)..
We found this about 64 bit version https://issues.qgis.org/issues/9971

SRID
Did you verify SRID of each single shape?
select  a.shape.sdo_srid from mylayer a

Since you're using oracle I take this opportunity... 
you had to give the grant of SELECT to all the users in the spatial index 
tables MDRT* to use spatial indexes?

mg

-
Maria Grazia Cuzzani 
Città metropolitana di Bologna
Settore strutture tecnologiche, comunicazione e servizi strumentali
U.O. Servizi alle Unioni e ai Comuni - ufficio SIT
Via Benedetto XIV, 3 - 40126 Bologna
Tel 051 6598881 - Fax 051 6599025
mailto:mariagrazia.cuzz...@cittametropolitana.bo.it
http://cartografia.cittametropolitana.bo.it
-

- Messaggio originale -
Da: "p.jeremie" 
A: "qgis-user@lists.osgeo.org" 
Inviato: Venerdì, 13 dicembre 2019 15:09:15
Oggetto: Re: [Qgis-user] Editing Oracle table - can't add feature

Hello, 

I found that if the table contains geometry in 3D with SRID 2154, QGIS can't
add the geometry in the table.
If the geometry is 2D, it's ok.

Still, I don't understand why I don't have the PRIMARY KEY column not filled
whereas it is defined in the database...
And why QGIS tells me that the SRID is not defined whereas it is defined in
the MDSYS.USER_SDO_GEOM_METADATA view.

Any idea ?



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.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

--
Ai sensi del Dlgs. 196/2003 - Codice in materia di tutela dei dati personali - 
si informa che il presente messaggio di posta elettronica e gli eventuali suoi 
allegati, relativamente ai dati personali contenuti, sono riservati ai 
destinatari. 
Questi potranno inoltrare il messaggio esclusivamente per finalita' 
istituzionali e/o dipendenti da ragioni di servizio del mittente e/o del 
destinatario.
Non e' consentita, salvo espressa autorizzazione del mittente, qualunque forma 
di divulgazione del messaggio.
Qualora il presente messaggio fosse ricevuto per errore, si chiede gentilmente 
di procedere alla sua cancellazione.
Si rende noto che la risposta alla presente e-mail potrebbe essere 
visualizzata, per ragioni di servizio, da personale e collaboratori della 
Citta' metropolitana di Bologna diversi dal titolare della casella di posta 
elettronica.
L'indirizzo e gli altri dati personali del mittente non possono essere 
utilizzati se non per ragioni istituzionali e/o di servizio.

___
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 Oracle table - can't add feature

2019-12-13 Thread p.jeremie
Hello, 

I found that if the table contains geometry in 3D with SRID 2154, QGIS can't
add the geometry in the table.
If the geometry is 2D, it's ok.

Still, I don't understand why I don't have the PRIMARY KEY column not filled
whereas it is defined in the database...
And why QGIS tells me that the SRID is not defined whereas it is defined in
the MDSYS.USER_SDO_GEOM_METADATA view.

Any idea ?



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.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] Editing Oracle table - can't add feature

2019-12-03 Thread Prud'homme Jérémie
Hello,

I have an Oracle database with several tables with SDO_GEOMETRY columns in
each.
In Qgis, I can open every tables but for one I can't add features.
The Edit button is NOT grey, I CAN click on it but the Add feature button
is grey, therefore I can't add a new feature.

What is strange when adding an oracle table to my layers (any table), is
that Qgis tells me that the SRID is not defined. But it is defined in the
MDSYS.USER_SDO_GEOM_METADATA view and I can see it in the add Oracle layer
Window.
And also, in the add Oracle layer window, I don't see any field in the
Primary key column (and I can't select the field containing the PK).

Any idea why one specific table is not "editable" whereas the others are ?
And any info on the missing PK in the add oracle layer window /  not
defined SRID message will be welcomed.

Jérémie.
___
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