<span style="font-weight: bold;">Dear users, i have a problem with the following query.</span><br><br>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');
<br><br>where 'r13_ejes_32719' is the table with the street data, 'nombre' the flied with the street name.<br><br>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;
<br><br><span style="font-weight: bold;">postgresql 8.0.3, win32 binary package, has the folowing:</span> <br>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"<br><br><span style="font-weight: bold;">postgresql 8.1.7, win32 binary package, has the folowing;</span> <br>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"<br clear="all"><br><br><br><span style="font-weight: bold;">In postgresql 8.0.3 the shape dumper creates this DDL</span><br><br>CREATE TABLE "public"."r13_ejes_32719" (
<br>  "gid" SERIAL, <br>  "fnode_" BIGINT, <br>  "tnode_" BIGINT, <br>  "lpoly_" BIGINT, <br>  "rpoly_" BIGINT, <br>  "length" NUMERIC, <br>  "svial05_" BIGINT, 
<br>  "svial05_id" BIGINT, <br>  "iniizq" NUMERIC(20,0), <br>  "terizq" NUMERIC(20,0), <br>  "inider" NUMERIC(20,0), <br>  "terder" NUMERIC(20,0), <br>  "nombre" VARCHAR, 
<br>  "clase" VARCHAR, <br>  "prefijo" VARCHAR, <br>  "observ" VARCHAR, <br>  "transito" NUMERIC(20,0), <br>  "id_saf" NUMERIC(20,0), <br>  "the_geom" "public"."geometry", 
<br>  CONSTRAINT "r13_ejes_32719_pkey" PRIMARY KEY("gid"), <br>  CONSTRAINT "enforce_geotype_the_geom" CHECK ((geometrytype(the_geom) = 'MULTILINESTRING'::text) OR (the_geom IS NULL)), <br>  CONSTRAINT "enforce_srid_the_geom" CHECK (srid(the_geom) = 32719)
<br>) WITH OIDS;<br><br><br><span style="font-weight: bold;">In postgresql 8.1.7 the shape dumper creates this DDL</span><br><br>CREATE TABLE "public"."r13_ejes_32719" (<br>  "gid" SERIAL, <br>
  "fnode_" BIGINT, <br>  "tnode_" BIGINT, <br>  "lpoly_" BIGINT, <br>  "rpoly_" BIGINT, <br>  "length" NUMERIC, <br>  "svial05_" BIGINT, <br>  "svial05_id" BIGINT, 
<br>  "iniizq" NUMERIC(20,0), <br>  "terizq" NUMERIC(20,0), <br>  "inider" NUMERIC(20,0), <br>  "terder" NUMERIC(20,0), <br>  "nombre" VARCHAR, <br>  "clase" VARCHAR, 
<br>  "prefijo" VARCHAR, <br>  "observ" VARCHAR, <br>  "transito" NUMERIC(20,0), <br>  "id_saf" NUMERIC(20,0), <br>  "the_geom" "public"."geometry", <br>
  CONSTRAINT "r13_ejes_32719_pkey" PRIMARY KEY("gid"), <br>  CONSTRAINT "enforce_dims_the_geom" CHECK (ndims(the_geom) = 2), <br>  CONSTRAINT "enforce_geotype_the_geom" CHECK ((geometrytype(the_geom) = 'MULTILINESTRING'::text) OR (the_geom IS NULL)), 
<br>  CONSTRAINT "enforce_srid_<br>the_geom" CHECK (srid(the_geom) = 32719)<br>) WITHOUT OIDS;<br><br><br><span style="font-weight: bold;">Finally, the output for the query in postgresql 8.0.3 is</span><br><br>SRID=-1;POINT(
355514.59375 6290622)     (the intersection point between "LOS RECUERDOS" and "LOS NOGALES" streets)<br><br><span style="font-weight: bold;">and the output in postgresql 8.1.7 is</span><br><br>ERROR:  GEOS Intersection() threw an error! (i don't know why....)
<br><br>Can any body help me with this problem ?<br><br>Best Regards<br><br><br>-- <br>René F. Viáncos S.<br>Director de Geomática y TIC<br>Vicerrectoría de Investigación y Desarrollo<br>Universidad de Chile<br>Tel (56-2) 632 62 09
<br>Cel (56 9) 933 72 66<br><a href="mailto:rviancos@uchile.cl">rviancos@uchile.cl</a><br><a href="mailto:rviancos@gmail.com">rviancos@gmail.com</a><br><a href="http://www.investigacion.uchile.cl">www.investigacion.uchile.cl
</a>