[postgis-users] Query Problem pg 8.0.3 and 8.1.7

René F. Viancos S. rviancos at gmail.com
Thu Feb 16 17:19:25 PST 2006


Dear users, i have a problem with the following query.

SELECT DISTINCT(intersection((SELECT collect(the_geom) FROM r13_ejes_32719
WHERE nombre = 'LOS RECUERDOS'),(SELECT collect(the_geom) FROM
r13_ejes_32719 WHERE nombre = 'LOS NOGALES'))) FROM r13_ejes_32719 WHERE
(nombre = 'LOS RECUERDOS' OR nombre = 'LOS NOGALES');

where 'r13_ejes_32719' is the table with the street data, 'nombre' the flied
with the street name.

In postgresql 8.0.3 works fine, but doesn't in postgresql 8.1.7 and i have
executed the postgis_full_version() in both versions;

postgresql 8.0.3, win32 binary package, has the folowing:
POSTGIS="0.9.1" GEOS="2.1.1" PROJ="Rel. 4.4.9, 29 Oct 2004" USE_STATS
DBPROC="0.0.1" RELPROC="0.0.1"

postgresql 8.1.7, win32 binary package, has the folowing;
POSTGIS="1.0.4" GEOS="2.1.4" PROJ="Rel. 4.4.9, 29 Oct 2004" USE_STATS
DBPROC="0.3.0" RELPROC="0.3.0"



In postgresql 8.0.3 the shape dumper creates this DDL

CREATE TABLE "public"."r13_ejes_32719" (
  "gid" SERIAL,
  "fnode_" BIGINT,
  "tnode_" BIGINT,
  "lpoly_" BIGINT,
  "rpoly_" BIGINT,
  "length" NUMERIC,
  "svial05_" BIGINT,
  "svial05_id" BIGINT,
  "iniizq" NUMERIC(20,0),
  "terizq" NUMERIC(20,0),
  "inider" NUMERIC(20,0),
  "terder" NUMERIC(20,0),
  "nombre" VARCHAR,
  "clase" VARCHAR,
  "prefijo" VARCHAR,
  "observ" VARCHAR,
  "transito" NUMERIC(20,0),
  "id_saf" NUMERIC(20,0),
  "the_geom" "public"."geometry",
  CONSTRAINT "r13_ejes_32719_pkey" PRIMARY KEY("gid"),
  CONSTRAINT "enforce_geotype_the_geom" CHECK ((geometrytype(the_geom) =
'MULTILINESTRING'::text) OR (the_geom IS NULL)),
  CONSTRAINT "enforce_srid_the_geom" CHECK (srid(the_geom) = 32719)
) WITH OIDS;


In postgresql 8.1.7 the shape dumper creates this DDL

CREATE TABLE "public"."r13_ejes_32719" (
  "gid" SERIAL,
  "fnode_" BIGINT,
  "tnode_" BIGINT,
  "lpoly_" BIGINT,
  "rpoly_" BIGINT,
  "length" NUMERIC,
  "svial05_" BIGINT,
  "svial05_id" BIGINT,
  "iniizq" NUMERIC(20,0),
  "terizq" NUMERIC(20,0),
  "inider" NUMERIC(20,0),
  "terder" NUMERIC(20,0),
  "nombre" VARCHAR,
  "clase" VARCHAR,
  "prefijo" VARCHAR,
  "observ" VARCHAR,
  "transito" NUMERIC(20,0),
  "id_saf" NUMERIC(20,0),
  "the_geom" "public"."geometry",
  CONSTRAINT "r13_ejes_32719_pkey" PRIMARY KEY("gid"),
  CONSTRAINT "enforce_dims_the_geom" CHECK (ndims(the_geom) = 2),
  CONSTRAINT "enforce_geotype_the_geom" CHECK ((geometrytype(the_geom) =
'MULTILINESTRING'::text) OR (the_geom IS NULL)),
  CONSTRAINT "enforce_srid_
the_geom" CHECK (srid(the_geom) = 32719)
) WITHOUT OIDS;


Finally, the output for the query in postgresql 8.0.3 is

SRID=-1;POINT(355514.59375 6290622)     (the intersection point between "LOS
RECUERDOS" and "LOS NOGALES" streets)

and the output in postgresql 8.1.7 is

ERROR:  GEOS Intersection() threw an error! (i don't know why....)

Can any body help me with this problem ?

Best Regards


--
René F. Viáncos S.
Director de Geomática y TIC
Vicerrectoría de Investigación y Desarrollo
Universidad de Chile
Tel (56-2) 632 62 09
Cel (56 9) 933 72 66
rviancos at uchile.cl
rviancos at gmail.com
www.investigacion.uchile.cl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20060216/0af80a78/attachment.html>


More information about the postgis-users mailing list