<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7654.12">
<TITLE>RE: [mapserver-users] RE: making POINT with SQL </TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>Hi Jukka,<BR>
<BR>
This is the error in the debug file:<BR>
<BR>
<BR>
Warning: [MapServer Error]: msDrawMap(): Failed to draw layer named 'test'. in /xxx/xx/xx/xxx.php on line 992<BR>
<BR>
Warning: [MapServer Error]: msPOSTGISLayerParseData(): Error parsing POSTGIS data variable. Must contain 'geometry_column from table_name' or 'geom from (subselect) as foo' (couldnt find ' from '). More help: Error with POSTGIS data variable. You specified '%data%'. Standard ways of specifiying are : (1) 'geometry_column from geometry_table' (2) 'geometry_column from (sub query) as foo using unique column name using SRID=srid#' Make sure you put in the 'using unique column name' and 'using SRID=#' clauses in. For more help, please see <A HREF="http://postgis.refractions.net/documentation/">http://postgis.refractions.net/documentation/</A> Mappostgis.c - version of Jan 23/2004. in /var/www/html/dev/jmonestel/trunk/app/lib/mapaMapscriptF.class.php on line 992<BR>
<BR>
<BR>
<BR>
<BR>
This is my Layer:<BR>
LAYER<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NAME test<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TYPE POINT<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; STATUS ON<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; connectiontype POSTGIS<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; connection &quot;dbname=xxxx user=xxxxx host=xxxxx port=xxxxx&quot;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; data &quot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nbsp; END<BR>
END # layer<BR>
<BR>
<BR>
<BR>
<BR>
My %data% is &quot;geo_coordenada FROM (select cod_referencia as oid, geo_coordenada, ind_cor from ponto_referencia where cod_referencia = 1 ) as map using SRID=4326&quot;<BR>
The SQL brings me an geo info (&quot;0101000020E610000079E9263108DC42C08716D9CEF75338C0&quot;) that in text is = &quot;POINT(-37.719 -24.328)&quot;<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
-----Original Message-----<BR>
From: Rahkonen Jukka [<A HREF="mailto:Jukka.Rahkonen@mmmtike.fi">mailto:Jukka.Rahkonen@mmmtike.fi</A>]<BR>
Sent: Thu 4/7/2011 3:35 PM<BR>
To: Juan Carlos Monestel; mapserver-users@lists.osgeo.org<BR>
Subject: Re: [mapserver-users] RE: making POINT with SQL<BR>
<BR>
Hi,<BR>
<BR>
First add DEBUG 5, it may generate some interesting information for you into ms_errorfile. Next, comment out maxscale to be sure it is not preventing the rendering. Change it to MAXSCALEDENOM later, maxscale is not to be used any more. Add PROJECTION into your LAYER for getting more control on what is happening. And tell us the exact request you were using. Very often a blank map without any errors means that Mapserver does not find data from the requested map window, and very often it is because of some misconfiguration or misunderstanding with projections.<BR>
<BR>
-Jukka Rahkonen-<BR>
<BR>
Juan Carlos Monestel wrote:<BR>
<BR>
<BR>
&gt; Hi<BR>
&gt; it is not drawing and no error occurs<BR>
<BR>
<BR>
<BR>
<BR>
-----Original Message-----<BR>
From: Lime, Steve D (DNR) [<A HREF="mailto:steve.lime@state.mn.us">mailto:steve.lime@state.mn.us</A>]<BR>
Sent: Thu 4/7/2011 2:43 PM<BR>
To: Juan Carlos Monestel; mapserver-users@lists.osgeo.org<BR>
Subject: RE: making POINT with SQL<BR>
<BR>
What does &quot;not working&quot; mean? Steve<BR>
<BR>
From: mapserver-users-bounces@lists.osgeo.org [<A HREF="mailto:mapserver-users-bounces@lists.osgeo.org">mailto:mapserver-users-bounces@lists.osgeo.org</A>] On Behalf Of Juan Carlos Monestel<BR>
Sent: Thursday, April 07, 2011 12:04 PM<BR>
To: mapserver-users@lists.osgeo.org<BR>
Subject: [mapserver-users] making POINT with SQL<BR>
<BR>
<BR>
Hello<BR>
I'm trying to make an POINT in the map but it's not working<BR>
<BR>
this is my Layer<BR>
layer<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name &quot;ponto&quot;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; connectiontype POSTGIS<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; connection &quot;dbname=xxxx user=xxxxx host=xxxxx port=xxxxx&quot;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; data &quot;geo_info from table&quot;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type point<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; status on<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; metadata<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tile_source &quot;nocache&quot;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; maxscale 3000001<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; class<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; style<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n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&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end<BR>
end<BR>
<BR>
<BR>
The SQL brings me an geo info (&quot;0101000020E610000079E9263108DC42C08716D9CEF75338C0&quot;) that in text is = &quot;POINT(-37.719 -24.328)&quot;<BR>
<BR>
<BR>
Any Ideas ?<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
</FONT>
</P>

</BODY>
</HTML>