[mapserver-users] RE: making POINT with SQL
Rahkonen Jukka
Jukka.Rahkonen at mmmtike.fi
Mon Apr 11 13:51:35 PDT 2011
Hi,
Your %data% looks rather similar than the example. You seem to miss
"using unique", try what happens if you add it.
-Jukka Rahkonen-
Juan Carlos Monestel wrote:
> Hi Jukka,
> This is the error in the debug file:
Warning: [MapServer Error]: msDrawMap(): Failed to draw layer named
'test'. in /xxx/xx/xx/xxx.php on line 992
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
http://postgis.refractions.net/documentation/
<http://postgis.refractions.net/documentation/> Mappostgis.c - version
of Jan 23/2004. in
/var/www/html/dev/jmonestel/trunk/app/lib/mapaMapscriptF.class.php on
line 992
This is my Layer:
LAYER
NAME test
TYPE POINT
STATUS ON
connectiontype POSTGIS
connection "dbname=xxxx user=xxxxx host=xxxxx port=xxxxx"
data "%data%"
projection
"proj=latlong"
"ellps=WGS84"
"datum=WGS84"
end
CLASS
NAME "juan"
STYLE
SYMBOL 'juan2'
COLOR 0 119 255
SIZE 2
END
END
END # layer
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"
The SQL brings me an geo info
("0101000020E610000079E9263108DC42C08716D9CEF75338C0") that in text is =
"POINT(-37.719 -24.328)"
-----Original Message-----
From: Rahkonen Jukka [mailto:Jukka.Rahkonen at mmmtike.fi
<mailto:Jukka.Rahkonen at mmmtike.fi> ]
Sent: Thu 4/7/2011 3:35 PM
To: Juan Carlos Monestel; mapserver-users at lists.osgeo.org
Subject: Re: [mapserver-users] RE: making POINT with SQL
Hi,
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.
-Jukka Rahkonen-
Juan Carlos Monestel wrote:
> Hi
> it is not drawing and no error occurs
-----Original Message-----
From: Lime, Steve D (DNR) [mailto:steve.lime at state.mn.us
<mailto:steve.lime at state.mn.us> ]
Sent: Thu 4/7/2011 2:43 PM
To: Juan Carlos Monestel; mapserver-users at lists.osgeo.org
Subject: RE: making POINT with SQL
What does "not working" mean? Steve
From: mapserver-users-bounces at lists.osgeo.org
[mailto:mapserver-users-bounces at lists.osgeo.org
<mailto:mapserver-users-bounces at lists.osgeo.org> ] On Behalf Of Juan
Carlos Monestel
Sent: Thursday, April 07, 2011 12:04 PM
To: mapserver-users at lists.osgeo.org
Subject: [mapserver-users] making POINT with SQL
Hello
I'm trying to make an POINT in the map but it's not working
this is my Layer
layer
name "ponto"
connectiontype POSTGIS
connection "dbname=xxxx user=xxxxx host=xxxxx port=xxxxx"
data "geo_info from table"
type point
status on
metadata
tile_source "nocache"
end
maxscale 3000001
class
style
size 4
symbol "circulo"
color 0 0 0
end
style
size 1
symbol "circulo"
color 255 255 255
end
end
end
The SQL brings me an geo info
("0101000020E610000079E9263108DC42C08716D9CEF75338C0") that in text is =
"POINT(-37.719 -24.328)"
Any Ideas ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20110411/ddb858b0/attachment.htm>
More information about the MapServer-users
mailing list