Hi, I am following the instructions for using OpenStreetMap data in MapServer here:
https://github.com/mapserver/mapserver/wiki/RenderingOsmDataWindows 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: shp2img -m osm-google.map -o output.png -map_debug 3 It fails, like this: msDrawMap(): rendering using outputformat named png (AGG/PNG). msDrawMap(): WMS/WFS set-up and query, 0.000s msPostGISLayerWhichShapes(): Error (out of memory for query result ) 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) msPostGISLayerWhichShapes(): Query error. Error executing query. Check server logs msDrawMap(): Image handling error. Failed to draw layer named 'buildings3'. msDrawMap(): Image handling error. Failed to draw layer named 'buildings3'. <br> msPostGISLayerWhichShapes(): Query error. Error executing query. Check server logs <br> -- I don't see anything in the MapServer logs and don't really understand what is wrong. I tried specifying individual layers with "-l <layer_name>" to the shp2img command and most of them work, which I find encouraging. Specifying layer "buildings3" which failed above still fails when specified individually. I'm using Postgres 14, MS4W 4.0.5, MapServer 7.6.4 on Windows 10. 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. (The process used to generate this file is ... well ... amazing!) I am using data from geofabric.de for the USA ( http://download.geofabrik.de/north-america/us-latest.osm.pbf) downloaded two days ago. Does anyone have any suggestions on getting to the bottom of this? I feel like I'm tantalizingly close! Thanks a lot, carl --- LAYER STATUS ON PROJECTION "init=epsg:3857" END GROUP "default" NAME "buildings3" TYPE POLYGON CONNECTIONTYPE postgis CONNECTION "host=localhost dbname=osm user=postgres password=postgres port=5432" DATA "geometry from (select geometry,osm_id, name as name from osm_new_buildings) as foo using unique osm_id using srid=3857" LABELITEM "name" PROCESSING "LABEL_NO_CLIP=ON" PROCESSING "CLOSE_CONNECTION=DEFER" MAXSCALEDENOM 83202051 MINSCALEDENOM 41601025 CLASS STYLE COLOR "#bbbbbb" OPACITY 50 END STYLE OUTLINECOLOR "#333333" WIDTH 0 END END END
_______________________________________________ MapServer-users mailing list [email protected] https://lists.osgeo.org/mailman/listinfo/mapserver-users
