<div dir="ltr">I finally figured it out. I replaced calls to $layer->setFilter('column=value') with calls to $layer->setProcessing('NATIVE_FILTER=column=value'). I finally have map tiles rendering again! Thanks for the help, everyone!</div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>James Colannino, Modern Literary Fantasy Author (writing as Jeff Coleman)<br><span><a href="https://blog.jeffcolemanwrites.com/" target="_blank">https://blog.jeffcolemanwrites.com/</a></span><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Thu, Jun 8, 2017 at 9:23 AM, James Colannino <span dir="ltr"><<a href="mailto:crankycyclops@gmail.com" target="_blank">crankycyclops@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>I've done some more digging, and I've realized we're using PHP Mapscript to further configure the map tiles that are coming back.</div><div><br></div><div>I'm using the mapfile to generate a map object in PHP using:</div><div><br></div><div>$map = ms_newMapObj(mapfile_filename)<wbr>;</div><div><br></div><div>I then get the layer using:</div><div><br></div><div>$map->getLayer(0);</div><div><br></div><div>Finally, I set filters on the layer like this:</div><div><br></div><div>$layer->setFilter(...);</div><div><br></div><div>The filters being passed are native filters, and I see from the documentation that behavior regarding native filters has changed. I think this might be related to my problem. Does anyone know if the setFilter function accepts native filters as of Mapserver 7, and if not, if there's an equivalent function that does? I couldn't find it when referring to the Mapscript API.</div><div><br></div><div>Thank you so much!</div><div><div class="h5"><div class="gmail_extra"><div><div class="m_8544056464358490876gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Wed, Jun 7, 2017 at 10:02 PM, Stephen Woodbridge <span dir="ltr"><<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Try adding FILTER "t" and see if that fixes the issue. If it does, please write it up as a bug.<br>
<br>
-Steve W<div><div class="m_8544056464358490876gmail-h5"><br>
<br>
On 6/7/2017 3:27 AM, Jörg Thomsen (WhereGroup) wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Hi,<br>
<br>
had the same problem a few weeks ago. The solution was to fix the FILTER<br>
or EXPRESSION within the classes. I don't remember exactly...<br>
<br>
Jörg<br>
<br>
<br>
<br>
<br>
Am 07.06.2017 um 08:45 schrieb James Colannino:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Hi everyone,<br>
<br>
I have a problem that's got me stumped.<br>
<br>
I have the following layer defined in a mapfile:<br>
<br>
LAYER<br>
<br>
NAME "aggregates"<br>
TYPE POLYGON<br>
CONNECTIONTYPE POSTGIS<br>
CONNECTION "host=localhost port=5432 dbname=*** user=*** password=***"<br>
DATA "geom FROM (SELECT b.geom AS geom, a.peril_id, a.portfolio_id,<br>
a.tiv, a.thematic_tiv, a.aggregates_id FROM schema.aggregates a INNER<br>
JOIN gisdata.adm_1 b on a.gid = b.gid) AS c using SRID=4326 using unique<br>
aggregates_id"<br>
<br>
PROJECTION<br>
"proj=longlat"<br>
"ellps=WGS84"<br>
"datum=WGS84"<br>
"no_defs"<br>
END<br>
<br>
END<br>
<br>
This works perfectly on Mapserver 6.4, but on 7.0.5 it's failing (for<br>
what it's worth, I compiled 7.0.5 myself because my OS didn't have<br>
binary packages for it that supported php5-mapscript.) I turned on<br>
debugging and watched what kind of errors I was getting whenever I made<br>
tile requests. Here's what I found:<br>
<br>
[Wed Jun 7 03:42:43 <a href="tel:2017%5D.502983" value="+12017502983" target="_blank">2017].502983</a> msDrawMap(): rendering using<br>
outputformat named png (AGG/PNG).<br>
[Wed Jun 7 03:42:43 <a href="tel:2017%5D.503018" value="+12017503018" target="_blank">2017].503018</a> msDrawMap(): WMS/WFS set-up and query,<br>
0.000s<br>
[Wed Jun 7 03:42:43 <a href="tel:2017%5D.523359" value="+12017523359" target="_blank">2017].523359</a> msPostGISLayerWhichShapes(): Error<br>
(ERROR: syntax error at or near ")"<br>
LINE 1: ...2300166285,129.462890606979 36.6292300166285))',4326) and ()<br>
^<br>
) executing query: select<br>
"thematic_tiv",encode(ST_AsBin<wbr>ary(ST_Force2D("geom"),'NDR'),<wbr>'hex') as<br>
geom,"aggregates_id" from (SELECT b.geom AS geom, a.peril_id,<br>
a.portfolio_id, a.tiv, a.thematic_tiv, a.aggregates_id FROM<br>
portfolios.aggregates a INNER JOIN gisdata.adm_1 b on a.gid = b.gid) AS<br>
c where geom && ST_GeomFromText('POLYGON((129.<wbr>462890606979<br>
36.6292300166285,129.462890606<wbr>979 68.6423395678331,179.999999974<wbr>944<br>
68.6423395678331,179.999999974<wbr>944 36.6292300166285,129.462890606<wbr>979<br>
36.6292300166285))',4326) and ()<br>
[Wed Jun 7 03:42:43 <a href="tel:2017%5D.523377" value="+12017523377" target="_blank">2017].523377</a> msPostGISLayerWhichShapes(): Query<br>
error. Error executing query. Check server logs<br>
[Wed Jun 7 03:42:43 <a href="tel:2017%5D.523434" value="+12017523434" target="_blank">2017].523434</a> msDrawMap(): Image handling error.<br>
Failed to draw layer named 'area_aggregates_tiv'.<br>
[Wed Jun 7 03:42:43 <a href="tel:2017%5D.523927" value="+12017523927" target="_blank">2017].523927</a> msFreeMap(): freeing map at<br>
0x560aa573b6c0.<br>
<br>
That "and ()" at the end of the query causing the syntax error is very<br>
strange. It's like it's adding on a blank filter. I tried making the<br>
query as simple as possible, so I created another table that contained<br>
all the required information and changed the DATA line to:<br>
<br>
DATA "geom from portfolios.area_aggregates_joi<wbr>n using SRID=4326 using<br>
unique aggregates_id"<br>
<br>
However, I still got the same type of error. I'm completely stumped.<br>
Does anyone have an idea what could be happening? I've spent the past 4<br>
hours Googling with no success.<br>
<br>
Thank you!<br>
<br>
<br>
______________________________<wbr>_________________<br>
mapserver-users mailing list<br>
<a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.or<wbr>g</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/mapserver-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailma<wbr>n/listinfo/mapserver-users</a><br>
<br>
</blockquote>
<br>
<br>
Viele Grüße,<br>
Jörg Thomsen<br>
<br>
</blockquote>
<br>
<br></div></div>
---<br>
This email has been checked for viruses by Avast antivirus software.<br>
<a href="https://www.avast.com/antivirus" rel="noreferrer" target="_blank">https://www.avast.com/antiviru<wbr>s</a><div class="m_8544056464358490876gmail-HOEnZb"><div class="m_8544056464358490876gmail-h5"><br>
<br>
______________________________<wbr>_________________<br>
mapserver-users mailing list<br>
<a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.or<wbr>g</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/mapserver-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailma<wbr>n/listinfo/mapserver-users</a></div></div></blockquote></div><br></div></div></div></div>
</blockquote></div><br></div>