[MS4W-Users] The "!BOX!" statement doesn't work since update to ms4w 4.0.5

Jeff McKenna jmckenna at gatewaygeomatics.com
Wed Feb 10 20:03:06 UTC 2021


Hello Evgeni,

You may have found a good one (this was an old hack literally named in 
the source code "Box hackery" ha).  This will be tricky to reproduce, 
but I am sure that you can help with this part :)

Please submit this as a new ticket at 
https://github.com/MapServer/MapServer/issues  But most importantly, 
please attach a small test case to that ticket (yes it can be done for 
PostGIS). For example, your test case should be a zip file that contains:

1) mapfile with 1 layer
2) commands.txt (containing the commands to reproduce, in this case the 
createdb commands, load postgis extension, and command to call the 
external SQL file, and the final shp2img command to throw error)
3) your SQL file (that is the create table command, for your sample 
polygon geometry)
4) state your exact MapServer version (that fails, and the last version 
that also works for you)
5) you could include a working full query (from the last MapServer 
version that worked) by checking your PostgreSQL log file (hint: set 
log_statement = 'all' in your postgresql.conf)

    or also check that (for the failing MapServer version) the 
PostgreSQL log file does not in fact record any hit for that query 
attempt (this is a sign that MapServer is failing).

Thanks, this may be a good find (I'm not 100% sure at the moment, until 
I test with your nice test case).

-jeff





-- 
Jeff McKenna
GatewayGeo: MapServer Consulting and Training Services
co-founder of FOSS4G
http://gatewaygeo.com/




On 2021-02-10 11:12 a.m., Evgeni via MS4W-Users wrote:
> 
> 
> Hallo ms4w user,
> 
> since upgrade to ms4w 4.0.5 the !BOX! variable in the DATA statement of 
> the mapserver map file no longer works.
> 
> Here is an example that has stopped working since the upgrade:
> 
> CONNECTIONTYPE postgis
> CONNECTION "user = read_only dbname = geodata host = localhost port = 5433"
> DATA "geom from (select max (gid) as ggid, nam, st_union(the_geom) as 
> geom from stadtplan.ver02_l where the_geom && st_GeomFromText (st_astext 
> (!BOX!), 25832) group by nam) as ver02 using unique ggid USING SRID = 25832"
> 
> 
> This query now causes a SQL error.
> Does this variable no longer exist in the new Mapserver version? Has it 
> been replaced or completely deleted?
> 
> 
> Greetings from Germany
> 
> 
> Evgeni Tcheraksski
> 
> _______________________________________________
> MS4W-Users mailing list
> MS4W-Users at lists.ms4w.com
> https://lists.ms4w.com/mailman/listinfo/ms4w-users
> 



More information about the MS4W-Users mailing list