<!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> </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. 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> </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> </DIV>
<DIV dir=ltr align=left><FONT face=Tahoma><FONT size=2><SPAN
class=484424620-11042011><FONT face=Arial
color=#0000ff> </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>
wrote:</FONT></SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT size=2><SPAN class=484424620-11042011><FONT
face=Arial color=#0000ff> </FONT></SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT size=2><SPAN class=484424620-11042011><FONT
face=Arial color=#0000ff>></FONT> </SPAN>Hi Jukka,<BR><BR><SPAN
class=484424620-11042011><FONT face=Arial color=#0000ff><FONT
face="Times New Roman" color=#000000>> </FONT> </FONT></SPAN>This is the
error in the debug file:<BR><BR><SPAN class=484424620-11042011><FONT face=Arial
color=#0000ff> </FONT></SPAN></FONT><FONT size=2><SPAN
class=484424620-11042011> </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> NAME
test<BR> TYPE
POINT<BR> STATUS
ON<BR> connectiontype
POSTGIS<BR> connection "dbname=xxxx
user=xxxxx host=xxxxx port=xxxxx"<BR>
data "%data%"<BR>
projection<BR>
"proj=latlong"<BR>
"ellps=WGS84"<BR>
"datum=WGS84"<BR>
end<BR> CLASS<BR>
NAME "juan"<BR>
STYLE<BR>
SYMBOL
'juan2'<BR>
COLOR 0 119
255<BR>
SIZE
2<BR>
END<BR> 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>> Hi<BR>> 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> name
"ponto"<BR> connectiontype
POSTGIS<BR> connection "dbname=xxxx
user=xxxxx host=xxxxx port=xxxxx"<BR>
data "geo_info from table"<BR> type
point<BR> status
on<BR>
metadata<BR>
tile_source "nocache"<BR>
end<BR> maxscale
3000001<BR>
class<BR>
style<BR>
size
4<BR>
symbol
"circulo"<BR>
color 0 0
0<BR>
end<BR>
style<BR>
size
1<BR>
symbol
"circulo"<BR>
color 255 255
255<BR>
end<BR> 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>