Re: [postgis-users] estimated extent and EPSG:5514

2016-11-21 Thread Sandro Santilli
On Mon, Nov 21, 2016 at 05:11:23PM +0100, Sandro Santilli wrote: > > Paul: the "histogram_cell:1" seems to be bogus in the code in any > case, as it looks it's always set to "1", used as a flag rather than > as an actual grid size ? On further reading, it's only set to 1 when something "goes wron

Re: [postgis-users] estimated extent and EPSG:5514

2016-11-21 Thread Sandro Santilli
On Mon, Nov 21, 2016 at 05:06:25PM +0100, Martin Landa wrote: > Hi, > > 2016-11-21 17:00 GMT+01:00 Sandro Santilli : > > show default_statistics_target; -- I guess 100 ? > > default_statistics_target | 50 Try setting them to 100, which is the default. Then ANALYZE again, and re-run select _pos

Re: [postgis-users] estimated extent and EPSG:5514

2016-11-21 Thread Martin Landa
Hi, 2016-11-21 17:00 GMT+01:00 Sandro Santilli : > show default_statistics_target; -- I guess 100 ? default_statistics_target | 50 > The only thing I can think of is that the "hard deviant removal" phase > is considering the geom in the upper-right corner as hard-deviant, as > they are beyond th

Re: [postgis-users] estimated extent and EPSG:5514

2016-11-21 Thread Sandro Santilli
On Mon, Nov 21, 2016 at 04:54:30PM +0100, Martin Landa wrote: > Hi, > > 2016-11-21 16:38 GMT+01:00 Sandro Santilli : > > How many rows do you have in that table ? > > count | 8 > > > Did you change stat targets for the column ? > > No, AFAIK. > > > SELECT attstattarget > >FROM pg_attribut

Re: [postgis-users] estimated extent and EPSG:5514

2016-11-21 Thread Martin Landa
Hi, 2016-11-21 16:38 GMT+01:00 Sandro Santilli : > How many rows do you have in that table ? count | 8 > Did you change stat targets for the column ? No, AFAIK. > SELECT attstattarget >FROM pg_attribute > WHERE attrelid = 'ruian.kraje'::regclass > AND attname = 'geom'; attstattarge

Re: [postgis-users] estimated extent and EPSG:5514

2016-11-21 Thread Sandro Santilli
On Mon, Nov 21, 2016 at 04:28:34PM +0100, Martin Landa wrote: > Hi, > > 2016-11-21 15:52 GMT+01:00 Paul Ramsey : > > What does _postgis_stats( 'ruian.kraje', 'geom') do? > > select _postgis_stats( 'ruian.kraje', 'geom'); > _postgis_stats | > {"ndims":2,"size":[1,1],"extent":{"min":[-909108,-1.233

Re: [postgis-users] estimated extent and EPSG:5514

2016-11-21 Thread Martin Landa
Hi, 2016-11-21 15:52 GMT+01:00 Paul Ramsey : > What does _postgis_stats( 'ruian.kraje', 'geom') do? select _postgis_stats( 'ruian.kraje', 'geom'); _postgis_stats | {"ndims":2,"size":[1,1],"extent":{"min":[-909108,-1.23343e+06],"max":[4522.92,6136.48]},"table_features":8,"sample_features":8,"not_n

Re: [postgis-users] estimated extent and EPSG:5514

2016-11-21 Thread Paul Ramsey
What does _postgis_stats( 'ruian.kraje', 'geom') do? On Mon, Nov 21, 2016 at 6:49 AM, Martin Landa wrote: > Hi, > > 2016-11-21 15:41 GMT+01:00 Paul Ramsey : > > Estimated extent works by looking at the table stats. If you had some > extra > > data and then delete it, the stats might still reflec

Re: [postgis-users] estimated extent and EPSG:5514

2016-11-21 Thread Martin Landa
Hi, 2016-11-21 15:41 GMT+01:00 Paul Ramsey : > Estimated extent works by looking at the table stats. If you had some extra > data and then delete it, the stats might still reflect the original extent > of the full table. Re-running ANALYZE might refresh them. I am afraid that this not this case.

Re: [postgis-users] estimated extent and EPSG:5514

2016-11-21 Thread Paul Ramsey
Estimated extent works by looking at the table stats. If you had some extra data and then delete it, the stats might still reflect the original extent of the full table. Re-running ANALYZE might refresh them. On Mon, Nov 21, 2016 at 5:07 AM, Martin Landa wrote: > Hi all, > > I got strange estima

[postgis-users] estimated extent and EPSG:5514

2016-11-21 Thread Martin Landa
Hi all, I got strange estimated extent when working with data in S-JTSK (EPSG:5514). ST_EstimatedExtent() returns completely wrong extent: select st_estimated_extent('ruian', 'kraje', 'geom'); BOX(-909107.8125 -1233432.375,4522.92431640625 6136.4794921875) The correct extent is: select st_exten

Re: [postgis-users] Restore a raster dump from PostGIS 2.1.0 to PostGIS 2.3.0

2016-11-21 Thread Cedric Duprez
That's right... On the target instance, the user is not exactly the same as on the original instance. This is due to a global settings backup problem I am trying to solve. I will try again with the same users and tell you if it works. Thanks for your help. Regards, Cedric _

Re: [postgis-users] Restore a raster dump from PostGIS 2.1.0 to PostGIS 2.3.0

2016-11-21 Thread Giuseppe Broccolo
Hi Cedric, 2016-11-21 9:26 GMT+01:00 Cedric Duprez : > Hi Giuseppe, > > Thanks for your answer and your help. > Here is the output of \do @: > The operator signs related to PostGIS datatypes are the following ones: > Schéma | Nom | Type de l'arg. gauche | Type de l'arg. droit | Type > du

Re: [postgis-users] Restore a raster dump from PostGIS 2.1.0 to PostGIS 2.3.0

2016-11-21 Thread Cedric Duprez
Hi Giuseppe, Thanks for your answer and your help. Here is the output of \do @: Schéma | Nom | Type de l'arg. gauche | Type de l'arg. droit | Type du résultat |Description +-+---+--+--+-