[mapserver-users] IE8(!) transparency issues
Hi I'm sure this isn't the first time this has been asked, but I'm having real issues with IE8 handling transparencies correctly. My map file is correctly creating tiles in RGBA mode using PNG24 symbols (including transparency) as data markers. Once the layer is rendered on a Google Map (at 60% opacity) everything is fine in any non-IE browser and IE>=9. IE8 doesn't handle the double opacity at all well and shows grey outlines around the markers. Is this a Google issue or can I do something different in my map file to generate the tiles differently? Relevant sample from map file: SYMBOL NAME 'cloud_500' TYPE PIXMAP IMAGE './dust_cloud_500.png' END #SYMBOL OUTPUTFORMAT NAME 'png' DRIVER AGG/PNG IMAGEMODE RGBA MIMETYPE 'image/png' EXTENSION 'png' TRANSPARENT ON END Thanks in advance! Charlie ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Mapserver Expressions
So... Given my shapefile contains 2 attributes only, LAT and LONG, I *think* you're suggesting something like this: Adding CLASSITEM 'LAT' into the LAYER and modifying the expressions in my original post (for example) FROM ... EXPRESSION('%tile%' ~ '16$') ... TO ... EXPRESSION(('%tile%' ~ '16$') && ([LAT] ne 0)) ... Given my dataset, it's a safe assumption that LAT will never be 0. Does that sound about right? Thanks in advance! Charlie -Original Message- From: Lime, Steve D (MNIT) [mailto:steve.l...@state.mn.us] Sent: 17 December 2013 15:50 To: Eichner, Andreas - SID-NLKM; Charlie Allgrove; mapserver-users@lists.osgeo.org Subject: RE: [mapserver-users] Mapserver Expressions Assuming Andreas is correct, yes this would be a bug given cases like this. I can create a ticket titled "Expressions without column references fail.". As a work around Charlie could add a sub-expression to those expressions that depend on a column but that always evaluate to true. Steve -Original Message- From: Eichner, Andreas - SID-NLKM [mailto:andreas.eich...@sid.sachsen.de] Sent: Tuesday, December 17, 2013 8:01 AM To: Lime, Steve D (MNIT); Charlie Allgrove; mapserver-users@lists.osgeo.org Subject: AW: [mapserver-users] Mapserver Expressions Substitution works quite well but classification does not because the class' expression hasn't been tokenized when msEvalExpression is called by msShapeGetClass. Root cause of this is in msLayerWhichItems(maplayer.c) which shall tokenize the class' expression but doesn't due to making this dependent of the number of used items being greater than zero. Since you don't use items anywhere in your layer they won't be tokenized at all and will always fail (return FALSE) in msEvalExpression(). Basically it should be safe to simply comment out the if-expression in maplayer.c at line 700: - if(nt > 0) { + /* if(nt > 0) */ { I strongly believe that this isn't intended behaviour and should be considered a bug. > -Ursprüngliche Nachricht- > Von: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users- > boun...@lists.osgeo.org] Im Auftrag von Lime, Steve D (MNIT) > Gesendet: Montag, 16. Dezember 2013 22:00 > An: Charlie Allgrove; mapserver-users@lists.osgeo.org > Betreff: Re: [mapserver-users] Mapserver Expressions > > Did you get this fixed? The layer looks right to me. --Steve > > > > From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver- > users-boun...@lists.osgeo.org] On Behalf Of Charlie Allgrove > Sent: Wednesday, December 11, 2013 11:11 AM > To: mapserver-users@lists.osgeo.org > Subject: [mapserver-users] Mapserver Expressions > > > > Hi > > > > I'm looking to change the symbol used on a given layer, based on the > (Google) zoom level supplied to the mapserv CGI. > > > > The Layer in question in the map file looks like this: > > > > LAYER > > VALIDATION > > 'tile' '^[0-9]+ [0-9]+ [0-9]{1,2}$' > > END > > PROJECTION > > "init=epsg:4326" > > END > > NAME hubs > > TYPE point > > STATUS ON > > DATA 'hub_data.shp' > > CLASS > > EXPRESSION('%tile%' ~ '16$') > > NAME 'hub_layer_small' > > STYLE > > SYMBOL 'cloud_500' > > END #STYLE > > END #CLASS > > CLASS > > EXPRESSION('%tile%' ~ '17$') > > NAME 'hub_layer_large' > > STYLE > > SYMBOL 'cloud_200' > > END #STYLE > > END #CLASS > > CLASS > > NAME 'hub_layer_default' > > STYLE > > SYMBOL 'cloud_200' > >SIZE 2 > > END #STYLE > > END #CLASS > > > > TEMPLATE "xxx" > > METADATA > > "wms_title" "Hub data layer" > > END > > END #LAYER > > > > > > Requests are made to the CGI with the following example querystring: > > ?layer=hubs&mode=tile&tilemode=gmap&tile=19288 24631 16 > > > > I *thought* it was possible to use EXPRESSION to test the 'tile' > variable and act accordingly, but it's not working (I always get the > default class used instead). > > > > > ./mapserv -v > > MapServer version 6.0.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG > SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=CAIRO SUPPORTS=FREETYPE > SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER > SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT > SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI > SUPPORTS=THREADS SUPPORTS=GEOS INPUT=POSTGIS INPUT=OGR INPUT=GDAL > INPUT=SHAPEFILE > > > > Any pointers? Thanks in advance. > > > > Charlie > > ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Mapserver Expressions
Hi, I didn't get it fixed - and due to time constraints, I've had to do some different things in the CGI wrapper I'm using to get it to do what I want it to do...I might take a dip into the source at some point and see what's what. -- Charlie From: Lime, Steve D (MNIT) [mailto:steve.l...@state.mn.us] Sent: 16 December 2013 21:00 To: Charlie Allgrove; mapserver-users@lists.osgeo.org Subject: RE: [mapserver-users] Mapserver Expressions Did you get this fixed? The layer looks right to me. --Steve From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Charlie Allgrove Sent: Wednesday, December 11, 2013 11:11 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] Mapserver Expressions Hi I'm looking to change the symbol used on a given layer, based on the (Google) zoom level supplied to the mapserv CGI. The Layer in question in the map file looks like this: LAYER VALIDATION 'tile' '^[0-9]+ [0-9]+ [0-9]{1,2}$' END PROJECTION "init=epsg:4326" END NAME hubs TYPE point STATUS ON DATA 'hub_data.shp' CLASS EXPRESSION('%tile%' ~ '16$') NAME 'hub_layer_small' STYLE SYMBOL 'cloud_500' END #STYLE END #CLASS CLASS EXPRESSION('%tile%' ~ '17$') NAME 'hub_layer_large' STYLE SYMBOL 'cloud_200' END #STYLE END #CLASS CLASS NAME 'hub_layer_default' STYLE SYMBOL 'cloud_200' SIZE 2 END #STYLE END #CLASS TEMPLATE "xxx" METADATA "wms_title" "Hub data layer" END END #LAYER Requests are made to the CGI with the following example querystring: ?layer=hubs&mode=tile&tilemode=gmap&tile=19288 24631 16 I *thought* it was possible to use EXPRESSION to test the 'tile' variable and act accordingly, but it's not working (I always get the default class used instead). > ./mapserv -v MapServer version 6.0.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=CAIRO SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE Any pointers? Thanks in advance. Charlie ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Mapserver Expressions
Hi I'm looking to change the symbol used on a given layer, based on the (Google) zoom level supplied to the mapserv CGI. The Layer in question in the map file looks like this: LAYER VALIDATION 'tile' '^[0-9]+ [0-9]+ [0-9]{1,2}$' END PROJECTION "init=epsg:4326" END NAME hubs TYPE point STATUS ON DATA 'hub_data.shp' CLASS EXPRESSION('%tile%' ~ '16$') NAME 'hub_layer_small' STYLE SYMBOL 'cloud_500' END #STYLE END #CLASS CLASS EXPRESSION('%tile%' ~ '17$') NAME 'hub_layer_large' STYLE SYMBOL 'cloud_200' END #STYLE END #CLASS CLASS NAME 'hub_layer_default' STYLE SYMBOL 'cloud_200' SIZE 2 END #STYLE END #CLASS TEMPLATE "xxx" METADATA "wms_title" "Hub data layer" END END #LAYER Requests are made to the CGI with the following example querystring: ?layer=hubs&mode=tile&tilemode=gmap&tile=19288 24631 16 I *thought* it was possible to use EXPRESSION to test the 'tile' variable and act accordingly, but it's not working (I always get the default class used instead). > ./mapserv -v MapServer version 6.0.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=CAIRO SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE Any pointers? Thanks in advance. Charlie ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Cut off/missing tiles [bump]
Hi I have an issue which seems to relate to tile-edge buffering and world-view zoom levels. There's an example page at http://mapserver.magicsite.co.uk When you first visit the page, all seems normal, until you zoom out 1 level, at which point the tile which should sit over the west of the US doesn't display. >From what I can see, when tile-edge buffering is ON and the tile next tile wraps around the world, the tile in question is not rendered. Turn edge-buffering off and that tile is rendered correctly. Unfortunately, I'm in a position where I can't turn the buffering off. from the mapfile: WEB METADATA "wms_title" "" "wms_onlineresource" "" "wms_srs" "EPSG:4326" "tile_map_edge_buffer" "9" # 9 pixel rendering buffer "http_max_age" "86400" END END As far as I can tell, everything else is working correctly. What I'm not clear on - is this a bug in the edge buffering within the software, or am I doing something wrong? The server running the example URL is currently using version 5.7-dev, but the same issue is also apparent on a production server running v6.0.2 Interested to know if anyone else has experienced the same issue? Regards Charlie -- Charlie Allgrove Senior Developer Connection Services :: Business Mobility for a Wireless World Connection Services Ltd is a company incorporated under the laws of England and Wales with company number 6520674 whose registered office is at Griffins Court, 24-32 London Road, Newbury, Berkshire, RG14 1JX. The information in this e-mail and any attachments is confidential and may be legally privileged. It is intended solely for the addressee or addressees. If you are not an intended recipient, please delete the message and any attachments and notify the sender of misdelivery: any use or disclosure of the contents of either is unauthorised and may be unlawful. All liability for viruses is excluded to the fullest extent permitted by law. Any views expressed in this message are those of the individual sender. In accordance with the provisions of its Terms of Business the Company does not accept instructions or the creation of contractual obligations by unconfirmed electronic transmission. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Cut off/missing tiles
Hi I have an issue which seems to relate to tile-edge buffering and world-view zoom levels. There's an example page at http://mapserver.magicsite.co.uk When you first visit the page, all seems normal, until you zoom out 1 level, at which point the tile which should sit over the west of the US doesn't display. >From what I can see, when tile-edge buffering is ON and the tile next tile wraps around the world, the tile in question is not rendered. Turn edge-buffering off and that tile is rendered correctly. Unfortunately, I'm in a position where I can't turn the buffering off. from the mapfile: WEB METADATA "wms_title" "" "wms_onlineresource" "" "wms_srs" "EPSG:4326" "tile_map_edge_buffer" "9" # 9 pixel rendering buffer "http_max_age" "86400" END END As far as I can tell, everything else is working correctly. What I'm not clear on - is this a bug in the edge buffering within the software, or am I doing something wrong? The server running the example URL is currently using version 5.7-dev, but the same issue is also apparent on a production server running v6.0.2 Interested to know if anyone else has experienced the same issue? Regards Charlie -- Charlie Allgrove Senior Developer Connection Services :: Business Mobility for a Wireless World Connection Services Ltd is a company incorporated under the laws of England and Wales with company number 6520674 whose registered office is at Griffins Court, 24-32 London Road, Newbury, Berkshire, RG14 1JX. The information in this e-mail and any attachments is confidential and may be legally privileged. It is intended solely for the addressee or addressees. If you are not an intended recipient, please delete the message and any attachments and notify the sender of misdelivery: any use or disclosure of the contents of either is unauthorised and may be unlawful. All liability for viruses is excluded to the fullest extent permitted by law. Any views expressed in this message are those of the individual sender. In accordance with the provisions of its Terms of Business the Company does not accept instructions or the creation of contractual obligations by unconfirmed electronic transmission. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] PHP mapscript shapefile query with multiple filters
We're running 5.6 at the moment. I'll try closing layers between querie...and let you know Cheers Charlie From: Steve Lime [mailto:sdl...@gmail.com] Sent: 05 July 2011 16:30 To: Charlie Allgrove Cc: Subject: Re: [mapserver-users] PHP mapscript shapefile query with multiple filters What version? What happens if you close the layer between calls to queries? Steve Sent from my iPad On Jul 4, 2011, at 11:15 AM, "Charlie Allgrove" wrote: Hi I have a shapefile containing almost 250k points in 3 cols (lat/long/sitetype). I need to use PHP mapscript to query that file to tell me how many points of a given type are present in a given rectangle. The script will either tell me the number of points in rectangle, OR points of a given type, but never both... Unfortunately I'm not at liberty to post the datafile anywhere, but the gist of the PHP is here: $lstrMapPath = "/path/to/shapefile"; $lstrOutput = ""; $lobjMap = ms_newMapObj($lstrMapPath); $lobjLayer = $lobjMap->getLayerByName("layer1"); if(!$lobjLayer) { exit; // errors handled elsewhere } $lobjLayer->open(); /* THIS WORKS */ @$lobjLayer->queryByRect($lobjRect); $lintCount = $lobjLayer->getNumResults(); /* THIS ALSO WORKS - BUT NOT IF THE queryByRect() is enabled above */ /* @$lobjLayer->queryByAttributes('sitetype','8',MS_MULTIPLE); $lintCount = $lobjLayer->getNumResults(); */ $lstrOutput = "layer".$k.":".$lintCount; $lobjLayer->close(); echo $lstrOutput; Any pointers would be gratefully received! Cheers Charlie ___ 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
[mapserver-users] PHP mapscript shapefile query with multiple filters
Hi I have a shapefile containing almost 250k points in 3 cols (lat/long/sitetype). I need to use PHP mapscript to query that file to tell me how many points of a given type are present in a given rectangle. The script will either tell me the number of points in rectangle, OR points of a given type, but never both... Unfortunately I'm not at liberty to post the datafile anywhere, but the gist of the PHP is here: $lstrMapPath = "/path/to/shapefile"; $lstrOutput = ""; $lobjMap = ms_newMapObj($lstrMapPath); $lobjLayer = $lobjMap->getLayerByName("layer1"); if(!$lobjLayer) { exit; // errors handled elsewhere } $lobjLayer->open(); /* THIS WORKS */ @$lobjLayer->queryByRect($lobjRect); $lintCount = $lobjLayer->getNumResults(); /* THIS ALSO WORKS - BUT NOT IF THE queryByRect() is enabled above */ /* @$lobjLayer->queryByAttributes('sitetype','8',MS_MULTIPLE); $lintCount = $lobjLayer->getNumResults(); */ $lstrOutput = "layer".$k.":".$lintCount; $lobjLayer->close(); echo $lstrOutput; Any pointers would be gratefully received! Cheers Charlie ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] PHP mapscript querybyrect()
Many thanks for that. Added a TEMPLATE section to the layer and it's burst into life. Many thanks Charlie -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Daniel Morissette Sent: 09 July 2010 20:07 To: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] PHP mapscript querybyrect() You didn't share your layer definition (mapfile). Make sure you have a template set, either at the layer level or in each of the classes you want to be able to query. Charlie Allgrove wrote: > Hi > > Could anyone shed some light on a problem I have with querybyrect() using > PHP Mapscript please? > > I'm trying to get the number of points within a known boundary (from a > google map). The map file is apparently working, as I have it generating > tiles for overlaying on a google map. The Shapefile is (for the sake of > example) xxx.shp containing a layer 'xxx' (see ogrinfo output below) > > The PHP code I'm using is here, but I consistently get this error: > Warning: [MapServer Error]: msQueryByRect(): No matching record(s) found. in > /var/www/yyy/zzz/qryMap.php on line 44 > > The shapefiles are in /var/www/yyy/zzz/data/ (and the SHAPEPATH in the map > file is set to 'data') > > I'm kinda new to this - so I might have missed something, but can anyone > shed any light on what I've missed and/or am doing wrong? > > Many thanks in advance, > > Charlie > > PHP extract: > > > $lstrMapPath = "/var/www/yyy/zzz/xxx.map"; > > $lobjMap = ms_newMapObj($lstrMapPath); > $lobjRect = ms_newrectObj(); > $lobjRect->setextent($lintBLLon,$lintBLLat,$lintTRLon,$lintTRLat); > > $l='xxx'; > > $lobjLayer = $lobjMap->getLayerByName($l); > if(!$lobjLayer) { > //die("Layer does not exist"); > echo "Couldn't find layer {$l}"; > continue; > } > $lobjLayer->open(); > echo "{$l}"; > $lobjLayer->queryByRect($lobjMap->extent); > echo $lobjLayer->data.""; //correctly shows the shapefilename > $lintCount = $lobjLayer->getNumResults(); > echo "$l: {$lintCount}"; > $lobjLayer->close(); > > > OGRINFO: > >> ogrinfo xxx.shp -so xxx > INFO: Open of `xxx.shp' > using driver `ESRI Shapefile' successful. > > Layer name: xxx > Geometry: Point > Feature Count: 759947 > Extent: (-8.146110, 49.892400) - (1.758210, 60.800800) > Layer SRS WKT: > GEOGCS["GCS_WGS_1984", > DATUM["WGS_1984", > SPHEROID["WGS_1984",6378137,298.257223563]], > PRIMEM["Greenwich",0], > UNIT["Degree",0.017453292519943295]] > Postcode: String (80.0) > NoSpace: String (80.0) > Hubs: String (80.0) > Long_WGS84: String (80.0) > Lat_WGS84: String (80.0) > > ___ > mapserver-users mailing list > mapserver-users@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users -- Daniel Morissette http://www.mapgears.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
[mapserver-users] PHP mapscript querybyrect()
Hi Could anyone shed some light on a problem I have with querybyrect() using PHP Mapscript please? I'm trying to get the number of points within a known boundary (from a google map). The map file is apparently working, as I have it generating tiles for overlaying on a google map. The Shapefile is (for the sake of example) xxx.shp containing a layer 'xxx' (see ogrinfo output below) The PHP code I'm using is here, but I consistently get this error: Warning: [MapServer Error]: msQueryByRect(): No matching record(s) found. in /var/www/yyy/zzz/qryMap.php on line 44 The shapefiles are in /var/www/yyy/zzz/data/ (and the SHAPEPATH in the map file is set to 'data') I'm kinda new to this - so I might have missed something, but can anyone shed any light on what I've missed and/or am doing wrong? Many thanks in advance, Charlie PHP extract: $lstrMapPath = "/var/www/yyy/zzz/xxx.map"; $lobjMap = ms_newMapObj($lstrMapPath); $lobjRect = ms_newrectObj(); $lobjRect->setextent($lintBLLon,$lintBLLat,$lintTRLon,$lintTRLat); $l='xxx'; $lobjLayer = $lobjMap->getLayerByName($l); if(!$lobjLayer) { //die("Layer does not exist"); echo "Couldn't find layer {$l}"; continue; } $lobjLayer->open(); echo "{$l}"; $lobjLayer->queryByRect($lobjMap->extent); echo $lobjLayer->data.""; //correctly shows the shapefilename $lintCount = $lobjLayer->getNumResults(); echo "$l: {$lintCount}"; $lobjLayer->close(); OGRINFO: >ogrinfo xxx.shp -so xxx INFO: Open of `xxx.shp' using driver `ESRI Shapefile' successful. Layer name: xxx Geometry: Point Feature Count: 759947 Extent: (-8.146110, 49.892400) - (1.758210, 60.800800) Layer SRS WKT: GEOGCS["GCS_WGS_1984", DATUM["WGS_1984", SPHEROID["WGS_1984",6378137,298.257223563]], PRIMEM["Greenwich",0], UNIT["Degree",0.017453292519943295]] Postcode: String (80.0) NoSpace: String (80.0) Hubs: String (80.0) Long_WGS84: String (80.0) Lat_WGS84: String (80.0) ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users