Is there a way to use REMOTE_USER environment variable in RunTime Substitution?

I'm using apache basic auth to filter results. I have been able to use mod_rewrite to create a cookie with the authenticated username and use that in runtime subst but it would be much simpler and cleaner to just do it reading the environment variable. So far, I haven't found a way to do this in current master. Any ideas?

-- 
Michael Smith
US Army Corps
Remote Sensing GIS/Center
_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
Basques, Bob (CI-StPaul | 19 Dec 16:46 2014
Picon
Picon

Map collaring techniques.

All,

 

Anyone have any insights into using/modifying MapServer to label maps collar wise (along the edges)??

 

I’m interested in applying USNG collaring to maps in general as a grid overlay.  I’m pretty sure I ca do this with PERL, but all the re-projection capabilities in MapServer make it much more attractive.  There are also quite a fe desires finishing options that I would like to include related to rotation and alignment.  I’m open to applying the collar on or off (outside of ) the map itself.

 

I’ve worked with both the ESRI and AutoDesk tools for accomplishing the same results as well.  AutoDesk has a fairly well thought out XML file format for defining the grid labeling, it’s almost SLD-ish as a matter of fact.  I’ve also been involved in a couple of Javascript mashups to provide USNG overlays to maps, but they aren’t hardcopy centric, which is what I need to focus on.

 

Thanks

 

Bobb

 

 

_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
Lime, Steve D (MNIT | 19 Dec 16:32 2014
Picon
Picon

Re: is there a way to avoid clipping the symbols on the edge of a tile

You’re not using mode=tile? The regular CGI map (e.g. mode=map) creation knows nothing about tiles so there’s no way to avoid edge effects. There are specialized tools like MapCache that take MapServer maps and create tiles from them. Those tools use techniques like meta-tiling, no label buffers and map edge buffers to avoid edge effects. MapServer also has a built-in tile mode (mode=tile) that can do edge buffering but you’re limited to (I think) known tiling schemes (like Google Maps).

 

Steve

 

From: 刘小二 [mailto:liuxiaoer <at> live.cn]
Sent: Thursday, December 18, 2014 8:47 PM
To: Lime, Steve D (MNIT)
Subject: RE: [mapserver-users] is there a way to avoid clipping the symbols on the edge of a tile

 

I create tiles use mapserver and layer.map
like this /cgi-bin/mapserver?map=/var/www/wms/layer.map.

> From: Steve.Lime <at> state.mn.us
> To: liuxiaoer <at> live.cn
> Subject: RE: [mapserver-users] is there a way to avoid clipping the symbols on the edge of a tile
> Date: Fri, 19 Dec 2014 02:43:01 +0000
>
> How are you creating the tiles?
> ________________________________________
> From: 刘小二 [liuxiaoer <at> live.cn]
> Sent: Thursday, December 18, 2014 8:23 PM
> To: Lime, Steve D (MNIT)
> Subject: RE: [mapserver-users] is there a way to avoid clipping the symbols on the edge of a tile
>
> Hi,Steve
>
> thank you again for your answer.
>
> But it don't work. The problem is still exists.
>
> What should I do to solve this question?
>
> This is my Mapfile below.
>
> MAP
> NAME "map"
> PROJECTION
> "init=epsg:4326"
> END
> WEB
> METADATA
> wms_enable_request "*"
> wms_srs "EPSG:4326 EPSG:900913"
> labelcache_map_edge_buffer "10"
> tile_map_edge_buffer "10"
> END
> END
> SYMBOL
> NAME 'hospital'
> TYPE pixmap
> IMAGE '/mnt/mapserver/img/hospital.png'
> END
>
> LAYER
> NAME Layer_1400668502611
> TYPE point
> data '/mnt/mapserver/vector/Layer_1400668502611.shp'
> CLASS
> STYLE
> SYMBOL 'hospital'
> SIZE 15
> END
> END
> END
> END
>
>
>
> I shall appreciate a reply from you in regard to my question.
>
> Thanks.
>
>
> liuxiaoer
>
> ________________________________
> From: Steve.Lime <at> state.mn.us
> To: liuxiaoer <at> live.cn; mapserver-users <at> lists.osgeo.org
> Subject: RE: [mapserver-users] is there a way to avoid clipping the symbols on the edge of a tile
> Date: Thu, 18 Dec 2014 22:40:50 +0000
>
>
> Check out the "labelcache_map_edge_buffer" and tile_map_edge_buffer metadata settings (in the WEB metadata section), or using metatiles. It depends on how youre generating tiles (mode=tile or MapCache/TileCache).
>
>
>
> Steve
>
>
>
> From: mapserver-users-bounces <at> lists.osgeo.org [mailto:mapserver-users-bounces <at> lists.osgeo.org] On Behalf Of ???
> Sent: Wednesday, December 17, 2014 3:18 AM
> To: mapserver-users <at> lists.osgeo.org
> Subject: [mapserver-users] is there a way to avoid clipping the symbols on the edge of a tile
>
>
>
> Hi, is there a way to avoid clipping the symbols on the edge of a tile, so all symbols would be fully displayed?
>
>
>
>
>
> [cid:image001.png <at> 01D01AE1.60C6A7E0]
>
>
>
>
>
>
> The second house symbol is clipped.
>
> Thank you very much!
>

_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
zach cruise | 18 Dec 16:18 2014
Picon

need help with outputformat=kml for wfs

using-
* MapServer version 6.4.0 ... OUTPUT=KML ... SUPPORTS=WFS_SERVER
SUPPORTS=WFS_CLIENT ...

* httpd file-
	<IfModule mime_module>
		...
		AddType application/vnd.google-earth.kml+xml .kml
		...
	</IfModule>

* map file-
	MAP
		...
		IMAGETYPE kml
		...
		WEB
			...
			METADATA
				...
				"wfs_getfeature_formatlist" "kml"
				...
			END
		END
		OUTPUTFORMAT
			NAME "kml"
			DRIVER KML
			MIMETYPE "application/vnd.google-earth.kml.xml"
			IMAGEMODE RGB
			IMAGEMODE FEATURE
			EXTENSION "kml"
			FORMATOPTION "ATTACHMENT=doc.kml"
		END
		LAYER
			...
		END
	END

* url-
../cgi-bin/mapserv?SERVICE=wfs&REQUEST=getfeature&TYPENAME=shoppinglist&VERSION=1.0.0&OUTPUTFORMAT=kml
(with or without "MODE=map")

but all i get is (no placemarks for points?)-
<?xml version="1.0" encoding="UTF-8"?>
 <kml xmlns="http://www.opengis.net/kml/2.2">
   <Document>
     <Style id="LayerFolder_check">
       <ListStyle>
         <listItemType>check</listItemType>
       </ListStyle>
     </Style>
     <Style id="LayerFolder_checkHideChildren">
       <ListStyle>
         <listItemType>checkHideChildren</listItemType>
       </ListStyle>
     </Style>
     <Style id="LayerFolder_checkOffOnly">
       <ListStyle>
         <listItemType>checkOffOnly</listItemType>
       </ListStyle>
     </Style>
     <Style id="LayerFolder_radioFolder">
       <ListStyle>
         <listItemType>radioFolder</listItemType>
       </ListStyle>
     </Style>
     <name>shoppingmap</name>
     <Folder>
       <name>shoppinglist</name>
       <visibility>1</visibility>
       <styleUrl>#LayerFolder_check</styleUrl>
     </Folder>
   </Document>
 </kml>
_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Lars Fricke | 18 Dec 08:29 2014
Picon

Mapserver as WFS 1.1.0 client

Hello,

I am trying to access an external WFS with MapServer as client to 
cascade it. I get the following error message:
msBuildWFSLayerPostRequest(): WFS connection error. MapServer supports 
only WFS 1.0.0 or 0.0.14 (please verify the version metadata wfs_version).

Indeed the external server only sends version 1.1.0 and my mapfile has:
...
METADATA
       "wfs_version"    "1.1.0"
...

Now when I search on the net, I find bug reports about WMS 1.1.0 and 
MapServer but no information if I can use it as a 1.1.0 client at all. 
And if so, do I need to use something specific to activate it?

I'm on a German Ubuntu 14.04 64bit with Apache2 and mapserv -v says:

MapServer version 6.4.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML 
SUPPORTS=PROJ SUPPORTS=GD SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO 
SUPPORTS=SVG_SYMBOLS SUPPORTS=RSVG 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=JPEG INPUT=POSTGIS 
INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE

Thanks for looking into this.

Best

Lars
_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Stephen Davies | 18 Dec 03:32 2014
Picon

Left click loses CGI variables

When sending output to PDA devices, I use a direct call to mapserv with 
several run-time substitution variables to set filters.

This works perfectly for the initial display but if the user clicks the 
resulting map, the redisplay loses all of the variables.

This led to errors in the redisplay because %foo% was no longer replaced so I 
added default_foo entries to the mapfile.

This prevents the errors but means that nothing matches the default filter.

How can I tell mapserv to retain the original variables?

Cheers and thanks,
Stephen
--

-- 
=============================================================================
Stephen Davies Consulting P/L                             Phone: 08-8177 1595
Adelaide, South Australia.                                Mobile:040 304 0583
Records & Collections Management.
_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

刘小二 | 17 Dec 10:17 2014
Picon

is there a way to avoid clipping the symbols on the edge of a tile

Hi, is there a way to avoid clipping the symbols on the edge of a tile, so all symbols would be fully displayed?

 
 
 
 


The second house symbol is clipped.

Thank you very much!
_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
mapserver | 17 Dec 00:14 2014
Picon

WFS: How to suppress coordinate output

Hi list,

I use WFS with filters to query the non-geometry data of my geographical data 
sets, like specific IDs of polygons.

As I want to use this mechanism in a service available to the public, but do not 
have the clearance to publish all the coordinate data, I am looking for a way to 
suppress the dump of all the coordinates in the getfeature-result, leaving only 
the attribute data that I have specified in "gml_include_items".

Is this possible at all, and if so, how can I accomplish this?

Thanks - Markus
_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

geographika | 16 Dec 14:03 2014
Picon

browse mode no longer saves images?

Hi list,

Until now I have been using MapServer as a WMS server. I've only recently been trying out the CGI controls, which would be very handy for a reporting application.

The MapServer tutorials refer several times to saving temporary images using the mode=browse. At http://demo.mapserver.org/tutorial/section3.html the map images generated in these tutorials refer to image files on the web server (so are not generated dynamically). E.g. http://demo.mapserver.org/ms_tmp/EX1.9_141873269321745.png

I've tried to set this up in MapServer 6.4 without success. I've set up parameters in the WEB section as follows:

    WEB
        IMAGEPATH "C:/Mapserver/apps/pms/tmp"
        # Also tried "tmp/"
        IMAGEURL "tmp/"
        TEMPLATE "reports/test.html"

However no images are ever created in this folder when using a request such as http://localhost/mapserver/?LAYERS=mylayer&mode=browse
The template contains file names such as tmp/MyMap14187343292752.png but these never seem to be written to disk. How can these images be persisted?
I know I could use mode=map to generate an image, but I want to create legends etc. all with a single request.

Regards,

Seth

--
web: http://geographika.co.uk
twitter: <at> geographika


_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [EXTERNAL] Re: Postgres SQL oddity . . .

Bob,

If you want to keep * in the select, you have to alias the table name and add that to the *. 

Eg, 
DATA "the_geom from (

                        select
                                distinct on (
vnamevname,
                                st_length(st_transform(the_line, 26993)) as feet,
                                (DATE_PART('day', now() - acqtime) * 24 +
                                        DATE_PART('hour', now() - acqtime) * 60 +
                                        DATE_PART('minute', now() - acqtime)
                                        ) as elapsed_min,  -- Compiled minutes since last major move of asset.
                                L.*
                        from
                                Loc l
                        where
                                st_length(st_transform(the_line, 26993)) > 30  -- GPS error
                        order by 
                                vname desc 

                                        ) as subquery using unique 
vname using srid=200068"

From: <Basques>, "Bob (CI-StPaul)" <bob.basques <at> ci.stpaul.mn.us>
Date: Monday, December 15, 2014 at 5:07 PM
To: "Rahkonen Jukka (Tike)" <jukka.rahkonen <at> mmmtike.fi>, "mapserver-users <at> lists.osgeo.org" <mapserver-users <at> lists.osgeo.org>
Subject: [EXTERNAL] Re: [mapserver-users] Postgres SQL oddity . . .
Resent-From: Michael Smith <michael.smith <at> usace.army.mil>

<!-- /* Font Definitions */ <at> font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4;} <at> font-face {font-family:Tahoma; panose-1:2 11 6 4 3 5 4 4 2 4;} <at> font-face {font-family:"Comic Sans MS"; panose-1:3 15 7 2 3 3 2 2 2 4;} <at> font-face {font-family:"Segoe UI"; panose-1:2 11 5 2 4 2 4 2 2 3;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0in; margin-bottom:.0001pt; font-size:12.0pt; font-family:"Times New Roman","serif";} a:link, span.MsoHyperlink {mso-style-priority:99; color:blue; text-decoration:underline;} a:visited, span.MsoHyperlinkFollowed {mso-style-priority:99; color:purple; text-decoration:underline;} p {mso-style-priority:99; margin:0in; margin-bottom:.0001pt; font-size:12.0pt; font-family:"Times New Roman","serif";} p.ms-cui-menu, li.ms-cui-menu, div.ms-cui-menu {mso-style-name:ms-cui-menu; margin:0in; margin-bottom:.0001pt; background:white; border:none; padding:0in; font-size:10.0pt; font-family:"Segoe UI","sans-serif"; color:#333333;} p.ms-cui-menusection-title, li.ms-cui-menusection-title, div.ms-cui-menusection-title {mso-style-name:ms-cui-menusection-title; margin:0in; margin-bottom:.0001pt; font-size:12.0pt; font-family:"Times New Roman","serif"; display:none;} p.ms-cui-ctl, li.ms-cui-ctl, div.ms-cui-ctl {mso-style-name:ms-cui-ctl; margin:0in; margin-bottom:.0001pt; font-size:12.0pt; font-family:"Times New Roman","serif"; color:#333333;} p.ms-cui-ctl-on, li.ms-cui-ctl-on, div.ms-cui-ctl-on {mso-style-name:ms-cui-ctl-on; margin:0in; margin-bottom:.0001pt; background:#DFEDFA; font-size:12.0pt; font-family:"Times New Roman","serif";} p.ms-cui-img-cont-float, li.ms-cui-img-cont-float, div.ms-cui-img-cont-float {mso-style-name:ms-cui-img-cont-float; margin-top:1.5pt; margin-right:0in; margin-bottom:0in; margin-left:0in; margin-bottom:.0001pt; font-size:12.0pt; font-family:"Times New Roman","serif";} p.ms-cui-smenu-inner, li.ms-cui-smenu-inner, div.ms-cui-smenu-inner {mso-style-name:ms-cui-smenu-inner; margin:0in; margin-bottom:.0001pt; font-size:12.0pt; font-family:"Times New Roman","serif";} p.ms-owa-paste-option-icon, li.ms-owa-paste-option-icon, div.ms-owa-paste-option-icon {mso-style-name:ms-owa-paste-option-icon; margin-top:1.5pt; margin-right:3.0pt; margin-bottom:0in; margin-left:3.0pt; margin-bottom:.0001pt; font-size:12.0pt; font-family:"Times New Roman","serif"; vertical-align:sub;} p.ms-rtepasteflyout-option, li.ms-rtepasteflyout-option, div.ms-rtepasteflyout-option {mso-style-name:ms-rtepasteflyout-option; margin:0in; margin-bottom:.0001pt; font-size:12.0pt; font-family:"Times New Roman","serif";} p.ms-cui-menusection, li.ms-cui-menusection, div.ms-cui-menusection {mso-style-name:ms-cui-menusection; margin:0in; margin-bottom:.0001pt; font-size:12.0pt; font-family:"Times New Roman","serif";} span.EmailStyle27 {mso-style-type:personal-reply; font-family:"Comic Sans MS","serif"; color:windowtext; font-weight:normal; font-style:normal;} .MsoChpDefault {mso-style-type:export-only; font-size:10.0pt;} <at> page WordSection1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in;} div.WordSection1 {page:WordSection1;} -->

Vname is NOT distinct in the data table.

 

I got the SQL to pass by dropping the “ * “ from the SQL, but ran into a different problem, how to run a logical expression against a POSTGRES call, looks like it only works with SHP files.  Crap!!

 

Bobb

 

 

 

From: Rahkonen Jukka (Tike) [mailto:jukka.rahkonen <at> mmmtike.fi]
Sent: Monday, December 15, 2014 4:01 PM
To: Basques, Bob (CI-StPaul); mapserver-users <at> osgeo.org
Subject: Re: Postgres SQL oddity . . .

 

Hi,

 

If vname is unique in your table, why do you need to do "select distinct" on it?

I would make a blind guess with an alias name select distinct on (vname) vname_distinct

 

Usually it is not as easy, though

 

-Jukka Rahkonen-

 

 

Basques, Bob wrote:

 

> I'm trying to display a set of GPS points from a layer in Postrgres . . .

> Getting this error however:

<ServiceExceptionReport version="1.3.0" xsi:schemaLocation="http://www.opengis.net/ogc http://schemas.opengis.net/wms/1.3.0/exceptions_1_3_0.xsd"><ServiceException>
msDrawMap(): Image handling error. Failed to draw layer named 'AVL_Plot_00to96'.
msPostGISLayerWhichShapes(): Query error. Error executing query: ERROR:  column reference "vname" is ambiguous
LINE 1: select "elapsed_min","vname",encode(ST_AsBinary(ST_Force2D("...
 
</ServiceException></ServiceExceptionReport>


from this Call:

DATA "the_geom from (

                        select
                                distinct on (
vname) vname,
                                st_length(st_transform(the_line, 26993)) as feet,
                                (DATE_PART('day', now() - acqtime) * 24 +
                                        DATE_PART('hour', now() - acqtime) * 60 +
                                        DATE_PART('minute', now() - acqtime)
                                        ) as elapsed_min,  -- Compiled minutes since last major move of asset.
                                *
                        from
                                loc
                        where
                                st_length(st_transform(the_line, 26993)) > 30  -- GPS error
                        order by
                               
vname desc

                                        ) as subquery using unique
vname using srid=200068"

What I don't understand is how VNAME can be ambiguous when calling only one table (loc)??  The SQL works fine in PGADMIN.   Does the using unique vname have something to do with the problem, which seems to be required.

Help??

Thanks.

bobb

_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
Lime, Steve D (MNIT | 15 Dec 23:09 2014
Picon
Picon

Re: BUG (??) in CGI variable substitution. COLOR change occurs up too high in the hierarchy of Mapfile

Looking at the code it’s definitely a bug. The configuration updater doesn’t take into account styles within a label so it applies the snippet you send to the label object. If your snippet contained reference to an attribute a  label doesn’t support then you’d get a parsing error. Because ‘color’ is supported by both it happily changes the wrong color. Can you file a ticket?

 

Steve

 

 

From: Basques, Bob (CI-StPaul)
Sent: Monday, December 15, 2014 10:53 AM
To: Lime, Steve D (MNIT)
Subject: RE: [mapserver-users] BUG (??) in CGI variable substitution. COLOR change occurs up too high in the hierarchy of Mapfile

 

V6.4.1

 

 

 

From: Lime, Steve D (MNIT)
Sent: Monday, December 15, 2014 10:50 AM
To: Basques, Bob (CI-StPaul); mapserver-users <at> osgeo.org
Subject: RE: [mapserver-users] BUG (??) in CGI variable substitution. COLOR change occurs up too high in the hierarchy of Mapfile

 

Which version are you running?

 

From: mapserver-users-bounces <at> lists.osgeo.org [mailto:mapserver-users-bounces <at> lists.osgeo.org] On Behalf Of Basques, Bob (CI-StPaul)
Sent: Saturday, December 13, 2014 9:35 PM
To: mapserver-users <at> osgeo.org
Subject: [mapserver-users] BUG (??) in CGI variable substitution. COLOR change occurs up too high in the hierarchy of Mapfile

 

All,

Using this CGI fragment:

. . .?map_layer[Points].class[0].LABEL[0].STYLE[0]=color+0+255+0& . . .

and I'm trying to set the color in this mapfile fragment inside of the STYLE (inside of the LABEL bloc):

                        NAME "GPS History"
                        TEXT "[seq]"
                        LABEL
                        #       OUTLINECOLOR 255 255 255
                               
COLOR 255 255 254
                                FONT "arial-bold"
                                TYPE truetype
                                SIZE 9
                                POSITION cc
                                #PARTIALS false
                                FORCE true
                                STYLE
                                        GEOMTRANSFORM  labelpoly
                                       
COLOR 255 0 0
                                        #OUTLINECOLOR  0 0 0
                                        OUTLINECOLOR 0 0 0
                                        WIDTH 1
                                END
                        END


The change is occurring however at the COLOR value in the LABEL (text-color), not at the STYLE level (background polygon color).  I assume this is something that hasn't been run into by anyone since the background label polys were implemented, and there being two different levels where the COLOR value can be set inside a single code block, or am I missing something?

Thanks


bobb

_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Gmane