<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>RE: [mapserver-users] RE: making POINT with SQL</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.5945" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=484424620-11042011>Hi,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=484424620-11042011></SPAN></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=484424620-11042011>Your %data% looks rather similar than the 
example.&nbsp;You seem to miss "using unique", try what happens if you add 
it.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=484424620-11042011></SPAN></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=484424620-11042011>-Jukka Rahkonen-</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=484424620-11042011></SPAN></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT face=Tahoma><FONT size=2><SPAN 
class=484424620-11042011><FONT face=Arial 
color=#0000ff>&nbsp;</FONT></SPAN></FONT></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Tahoma size=2>Juan Carlos Monestel<SPAN 
class=484424620-11042011><FONT face=Arial color=#0000ff>&nbsp; 
wrote:</FONT></SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT size=2><SPAN class=484424620-11042011><FONT 
face=Arial color=#0000ff>&nbsp;</FONT></SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT size=2><SPAN class=484424620-11042011><FONT 
face=Arial color=#0000ff>&gt;</FONT>&nbsp;</SPAN>Hi Jukka,<BR><BR><SPAN 
class=484424620-11042011><FONT face=Arial color=#0000ff><FONT 
face="Times New Roman" color=#000000>&gt; </FONT>&nbsp;</FONT></SPAN>This is the 
error in the debug file:<BR><BR><SPAN class=484424620-11042011><FONT face=Arial 
color=#0000ff>&nbsp;</FONT></SPAN></FONT><FONT size=2><SPAN 
class=484424620-11042011>&nbsp;</SPAN>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 
</FONT><A href="http://postgis.refractions.net/documentation/"><FONT 
size=2>http://postgis.refractions.net/documentation/</FONT></A><FONT size=2> 
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 "dbname=xxxx 
user=xxxxx host=xxxxx port=xxxxx"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
data "%data%"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
projection<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
"proj=latlong"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
"ellps=WGS84"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
"datum=WGS84"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
end<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CLASS<BR>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; NAME "juan"<BR>&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; SYMBOL 
'juan2'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COLOR 0 119 
255<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SIZE 
2<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; 
END<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END<BR>END # 
layer<BR><BR><BR><BR><BR>My %data% is "geo_coordenada FROM (select 
cod_referencia as oid, geo_coordenada, ind_cor from ponto_referencia where 
cod_referencia = 1 ) as map using SRID=4326"<BR>The SQL brings me an geo info 
("0101000020E610000079E9263108DC42C08716D9CEF75338C0") that in text is = 
"POINT(-37.719 
-24.328)"<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>-----Original 
Message-----<BR>From: Rahkonen Jukka [</FONT><A 
href="mailto:Jukka.Rahkonen@mmmtike.fi"><FONT 
size=2>mailto:Jukka.Rahkonen@mmmtike.fi</FONT></A><FONT size=2>]<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) [</FONT><A 
href="mailto:steve.lime@state.mn.us"><FONT 
size=2>mailto:steve.lime@state.mn.us</FONT></A><FONT size=2>]<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 "not working" mean? Steve<BR><BR>From: 
mapserver-users-bounces@lists.osgeo.org [</FONT><A 
href="mailto:mapserver-users-bounces@lists.osgeo.org"><FONT 
size=2>mailto:mapserver-users-bounces@lists.osgeo.org</FONT></A><FONT size=2>] 
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 
"ponto"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; connectiontype 
POSTGIS<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; connection "dbname=xxxx 
user=xxxxx host=xxxxx port=xxxxx"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
data "geo_info from table"<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 "nocache"<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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
size 
4<BR>&nbsp;&nbsp;&nbsp;&nbsp;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BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end<BR>end<BR><BR><BR>The SQL 
brings me an geo info ("0101000020E610000079E9263108DC42C08716D9CEF75338C0") 
that in text is = "POINT(-37.719 -24.328)"<BR><BR><BR>Any Ideas 
?<BR><BR><BR><BR><BR><BR></DIV></FONT></BODY></HTML>