Re: [mapserver-users] Mapserver on nginx
Hi Peter, you may try runing mapserver via fastcgi using the spawn-fcgi tool. Here is a - slightly aged - startscript I used a while ago. Don't know if it still works. https://github.com/nmandery/daemontools-scripts/blob/master/mapserver-fcgi/run The ngnix configuration itself was pretty much like a PHP fastcgi configuration for nginx, but I can't find it anymore regards, Nico Am 19.01.2012 11:12, schrieb Peter Maes: Does anyone have a working config of mapserver on nginx? I would be grateful if someone could past the relevant bits! This body part will be downloaded on demand. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] RFC81: offset labels with leader lines
Hi all I see that there was a proposal a month ago to implement labels with 'leader lines', which I presume means that with position: 'auto', label positions will be calculated at a distance from the feature when required by collisions. This is exactly what I am looking for, can anyone tell me if this is going ahead and if so when it is likely to be implemented? Chris ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] RFC81: offset labels with leader lines
It is going ahead. I believe Thomas plans to work on it at the code sprint early next month. Steve From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Chris Green Sent: Friday, January 20, 2012 4:34 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] RFC81: offset labels with leader lines Hi all I see that there was a proposal a month ago to implement labels with 'leader lines', which I presume means that with position: 'auto', label positions will be calculated at a distance from the feature when required by collisions. This is exactly what I am looking for, can anyone tell me if this is going ahead and if so when it is likely to be implemented? Chris ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] .img raster color expression
Hello, I originally posted this is dev, but I think it might be more inline with the user forum. I am working with a .img raster file. It has It has attribute called FORESTYPE as I can see it when I open it in a desktop GIS. I would like to key off of this value to define specific colors in a .map file. However, I cannot seem to get this working. Here is what I have: CLASS NAME test EXPRESSION ([FORESTYPE] 0) STYLE COLOR 255 255 255 END END Any help would be greatly appreciated. Thanks, -- Derek @ NEMAC ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] Labeling behavior at the edge of image
MINFEATURESIZE is used only for labeling and makes sense when a polygons are clipped. It allows you avoid labeling slivers. Steve -Original Message- From: Jackey Cheung [mailto:cheung.jac...@gmail.com] Sent: Thursday, January 19, 2012 6:52 PM To: Lime, Steve D (DNR) Cc: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] Labeling behavior at the edge of image Hi Steve, Thanks for you promptly reply. I've definitely try label_no_clip out. However, I don't think the MINFEATURESIZE if for me. The polygon as a whole is big enough for labeling, the problem is just that it's sliced into two parts. Having a min size limit on it may render the label gone at the edge, which is not the desire result. On Thu, Jan 19, 2012 at 10:26 PM, Lime, Steve D (DNR) steve.l...@state.mn.us wrote: You can use the label_no_clip (I think that's right) PROCESSING parameter to force label position to be computed on the untransformed geometry. This results in a stable position regardless of scale or map extent. You can also use the label parameter MINFEATURESIZE to limit the size of the features being labeled. Its value is given in pixel and for polygons its compared against the narrowest portion of the computed bounding box for the feature. Steve From: mapserver-users-boun...@lists.osgeo.org [mapserver-users-boun...@lists.osgeo.org] on behalf of Jackey Cheung [cheung.jac...@gmail.com] Sent: Thursday, January 19, 2012 3:49 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] Labeling behavior at the edge of image Hi all, I've met an issue during my work. There is a polygon right at the edge of an generated image. By setting position to auto, the label is rendered, shifted a little bit off. It's as expected I would say. However, a question arose immediately, what happen to the label of the other part of the same polygon in the tile right next to this image? Answer is that it's not render, no label to the other part. It seems reasonable too. But it does seems a bit odd to viewers, since after tiles are shown on a browser tile by tile side by side. No one will notice that there is the edge slicing the polygon right into two parts, and the label is shifted off from the center of the polygon. So, if I would like to have the label sits right at the middle (position cc) of the polygon, then what? Not sure if it can be achieved. I've tried allowing partial label, but doesn't seem working. Anyone have any idea? ___ 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
RE: [mapserver-users] .img raster color expression
Hi Derek Try with this for each class you want (just change the expression value and the color. Be carefull with upper/lower case ;) CLASSITEM 'FORESTYPE ' CLASS #attribute name, without # gives the label name for the reference EXPRESSION 0 COLOR 214 252 252 OUTLINECOLOR 0 0 0 END Cheers JC -Mensaje original- De: jdmorgan [mailto:jdmor...@unca.edu] Enviado el: viernes, 20 de enero de 2012 01:49 p.m. Para: mapserver-users@lists.osgeo.org Asunto: [mapserver-users] .img raster color expression Hello, I originally posted this is dev, but I think it might be more inline with the user forum. I am working with a .img raster file. It has It has attribute called FORESTYPE as I can see it when I open it in a desktop GIS. I would like to key off of this value to define specific colors in a .map file. However, I cannot seem to get this working. Here is what I have: CLASS NAME test EXPRESSION ([FORESTYPE] 0) STYLE COLOR 255 255 255 END END Any help would be greatly appreciated. Thanks, -- Derek @ NEMAC ___ 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
RE: [mapserver-users] Can't get 8-bit palette output
PNG/GD was dropped to simplify code maintenance, build processes and output format definition. There is a default 8-bit format option, use IMAGETYPE PNG8 (sorry for the typo in my message below). Steve From: Jan Hartmann [mailto:j.l.h.hartm...@uva.nl] Sent: Thursday, January 19, 2012 2:25 PM To: Lime, Steve D (DNR) Cc: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] Can't get 8-bit palette output I see. Just for curiosity: why was png/gd dropped and wouldn't it be an idea to add an option to generate automatically a palette for png 8? Paletted output is still very useful for choropleth maps. Jan On 01/03/2012 04:05 PM, Lime, Steve D (DNR) wrote: GD is for GIF only in 6.0+. To get paletted output you can set: - IMAGETYPE GIF (GD-based) - IMAGETYPE PNG (AGG 8-bit) - Setup an output format with like Rich G. mentioned - Setup an output format that forces use of a pre-defined palette OUTPUTFORMAT NAME png8 DRIVER AGG/PNG MIMETYPE image/png IMAGEMODE RGB EXTENSION png FORMATOPTION INTERLACE=OFF FORMATOPTION PALETTE_FORCE=TRUE FORMATOPTION PALETTE=/usr/local/mapserver/apps/mr/compass/compass.palette END Steve From: mapserver-users-boun...@lists.osgeo.orgmailto:mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Jan Hartmann Sent: Monday, January 02, 2012 10:45 AM To: mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org Subject: [mapserver-users] Can't get 8-bit palette output Happy New Year, all. I'm porting my applications from MapServer 5.7 to 6.0.1, and I am unable to get 8-bit palette output. The MapScript commands are: $oMap-outputformat-set('driver','GD/PNG'); $oMap-outputformat-set('imagemode',MS_IMAGEMODE_PC256); which give me the following warning, and no image: Warning: mapObj::draw() [mapobj.drawhttp://mapserver.sara.nl/calligo/zl/maps/k1832/mapobj.draw]: [MapServer Error]: agg2CreateImage(): AGG2 driver only supports RGB or RGBA pixel models I tried every combination I coud think of, with GIF and GDAL, and got always the same result. MapServer was compiled with gd-support: MapServer version 6.0.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=THREADS SUPPORTS=GEOS INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE Any idea, someone? Jan ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Re: Trouble with South pole projection issues
On Fri, Jan 20, 2012 at 11:51 AM, Fuchs Juan Carlos jf...@indec.mecon.gov.ar wrote: ** ** Hi Mr Frank Warmerdam I sent out this post, but no one answer, so I´m here, bothering you again. Any adwise would gratefull received! Happy New Year! Juan Carlos Fuchs, from Argentina. ... This is the *.prj from the shp i have, and need to bring along with the other one. ** ** PROJCS[lambert,GEOGCS[GCS_WGS_1984,DATUM[D_WGS_1984,SPHEROID[WGS_1984,6378137.0,298.257223563]],PRIMEM[Greenwich,0.0],UNIT[Degree,0.0174532925199433]],PROJECTION[Lambert_Azimuthal_Equal_Area],PARAMETER[False_Easting,1000.0],PARAMETER[False_Northing,6391246.5],PARAMETER[Central_Meridian,-60.0],PARAMETER[Latitude_Of_Origin,-40.0],UNIT[Meter,1.0]] ** ** that is my first try so far,: from my *.map file layer (Projection) ** ** PROJECTION proj=laea ellps=WGS84 lat_1=40 lon_0=-60 south END ... As you can see it goes LL EPSG:4326 in geographics () is there some doc I can read about the towgs84 Parameters, my guess is that they have not to be 0,0,0,0,0,0,0 Juan, I do not believe the problem is related to the +towgs84 datum shifting. I believe the problem is that your LAEA projection definition for MapServer lacks the false easting and northing values. Try something like: PROJECTION +proj=laea +ellps=WGS84 +lat_1=40 +lon_0=-60 +south +x_0=1000.0 +y_0=6391246.5 END The key change here being the addition of +x_0 and +y_0. I am not familiar with the +south parameter for LAEA though it might be appropriate. By the way, you can use the new gdalsrsinfo utility to translate coordinate systems with GDAL. eg. warmerdam@gdal:~$ gdalsrsinfo ESRI::'PROJCS[lambert,GEOGCS[GCS_WGS_1984,DATUM[D_WGS_1984,SPHEROID[WGS_1984,6378137.0,298.257223563]],PRIMEM[Greenwich,0.0],UNIT[Degree,0.0174532925199433]],PROJECTION[Lambert_Azimuthal_Equal_Area],PARAMETER[False_Easting,1000.0],PARAMETER[False_Northing,6391246.5],PARAMETER[Central_Meridian,-60.0],PARAMETER[Latitude_Of_Origin,-40.0],UNIT[Meter,1.0]]' PROJ.4 : '+proj=laea +lat_0=-40 +lon_0=-60 +x_0=1000 +y_0=6391246.5 +datum=WGS84 +units=m +no_defs ' OGC WKT : PROJCS[lambert, GEOGCS[GCS_WGS_1984, DATUM[WGS_1984, SPHEROID[WGS_84,6378137.0,298.257223563]], PRIMEM[Greenwich,0.0], UNIT[Degree,0.0174532925199433]], PROJECTION[Lambert_Azimuthal_Equal_Area], PARAMETER[False_Easting,1000.0], PARAMETER[False_Northing,6391246.5], PARAMETER[longitude_of_center,-60.0], PARAMETER[latitude_of_center,-40.0], UNIT[Meter,1.0]] Best regards, -- ---+-- I set the clouds in motion - turn up | Frank Warmerdam, warmer...@pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush| Geospatial Software Developer ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] shape-draw problem
I'm upgrading an application from Mapserver 5.6 to 6.0.1, PHP MapScript. I'm having a problem with one section of code where it gives a shape-draw command. In MS 5.6, the Shape was derived from a getFeature method, but in MS 6 this had to be changed to a getShape. The next command is to draw the shape. This returns the following error: Fatal error: Uncaught exception 'MapScriptException' in C:\ms4w_303\apps\mgs\htdocs\drawMap_detail_spatial.php:101 Stack trace: #0 C:\ms4w_303\apps\mgs\htdocs\drawMap_detail_spatial.php(101): shapeObj-draw(Object(mapObj), Object(layerObj), Object(imageObj)) #1 {main} thrown in C:\ms4w_303\apps\mgs\htdocs\drawMap_detail_spatial.php on line 101 Here is the code leading up to the error: $oLayer_shape = $oMap-getLayerByName(master); for ($i=0; $i=($oLayer_master-getNumResults() - 1); $i++) { $oResult = $oLayer_master-getResult($i); $oLayer_master-open(); // $oShape = $oLayer_master-getFeature($oResult-shapeindex,-1); -Old getFeature method-commented out and replaced on next line: $oShape = $oLayer_master-getShape($oResult); $oShape-draw($oMap,$oLayer_shape,$oImage); -fails on this line $oLayer_master-close(); } I do believe I'm retrieving a valid shape. What's even more confusing, I've had to replace the getFeature with getShape in other parts of the application and it seems to work. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] mapserver ignoring 3rd postgis request
Hi List My version of mapserv (6.0) seems to be ignoring what seems to be a valid request to postgis. Setting the debug level 5 does not indicate a problem. Has anybody got any idea what could be preventing 'deadend' being load? If I change the values of connectiontype, Connection etc I receive a pare error, but change the name of the user and not errors are received from postgis. I suspect the mapserver is ignoreding the request. The lyaers one_way_arrows and streets are loaded with out error. -- streets.map Description: Binary data ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users