<div dir="ltr">Hi,<div><br></div><div>I am following the instructions for using OpenStreetMap data in MapServer here:</div><div><br></div><div><a href="https://github.com/mapserver/mapserver/wiki/RenderingOsmDataWindows">https://github.com/mapserver/mapserver/wiki/RenderingOsmDataWindows</a><br></div><div><br></div><div>I've been almost all the way through the steps getting everything to work until I reached the step "Testing with shp2img" which says to run this:</div><div><br></div><div><font face="monospace">          shp2img -m osm-google.map -o output.png -map_debug 3</font><br></div><div><br></div><div>It fails, like this:</div><div><br></div><div><font face="monospace">msDrawMap(): rendering using outputformat named png (AGG/PNG).<br>msDrawMap(): WMS/WFS set-up and query, 0.000s<br>msPostGISLayerWhichShapes(): Error (out of memory for query result<br>) executing query: SELECT "name"::text,ST_AsBinary(("geometry"),'NDR') as geom,"osm_id"::text FROM (select geometry,osm_id, name as name from osm_new_buildings) as foo WHERE "geometry" && ST_GeomFromText('POLYGON((-20037508.3427892 -3113412.49464005,-20037508.3427892 15861721.9613068,-1062373.88684241 15861721.9613068,-1062373.88684241 -3113412.49464005,-20037508.3427892 -3113412.49464005))',3857)<br>msPostGISLayerWhichShapes(): Query error. Error executing query. Check server logs<br>msDrawMap(): Image handling error. Failed to draw layer named 'buildings3'.<br>msDrawMap(): Image handling error. Failed to draw layer named 'buildings3'. <br><br>msPostGISLayerWhichShapes(): Query error. Error executing query. Check server logs <br><br></font></div><div><br></div><div>--</div><div>I don't see anything in the MapServer logs and don't really understand what is wrong.</div><div><br></div><div>I tried specifying individual layers with "-l <layer_name>" to the shp2img command and most of them work, which I find encouraging.</div><div>Specifying layer "buildings3" which failed above still fails when specified individually.</div><div><br></div><div>I'm using Postgres 14, MS4W 4.0.5, MapServer 7.6.4 on Windows 10.</div><div><br></div><div>Inspecting the "osm-google.map" file doesn't show me anything very strange but I'm no expert.  I pasted the LAYER section for "buildings3" at the bottom in case someone spots anything.</div><div>(The process used to generate this file is ... well ... amazing!)</div><div><br></div><div>I am using data from <a href="http://geofabric.de">geofabric.de</a> for the USA (<a href="http://download.geofabrik.de/north-america/us-latest.osm.pbf">http://download.geofabrik.de/north-america/us-latest.osm.pbf</a>) downloaded two days ago.</div><div><br></div><div>Does anyone have any suggestions on getting to the bottom of this?  I feel like I'm tantalizingly close!<br></div><div><br></div><div>Thanks a lot,</div><div><br></div><div>carl</div><div><br></div><div>---</div><div><div style="color:rgb(0,0,0);font-family:Consolas,"Courier New",monospace;font-size:14px;line-height:19px;white-space:pre"><div><span style="color:rgb(121,94,38)">LAYER</span></div><div>    <span style="color:rgb(0,0,255)">STATUS</span> <span style="color:rgb(0,16,128)">ON</span></div><div>    <span style="color:rgb(121,94,38)">PROJECTION</span></div><div>        "init=epsg:3857"</div><div>    <span style="color:rgb(121,94,38)">END</span></div><div>    <span style="color:rgb(0,0,255)">GROUP</span> "default"</div><div>    <span style="color:rgb(0,0,255)">NAME</span> "buildings3"</div><div>    <span style="color:rgb(0,0,255)">TYPE</span> <span style="color:rgb(0,16,128)">POLYGON</span></div><div>    <span style="color:rgb(0,0,255)">CONNECTIONTYPE</span> <span style="color:rgb(0,16,128)">postgis</span></div><div>    <span style="color:rgb(0,0,255)">CONNECTION</span> "host=localhost dbname=osm user=postgres password=postgres port=5432"</div><div>    <span style="color:rgb(0,0,255)">DATA</span> "geometry from (select geometry,osm_id, name as name from osm_new_buildings) as foo using unique osm_id using srid=3857"</div><div>    <span style="color:rgb(0,0,255)">LABELITEM</span> "name"</div><div>    <span style="color:rgb(0,0,255)">PROCESSING</span> "LABEL_NO_CLIP=ON"</div><div>    <span style="color:rgb(0,0,255)">PROCESSING</span> "CLOSE_CONNECTION=DEFER"</div><div>    <span style="color:rgb(0,0,255)">MAXSCALEDENOM</span> <span style="color:rgb(9,134,88)">83202051</span></div><div>    <span style="color:rgb(0,0,255)">MINSCALEDENOM</span> <span style="color:rgb(9,134,88)">41601025</span></div><div>    <span style="color:rgb(121,94,38)">CLASS</span></div><div>      <span style="color:rgb(121,94,38)">STYLE</span></div><div>         <span style="color:rgb(0,0,255)">COLOR</span> "<span style="color:rgb(9,134,88)">#bbbbbb</span>"</div><div>         <span style="color:rgb(0,0,255)">OPACITY</span> <span style="color:rgb(9,134,88)">50</span></div><div>      <span style="color:rgb(121,94,38)">END</span></div><div>      <span style="color:rgb(121,94,38)">STYLE</span></div><div>         <span style="color:rgb(0,0,255)">OUTLINECOLOR</span> "<span style="color:rgb(9,134,88)">#333333</span>"</div><div>         <span style="color:rgb(0,0,255)">WIDTH</span> <span style="color:rgb(9,134,88)">0</span></div><div>      <span style="color:rgb(121,94,38)">END</span></div><div>   <span style="color:rgb(121,94,38)">END</span></div><div><span style="color:rgb(121,94,38)">END</span></div></div></div></div>