[Mapserver-users] bug #316 and ms4 missing functions
Steve Lime
steve.lime at dnr.state.mn.us
Wed Jul 2 07:19:56 PDT 2003
The nightly is not current yet because of the switch in CVS servers.
You'll need to use a CVS client to be sure your getting the absolutely
newest code.
Steve
>>> Twan Kogels <twan at twansoft.com> 07/02/03 08:04AM >>>
Hello Paul,
Thanks for the reply, i've changed the code you had specified and now
it
works. But querying still gives me the #316 bug. Then i found out that
i
had downloaded the ms4.0b and not the latest from cvs (the nightly
one), so
i downloaded it and compiled it. Works great.
The #316 bug is also gone, but now i've got a another strange error
when
querying a postgis layer:
===============
Fatal error: MapServer Error in msPOSTGISLayerGetShape(): Error
executing
POSTGIS SQL statement (in FETCH ALL): DECLARE mycursor BINARY CURSOR
FOR
SELECT
id::text,adnaa::text,adsub::text,adeti::text,adpub::text,adper::text,adafk::text,adlo1::text,adst1::text,adhu1::text,adto1::text,adpo1::text,adwo1::text,adwt1::text,adlo2::text,adst2::text,adhu2::text,adto2::text,adpo2::text,adwo2::text,adwt2::text,adpro::text,adlac::text,adlan::text,adpob::text,adne1::text,adab1::text,adat1::text,adne2::text,adab2::text,adat2::text,adne3::text,adab3::text,adat3::text,adtla::text,adnef::text,adabf::text,ademl::text,adwww::text,adach::text,advoo::text,adtus::text,adtit::text,admvo::text,adafd::text,adfun::text,adber::text,adwco::text,adwna::text,adves::text,adrel::text,adter::text,aduni::text,adond::text,addin::text,addco::text,addwy::text,addto::text,addve::text,adred::text,adopm::text,adtek::text,adnaa_dg::text,adsub_dg::text,adeti_dg::text,adpub_dg::text,adper_dg::text,adafk_dg::text,adlo1_dg::text,adst1_dg::text,adhu1_dg::text,adto
===============
I suspected that this was only a half part of the error, so i modified
mappostgis.c so that it would print the actual cause of the error (and
not
the long sql statement):
===============
Fatal error: MapServer Error in msPOSTGISLayerGetShape(): Error
executing
POSTGIS SQL statement (in FETCH ALL): temp -ERROR: Cannot cast type
boolean
to text
More Help:
Error with POSTGIS data variable. You specified ''.
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#>'
===============
I suspect there are 2 possible causes of this error:
1. the sql query is just too long, and gets shorten in the process
which
causes postgresql to give the error.
2. postgresql can't convert text to boolean (there are 2 boolean
columns in
my table)
Is there a method which allows me to specify the columns which postgis
should query, so that postgis does not try to query all the columns in
the
table.
I'm using the following query on my postgis layer:
============
$lo->set("data", "the_geom from og");
============
Table og contains about 150 colums (it couldn't be less, but that's out
of
the scope of the email).
Best regards,
Twan Kogels
At 07:28 2-7-2003 -0400, you wrote:
>Twan,
>
>The format of the mapfile has changed somewhat. Two of the changes
relate
>to your problem.
>
>The symbol is now part of a new style object, that is part of a class
>object. Color objects are no longer referenced by index because of 24
bit
>support, you now have an API to set the RGB color directly.
>
>This means that you would make the following:
>
>$co = ms_newClassObj($lo);
>$co->set("name", "mysym" );
>$st = ms_newStyleObj($co);
>$st->set( "symbol", $mymap->getSymbolByName('star') );
>
>
>$co->label->backgroundcolor->SetRGB( 255, 255, 255 );
>
>The migration guide that explains these and other changes is at:
>
>http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?MigrationGuide
>
>I recommend that you investigate the README in the mapscript/php3
>directory for specific API details.
>
>I don't know how difficult back-porting the postgis query bug would
be.
>
>Cheers,
>
>Paul
>
>Twan Kogels wrote:
>
>>Hello,
>>Tomorrow i've hit a know bug when quering a postgis layer with
mapserver
>>3.6.5, its on bugszilla
<http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=316>
>>So i tryed the latest cvs version of mapserver (4.0b), it configures
and
>>compiles oke. But it some mapscript functions seems to have
dissapear,
>>for example i have mapscript generate a postgis layer:
>>==========
>> $co=ms_newClassObj($lo);
>> $co->set("name", "mysym");
>> $temp=$mymap->getSymbolByName('star');
>> $co->set("symbol", $temp);
>>==========
>>This part of code returns a error:
>>==========
>>Property 'symbol' does not exist in this object.
>>==========
>>The same happens with:
>>==========
>> $co->label->set("type", MS_BITMAP);
>> $co->label->set("backgroundcolor",
$mymap->addColor(255,255,225));
>>==========
>>results in:
>>==========
>>Call to undefined function: addcolor()
>>==========
>>These mapscript functions are doing it correct with mapserver 3.6.5.
>>Is it possible that i've downloaded a cvs version where some
mapscript
>>functions are broken? If so, is it possible for me to modify the
>>mapserver 3.6.5 source (which functions perfect) so bug #316 won't
appear
>>anymore?
>>Best regards,
>>Twan Kogels
>>_______________________________________________
>>Mapserver-users mailing list
>>Mapserver-users at lists.gis.umn.edu
>>http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>
>--
>Paul Spencer
>Applications and Software Development
>DM Solutions Group Inc.
>http://www.dmsolutions.ca
>
>
>_______________________________________________
>Mapserver-users mailing list
>Mapserver-users at lists.gis.umn.edu
>http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
_______________________________________________
Mapserver-users mailing list
Mapserver-users at lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
More information about the MapServer-users
mailing list