<div dir="ltr">Hi Jörg, aimdev, and Jukka,<div><br><div>Thanks for all of the help!</div></div><div><br></div><div>I turned "buildings3" off with LAYER/STATUS OFF and found that rerunning the shp2img now works fine. </div><div><br></div><div>But then trying the very next step, which is using this URL in the browser:<br><br> <a href="http://localhost/cgi-bin/mapserv.exe">http://localhost/cgi-bin/mapserv.exe</a>?<br> mode=browse&<br> template=openlayers&<br> layers=all&<br> map=C:/ms4w/apps/osm/basemaps/osm-google.map<br><br>fails with the same old error because of my old friend "buildings3."</div><div><br></div><div>So I changed these </div><div><br></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(0,0,255)">MINSCALEDENOM</span> <span style="color:rgb(9,134,88)">99999999999</span></div><div> <span style="color:rgb(0,0,255)">MAXSCALEDENOM</span> <span style="color:rgb(9,134,88)">99999999999</span></div></div></div><div><br></div><div>and now that works. (I guess layers=all means ALL LAYERS even if STATUS is OFF.)</div><div><br></div><div>I have now made it all the way through the instructions in Jeff's tutorial and am ready to strike out on my own.</div><div><br></div><div>Thanks very much for your help,</div><div><br></div><div>carl</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Nov 18, 2021 at 2:03 PM Carl Godkin <<a href="mailto:cgodkin@gmail.com">cgodkin@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><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" target="_blank">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" target="_blank">geofabric.de</a> for the USA (<a href="http://download.geofabrik.de/north-america/us-latest.osm.pbf" target="_blank">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-wrap"><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>
</blockquote></div>