<div dir="ltr"><div>Hi all,</div>I have a java program calling the method draw() of class edu.umn.gis.mapscript.mapObj<br><div>after I compiled mapserver 7.6.4 on Ubuntu 20.04</div><div></div><div></div><div><br></div><div>The result produce the following error:</div><div><b>java.lang.UnknownError:
msDrawMap():</b> Image handling error. Failed to draw layer named
'MyLayer'.;<b>msPostGISLayerWhichShapes(): Query error</b>.
Error executing query. Check server logs<br> edu.umn.gis.mapscript.mapscriptJNI.mapObj_draw(Native Method)<br> edu.umn.gis.mapscript.mapObj.draw(mapObj.java:397)<br><br clear="all"></div><div>In mapfile I set the parameters:</div><div><b>CONFIG</b> "MS_ERRORFILE" "myfile"</div><div><b>DEBUG</b> 6</div><div>...<br></div><div><b>LAYER</b></div><div> <b>CONNECTIONTYPE</b> postgis</div><div><div> <b>DATA</b> "the_geom FROM (SELECT * FROM classi_comuni WHERE tipo_area = 2 ORDER BY tipo_area DESC) AS confini USING UNIQUE gid"<br></div><div> <b>CLASSITEM</b> "my_column"</div><div>...<br><br></div></div><div>and in the error file I got the following message:</div><div>[Wed Jan 26 17:14:19 2022].558530 msDrawMap(): rendering using outputformat named png24 (AGG/PNG).<br>[Wed Jan 26 17:14:19 2022].569532 msPostGISLayerWhichShapes(): Error (ERROR: parse error - invalid geometry<br>HINT: "POLYGON((774076,75" <-- parse error at position 18 within geometry<br>) executing query: select "my_column"::text,ST_AsBinary(("the_geom"),'NDR') as geom,"gid"::text from (SELECT * FROM classi_comuni WHERE tipo_area = 2 ORDER BY tipo_area DESC) AS confini where "the_geom" && ST_GeomFromText('<b>POLYGON((774076,75 4875124,5,774076,75 5115124,5,1014076,75 5115124,5,1014076,75 4875124,5,774076,75 4875124,5))</b>',find_srid('','classi_comuni','the_geom'))<br>[Wed Jan 26 17:14:19 2022].569545 msPostGISLayerWhichShapes(): Query error. Error executing query. Check server logs<br>[Wed Jan 26 17:14:19 2022].569605 msDrawMap(): Image handling error. Failed to draw layer named 'MyLayer'.</div><div><br></div><div>I checked the error is caused by decimal separators being commas instead of dots.</div><div>As far as I understand the correct query would be (in <b><span style="background-color:rgb(255,0,0)">red</span></b> the changes):</div><div>select "my_column"::text,ST_AsBinary(("the_geom"),'NDR') as
geom,"gid"::text from (SELECT * FROM classi_comuni WHERE tipo_area = 2
ORDER BY tipo_area DESC) AS confini where "the_geom" &&
ST_GeomFromText('<b>POLYGON((774076<span style="background-color:rgb(255,0,0)">.</span>75 4875124<span style="background-color:rgb(255,0,0)">.</span>5,774076<span style="background-color:rgb(255,0,0)">.</span>75
5115124<span style="background-color:rgb(255,0,0)">.</span>5,1014076<span style="background-color:rgb(255,0,0)">.</span>75 5115124<span style="background-color:rgb(255,0,0)">.</span>5,1014076<span style="background-color:rgb(255,0,0)">.</span>75 4875124.5,774076<span style="background-color:rgb(255,0,0)">.</span>75
4875124<span style="background-color:rgb(255,0,0)">.</span>5</b>))',find_srid('','classi_comuni','the_geom'))</div><div><br></div><div><br></div><div>I think I should set something during the compilation of java mapserver library.<br></div><div></div><div>Please can someone drive me on how to solve it?</div><div></div><div><br></div><div><br></div><div>Thank you,</div><div>Francesco<br></div><div><br></div><div><br></div><div><br></div></div>