[mapserver-users] Slow mapfile
Hi all, I'm having troubles generating tiles with mapserver, they take up to half an hour per tile (256x256pixels). The data is stored as a series of 32bit float GeoTIFFs, internally tiled with gdal and provided in four different levels (5meter, 25meter, 100meter and overview) as a series of files in separate directories which are indexed with gdaltindex. The data is a detailed height model of the Netherlands with a vertical resolution of 1cm - this way the Netherlands doesn't look so flat ;). I need to encode this data into a specially crafted PNG to be able to do dynamic classification in the browser. This means that for the range -12m to 350m I want each centimetre as a different colour. I end up with 36200 classes and a mapserver which is working for half an hour on 100% on a 2.6GHZ Quad-Xeon server with 8GB RAM, Ubuntu 12.04, gdal 1.9.2 and mapserver 6.2.0. The tiles are created by TileCache 2.11 and a tileseed.py run on the same server and the data is in the same projection as the tiles. I'm aware that 36200 classes are a lot, but I do need the 36200 values encoded in my PNG-tiles. Currently I use an include to include the classification for the different layers, since the classification alone is almost 3MB. Any suggestions on how to improve the render-speed, either in data preparation, the mapfile or a different approach all together? Regards, Steven Snippet of the included class.map: CLASSITEM [pixel] CLASS EXPRESSION ( [pixel] -11.99 ) COLOR 0 0 0 END CLASS EXPRESSION ( [pixel] = -11.99 AND [pixel] -11.98 ) COLOR 0 0 1 END ###36000+ more classes### CLASS EXPRESSION ( [pixel] = 349.99 AND [pixel] 350 ) COLOR 0 141 103 END CLASS EXPRESSION ( [pixel] = 350 ) COLOR 0 141 104 END The main mapfile: MAP EXTENT 1 305000 28 619000 UNITS METERS NAME AHN hoogtes SHAPEPATH /var/data/hoogte/nederland PROJECTION init=epsg:28992 END LEGEND IMAGECOLOR 255 255 255 KEYSIZE 18 12 KEYSPACING 5 5 LABEL ANTIALIAS TRUE SIZE 9 TYPE TRUETYPE FONT Arial BUFFER 0 COLOR 0 0 89 FORCE FALSE MINDISTANCE -1 MINFEATURESIZE -1 OFFSET 0 0 PARTIALS TRUE END POSITION UR STATUS ON TRANSPARENT TRUE END #legend QUERYMAP COLOR 255 0 0 SIZE -1 -1 STATUS OFF STYLE HILITE END #querymap DEBUG 0 WEB # Path to the temporary directory fro writing temporary files and images. # Must be writable by the user the web server is running as. # Must end with a / or \ depending on your platform. IMAGEPATH /tmp # Base URL for IMAGEPATH. This is the URL that will take the web browser to # IMAGEPATH to get the images. IMAGEURL /tmp/ MAXSCALE 3000 MINSCALE 1000 METADATA WMS_TITLE Algemeen Hoogtebestand Nederland WMS_ABSTRACT Algemeen Hoogtebestand Nederland WMS_ONLINERESOURCE http://localhost/cgi-bin/mapserv?map=maps/hoogte.map; WMS_SRS EPSG:28992 WMS_ENABLE_REQUEST * END END # web OUTPUTFORMAT NAME png DRIVER GD/PNG MIMETYPE image/png IMAGEMODE PC256 EXTENSION png END # outputformat LAYER GROUP ahn2 NAME ahn2_max METADATA WMS_TITLE Hoogte Max Res WMS_ABSTRACT Hoogte Max Res WMS_NAME Hoogte Max Res WMS_SRS EPSG:28992 WFS_TITLE Hoogte Max Res WMS_GROUP_TITLE hoogte END PROJECTION init=epsg:28992 END DATA ahn2-2012/overview.tif STATUS ON DEBUG 0 TEMPLATE blank.html TYPE RASTER UNITS METERS PROCESSING SCALE=-12,350 PROCESSING SCALE_BUCKETS=36200 MINSCALE 50 MAXSCALE 3000 INCLUDE class.map END # layer ahn2 LAYER GROUP ahn2 NAME ahn2_100m METADATA WMS_TITLE Hoogte 100m WMS_ABSTRACT Hoogte 100m WMS_NAME Hoogte 100m WMS_SRS EPSG:28992 WFS_TITLE Hoogte 100m gml_include_items value_0 gml_value_0_alias hoogte WMS_GROUP_TITLE hoogte wcs_label Hoogte 100m ### required wcs_rangeset_name Hoogte 100m (rangeset name) ### required to support DescribeCoverage request wcs_rangeset_label Hoogte 100m (rangeset label) ### required to support DescribeCoverage request END PROJECTION init=epsg:28992 END TILEINDEX iahn2_raster100_index TILEITEM location STATUS ON DEBUG 0 TEMPLATE blank.html TYPE RASTER UNITS METERS PROCESSING SCALE=-12,350 PROCESSING SCALE_BUCKETS=36200 MINSCALE 15 MAXSCALE 50 INCLUDE class.map END # layer ahn2 LAYER GROUP ahn2 NAME ahn2_25m METADATA WMS_TITLE Hoogte 25m WMS_ABSTRACT Hoogte 25m WMS_NAME Hoogte 25m WMS_SRS EPSG:28992 WFS_TITLE Hoogte 25m gml_include_items value_0 gml_value_0_alias hoogte WMS_GROUP_TITLE hoogte
Re: [mapserver-users] Base Layers (VE y Yahoo) in EPSG:4326
If you have full control of the postgis layers, you can serve them reprojected into EPSG:900913 (or EPSG:3785) and put it on top of VE/Yahoo. You cannot (as chris points out) change the projection of VE/Yahoo (or google for that matter). They serve their baselayers in spherical mercator, and you've to adept your data to their standards if you want to use their data. Steven On Dec 1, 2010, at 5:29 PM, christopher.schm...@nokia.com wrote: This is an OpenLayers question, and should be setn to the OpenLayers mailing list. Additionally, the thing you want to do is not possible. -- Chris On Dec 1, 2010, at 8:16 AM, ext florencia.bujan wrote: Hi, I am using Blue Marble and OpenLayers WMS base layers with postgis layers and the projection is ok: var wms = new OpenLayers.Layer.WMS( Blue Marble, http://maps.opengeo.org/geowebcache/service/wms;, {layers: 'bluemarble'} ); map.addLayers([wms]); wms = new OpenLayers.Layer.WMS( OpenLayers WMS, http://vmap0.tiles.osgeo.org/wms/vmap0;, {layers: 'basic'} ); But when I add two other base layers (Virtual Earth and Yahoo Layer), the projection is not right: var ve = new OpenLayers.Layer.VirtualEarth(VE); var yahoo = new OpenLayers.Layer.Yahoo(Yahoo, {sphericalMercator: true}); I want to change the base layers projection to EPSG:4326 for the correct view. Thanks! Regards. Florencia -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Base-Layers-VE-y-Yahoo-in-EPSG-4326-tp5791822p5791822.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users -- Steven M. Ottens Senior Ux Designer - Geodan SR President Kennedylaan 1 1079 MB Amsterdam (NL) - Tel: +31 (0)20 - 5711 315 Fax: +31 (0)20 - 5711 333 - E-mail: steven.ott...@geodan.nl Website: www.geodan.nl KvK-nummer: 33 247475 Disclaimer: www.geodan.nl/disclaimer - ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Tiled PNG doesn't work for WCS (and WMS)
Hi all, Thanks to Frank the problem was drilled down to the way the relative paths where defined in the index shapefile. Using absolute paths in gdaltindex did the trick. Unfortunately Geoserver 1.7.6 is faster on the same machine, with the same dataset as Mapserver 5.0.2 :( http://bit.ly/W02ka vs http://bit.ly/2sXA68 Thanks for all the help Steven On Oct 20, 2009, at 12:34 PM, Milo van der Linden wrote: Steven, - tiled png should not be a problem, I use that often. - It would be good to also set wms_extent in your layer defs - I think that setting the wcs_srs to multiple srs-es at the Layer Level is not how it should be done. Use a single srs there that corresponds to the wcs_extent or I guess you will have issues. Set the multiple srs-es at the wcs_srs and wms_srs on the *MAP* level Good luck! And send my regards to Mvexel ;-) Steven M. Ottens schreef: Hi all, I'm trying to setup a WCS with a series of PNGs with world files. I've indexed them with gdaltindex. When I do a WCS getCoverage or a WMS getMap request I get a white image. However when I configure mapserver to use only one tile as datasource I get an image (black and white in WCS, color in WMS). Working singletile datasource WMS: http://bit.ly/smpyA Working singletile datasource WCS: http://bit.ly/1hXghB not working tiled datasource WMS: http://bit.ly/2k5J11 I'm running Mapserver 5.0.2 on windows I've tried to convert the PNGs to geotiff, but that didn't matter. I've tried using Geoserver and there it does work, so the data appears to be correct. Does mapserver support tiled PNGs? Does it support it for WCS? Regards, Steven The configuration for the two layers:: single tiledatasource: LAYER NAME vec200tile METADATA wcs_label Swiss Topo Vec200 rendering for Tripod ### required wcs_rangeset_name Vector200Range ### required to support DescribeCoverage request wcs_rangeset_label Vec200 ### required to support DescribeCoverage request wcs_extent463179.50 44100.50 853179.50 324100.50 ### required for tiled datasets [MVEXEL] wcs_res1 1 ### from gdalinfo, undocumented metadata element wcs_size1 1 ### from gdalinfo, undocumented metadata element wcs_srsEPSG:21781 EPSG:3035 END EXTENT 463179.50 44100.50 853179.50 324100.50 TEMPLATE blank.html TYPE RASTER UNITS METERS STATUS ON data RT_Vec200_1500/1.0/vec200_1500_0_108.png PROJECTION init=epsg:21781 END DUMP TRUE ### required END tiled datasource: LAYER NAME vec200 METADATA wcs_label Swiss Topo Vec200 rendering for Tripod ### required wcs_rangeset_name Vector200Range ### required to support DescribeCoverage request wcs_rangeset_label Vec200 ### required to support DescribeCoverage request wcs_extent463179.50 44100.50 853179.50 324100.50 ### required for tiled datasets [MVEXEL] wcs_res1 1 ### from gdalinfo, undocumented metadata element wcs_size1 1 ### from gdalinfo, undocumented metadata element wcs_srsEPSG:27181 EPSG:3035 END EXTENT 463179.50 44100.50 853179.50 324100.50 TEMPLATE blank.html TYPE RASTER UNITS METERS STATUS ON TILEINDEX RT_Vec200_1500/1.0/sh1.0.shp TILEITEM filename PROJECTION init=epsg:21781 END DUMP TRUE ### required END -- Steven M. Ottens -==- http://research.geodan.nl/ ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Tiled PNG doesn't work for WCS (and WMS)
On Oct 20, 2009, at 5:00 PM, Steve Lime wrote: Be interested to hear if the soon-to-be released MapServer 5.6 fares any better speedwise. 5.0.2 is pretty darn old. -Steve If someone has a windows build (pref. with ecw support) I'm happy to test it Steven ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users