[postgis-users] Trouble adding Postgis 1.5.3 layer to QGis

technique at siig.fr technique at siig.fr
Fri Sep 23 07:15:10 PDT 2011


Hi 

We could load postgis layers to QGis when we had postgis 1.5.2, yes, but it
doesn’t work any more with the 1.5.3 version.

The error message that we get from QGis when we try to load layers is:
--------------------
1 cursor states lost.
SQL: declare qgisf1 binary cursor for select "oid",asbinary("geom",'NDR')
from "cadastre"."q_cadastre_commune" where "geom" &&
setsrid('BOX3D(794270.6350231178803369 6312919.8874999880790710,
860762.8649768828181550 6362904.6124999895691872)'::box3d,2154) and
(GeometryType("geom") IN ('POLYGON','MULTIPOLYGON'))
Résultat: 7 (ERROR: function setsrid(box3d, integer) does not exist
LINE 1: ...m "cadastre"."q_cadastre_commune" where "geom" && setsrid('B...
^
HINT: No function matches the given name and argument types. You might need
to add explicit type casts.
)
---------------------
We had though that "there's never been a SetSRID taking BOX3D, but implicit
casts transformed that BOX3D into a GEOMETRY, passing the latter to
SetSRID.” But it seems that it no longer works like that in the 1.5.3
version? But still, Qgis is waiting for a geometry coming from the setsrid
(through box3D) function.

To answer your question, what we did is:
- First uninstalled completely postgis 1.5.2
- Then installed postgis 1.5.3
- Then loaded our database from 1.5.2 to 1.5.3 version using the perl script
called new_postgis_restore.pl
This script is supposed to transfer a database from the Postgis 1.5.2 to the
Postgis 1.5.3 version.

Would there be a problem doing so?


----------------------------------------------------------------------
Dominique LE COCQ – Technicienne SIG
SiiG (Syndicat Intercommunal d’Information Géographique)
115 Avenue de la Roquette – ZA de Berret – 30 200 Bagnols-sur-Cèze
Tél: 04.66.90.58.00 – Fax: 04.66.82.98.35 – Mail: dlecocq at siig.fr – Web:
http://www.siig.fr
 


----------------------------------------------------------------------

Dominique LE COCQ – Technicienne SIG
SiiG (Syndicat Intercommunal d’Information Géographique)

115 Avenue de la Roquette – ZA de Berret – 30 200 Bagnols-sur-Cèze

Tél: 04.66.90.58.00 – Fax: 04.66.82.98.35 – Mail: dlecocq at siig.fr – Web:
http://www.siig.fr
 

-----Message d'origine-----
De : postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] De la part de Sandro
Santilli
Envoyé : vendredi 23 septembre 2011 15:38
À : PostGIS Users Discussion
Objet : Re: [postgis-users] Trouble adding Postgis 1.5.3 layer to QGis

On Fri, Sep 23, 2011 at 03:19:36PM +0200, Dominique LE COCQ wrote:
> Hi
> Thanks for your answer. We were using PostGis 1.5.2 before upgrading, and
it
> used to work properly with QGis. 
> The problem is that there is no setsrid function calling for a (BOX3D,
> integer) in postgis 1.5.3 (nor in postgis 1.5.2), but it is what QGis is
> asking each time we're trying to load postgis layer to QGis.

But it worked in 1.5.2 ?
Did you get to 1.5.2 after a chain of upgrades and 1.5.3 from scratch ?
There's never been a SetSRID taking BOX3D, but implicit casts transformed
that BOX3D into a GEOMETRY, passing the latter to SetSRID.

What's the exact error PostGIS is giving you back ?

> In fact, it seems that in postgis 1.5.3 the BoX3D element doesn't derive
> from the geometry type. 

Funny that you mention, as we're actually planning to make a BOX derivate
of GEOMETRY for 2.0

--strk;

  ()   Free GIS & Flash consultant/developer
  /\   http://strk.keybit.net/services.html
_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users




More information about the postgis-users mailing list