[mapserver-users] query in postgis works but in mapfile failed, why??

Gery gamejihou at hotmail.com
Thu Oct 20 05:58:49 EDT 2011


Hello,

I have my db in postgis and I get the data from it through my mapfile, these
work perfectly for instance:

DATA                    'geom FROM heat_flux_point USING UNIQUE fid USING
UNIQUE SRID=4326'
DATA                    'geom FROM (SELECT fid,contour,geom FROM
sar_contour_line WHERE contour=-600) AS FOO USING UNIQUE fid USING UNIQUE
SRID=4326'

but now I'm trying to get the intersection between two line geometries and
show the output in my html:

mop=# select seismic_line.profile from seismic_line, sar_contour_line
where seismic_line.geom && sar_contour_line.geom
and intersects(seismic_line.geom,sar_contour_line.geom)
and sar_contour_line.contour = -600 order by profile;

This in postgis gives:

   profile    
--------------
 1017
 1018
...etc
(354 rows)

and the same in my mapfile gives nothing:

DATA                    'geom FROM (SELECT
seismic_line.fid,seismic_line.profile,seismic_line.geom FROM seismic_line,
sar_contour_line WHERE seismic_line.geom && sar_contour_line.geom AND
INTERSECTS(seismic_line.geom, sar_contour_line.geom) AND
sar_contour_line.contour = -600) AS FOO USING UNIQUE fid USING UNIQUE
SRID=4326'

why??

Any support and hint are very welcome,

Thanks in advance,

Gery





--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/query-in-postgis-works-but-in-mapfile-failed-why-tp6912309p6912309.html
Sent from the Mapserver - User mailing list archive at Nabble.com.


More information about the mapserver-users mailing list