Re: [Qgis-user] Detecting Geometry Type For Oracle Object

2017-01-31 Thread Jürgen E . Fischer
Hi Simon,

On Tue, 31. Jan 2017 at 16:13:47 -0700, Simon Greener wrote:
> How does one request this rownum<1000 number to be changed or implemented as
> a option?

2.18 doesn't do that anymore with UseEstimatedMetadata and a requested geometry
type.  It also has some other improvements on detection.


Jürgen

-- 
Jürgen E. Fischer   norBIT GmbH Tel. +49-4931-918175-31
Dipl.-Inf. (FH) Rheinstraße 13  Fax. +49-4931-918175-50
Software Engineer   D-26506 Norden http://www.norbit.de


pgps_qORL4DI3.pgp
Description: PGP signature
___
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] Detecting Geometry Type For Oracle Object

2017-01-31 Thread Simon Greener
Jurgen,

Thanks again.

How does one request this rownum<1000 number to be changed or implemented as
a option?
After all all the sdo_geometry types I deal with with customers are
homogeneous based on polygon, line or point with multi... (Oracle users
equate multipolygon with polygons and store them in the same singly
inherited sdo_geometry column regardless as to what the OGC Geometry Type
object diagram says about inheritance.)

Additionally, why is it that even when the value is set in a layer's
's type= attribute eg:

dbname='GISDB12' host=localhost port=1522 user='...'
password='...' key='FID' estimatedmetadata=true srid=2872 *type=Polygon*
table="QGIS"."FOO" (GEOM) sql=

QGIS still re-queries the database every time for the geometry type the
project is loaded? 

SELECT DISTINCT gtype FROM (SELECT t."GEOMETRY".sdo_gtype AS gtype FROM
""."" t WHERE t."GEOMETRY" IS NOT NULL AND rownum<1000) WHERE
rownum<=2

This re-query slows down project load times especially when one is using
QGIS Server. It would be great if one could stop this re-query once the type
is set when the original layer is set. After all nearly all layer data for
most data sources are of fixed geometry type: Poly, line or point (+ multi).

regards
SImon



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Detecting-Geometry-Type-For-Oracle-Object-tp5305257p5305639.html
Sent from the QGIS - User mailing list archive at Nabble.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] Detecting Geometry Type For Oracle Object

2017-01-31 Thread Jürgen E . Fischer
Hi Simon,

On Sun, 29. Jan 2017 at 22:42:22 -0700, Simon Greener wrote:
> QGIS, when querying Oracle to determine the geometry type in a table's
> sdo_geometry column executes the following SQL:
> 
> SELECT DISTINCT gtype FROM (SELECT t."GEOMETRY".sdo_gtype AS gtype FROM
> ""."" t WHERE t."GEOMETRY" IS NOT NULL AND rownum<1000)
> WHERE rownum<=2
> 
> If there any way that I can force QGIS to change the number it samples?

No, that's hardwired - but it's 100 on 2.18 and master.


Jürgen

-- 
Jürgen E. Fischer   norBIT GmbH Tel. +49-4931-918175-31
Dipl.-Inf. (FH) Rheinstraße 13  Fax. +49-4931-918175-50
Software Engineer   D-26506 Norden http://www.norbit.de


pgpPMXRuCc5BY.pgp
Description: PGP signature
___
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