Re: [mapserver-users] maxscale (denom) with gml ?

2014-12-02 Thread bpicinbono
Thanks for the explanations and the ol3 solution, it's working perfectly.
Thanks again
Blaise


WFS is meant to query raw feature data. Scale dependent rendering must be
controlled within the renderer itself - in this case using
minResolution/maxResolution options as described in
http://openlayers.org/en/v3.0.0/apidoc/ol.layer.Layer.html.

 -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: Dienstag, 2. Dezember 2014 00:25
 An: bpicinb...@worldonline.fr; mapserver-users@lists.osgeo.org
 Betreff: Re: [mapserver-users] maxscale (denom) with gml ?

 WFS runs through the MapServer query pipeline. Queries are generally scale
 independent except for cases where you are interacting with a source map
 (e.g. clicking on things), I mean, a scale computation requires both a map
 extent and a resulting image size. From that you can compute a cellsize
 and scale. I don't know if it's possible to force a scale computation
 somehow by passing a map size (in pixels) along with a map extent. or
 perhaps by passing the desired scale value directly (map.scaledenom?).
 Anyone have other ideas?

 I believe the query functions do respect min/maxscale (denom) values if
 the map scale is not set to -1.

 Steve

 
 From: mapserver-users-boun...@lists.osgeo.org [mapserver-users-
 boun...@lists.osgeo.org] on behalf of bpicinb...@worldonline.fr
 [bpicinb...@worldonline.fr]
 Sent: Monday, December 01, 2014 4:05 PM
 To: mapserver-users@lists.osgeo.org
 Subject: Re: [mapserver-users] maxscale (denom) with gml ?

 from the ol3 extract of my last post (below), it's WFS as I see:

 format: new ol.format.WFS({
 ...

 regards




 On 12/01/2014 10:12 PM, Lime, Steve D (MNIT) wrote:
 I meant what so the calls to MapServer from OpenLayers look like? Are
 you
 using WFS, custom MapServer queries or perhaps OGR output formats? Doesn't
 look
 like the latter from your mapfile.

 Steve

 -Original Message-
 From: mapserver-users-boun...@lists.osgeo.org
 [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of
 bpicinb...@worldonline.fr
 Sent: Monday, December 01, 2014 3:06 PM
 To: mapserver-users@lists.osgeo.org
 Subject: Re: [mapserver-users] maxscale (denom) with gml ?



 Many thanks for investigating;
 please check below the relevant parts of the mapfile, as well as the
 openlayers related code; (the purpose is to display nooa gfs winds
 forecasts,
 vents means winds in french);

 some stuff like the SYMBOL part and the layer's STYLE part should not be
 necessary anymore with gml output, as well as few other directives, clean
 up job
 ahead..., but working, minus the maxscale (denom) directive which is not
 working
 in this configuration;

 I could manage the scale display control on the openlayers 3 side with
 an if
 case based on the zoom level, but I would prefer mapserver mapfile to
 drive it;

 Thanks again
 Blaise


 - - - - - - - - - -
 --- mapfile ---
 (called rg_noaa_vents_gml.map, called on the ol3 side)

 MAP
   NAME rg_noaa
   STATUS ON
   SIZE 600 600

   EXTENT -180 -90 180 90

   FONTSET fonts/fonts.list
   UNITS DD
   SHAPEPATH data
   IMAGECOLOR 230 230 255
   TEMPLATEPATTERN rg_noaa
   IMAGETYPE PNG24
   OUTPUTFORMAT

 # image mapfile #
 #TRANSPARENT ON
 #IMAGEMODE RGB
 #DRIVER GD/PNG

 # gml mapfile #
 NAME gml
 DRIVER TEMPLATE
 FORMATOPTION FILE=rg_noaa_vent_gml.map

   END
   PROJECTION
 init=epsg:4326
   END

   WEB
 HEADER templates/header_ol.html
 TEMPLATE set in index.html
 FOOTER templates/footer.html
 MAXSCALE 2
 IMAGEPATH /tmp/ms_tmp/
 IMAGEURL /ms_tmp/
 METADATA
   WMS_TITLE vrrroum_noaa

   WMS_ONLINERESOURCE

 http://localhost/cgi-
 bin/mapserv?map=/var/www/html/rg/blabla_02/noaa/rg_noaa_vents_gml.map

   WMS_SRS EPSG:4326
   WMS_ENABLE_REQUEST *
   #WMS_FEATURE_INFO_MIME_TYPE text/html
   wms_feature_info_mime_type text/gml

   WFS_ONLINERESOURCE

 http://ip-adress/cgi-
 bin/mapserv?map=/var/www/rg/blabla_02/noaa/rg_noaa_vents_gml.map

   WFS_ENABLE_REQUEST *
   wfs_feature_info_mime_type text/gml

 END
   END

   SYMBOL
 NAME arrowfilled
 TYPE vector
 FILLED true
 #FILLED false
 POINTS
 1 0
 -1 0
 -1 7
 -3 7
 0 10
 3 7
 1 7
 1 0
 -1 0
 END # POINTS
   END # SYMBOL


 LAYER   # # # fv_168
 NAME fv_168
 GROUP v_168
 TYPE POINT
 STATUS ON
 DATA fv_168
 MAXSCALEDENOM 2000
 SIZEUNITS kilometers

 METADATA
   WMS_TITLE v_168
   WMS_SRS epsg:4326
   wms_include_items all
   gml_include_items all
   WMS_ENABLE_REQUEST *

   wfs_title v_168
   wfs:srs EPSG:4326
   gml_include_items all
   gml_featureid ID
   wfs_enable_request *
 END

 CLASS
 TEMPLATE templates/vents.html
  STYLE
   OPACITY 50
   SYMBOL arrowfilled
   SIZE [VITREP]
   ANGLE [ANGLE]
   WIDTH 

[mapserver-users] Is RFC 101 in Mapserver 6.4.1?

2014-12-02 Thread Luca Manganelli
As stated in this document:
http://mapserver.org/development/rfc/ms-rfc-101.html
the Content Dependent Legend Response should be integrated into MapServer.

GetLegendGraphics is fully working now; but now I tried to use HTML
legend templates. The RFC describes the CGI mode MAPLEGEND (that's not
documented, but LEGEND is). I am trying to have a html legend based on
the contents with this command:

http://local/cgi-bin/mapserv?map=map.mapmode=maplegendMAPEXT=X1 Y1
X2 Y2SRS=EPSG:25832

am I doing some error in this request?

Note that if I use  mode=LEGEND, it returns all the legend.

Thank you in advance :-)
Luca
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Unscubscribe from Mapserver mailing list

2014-12-02 Thread ila pathak
Please could you please unsubscribe me from mapserver mailing list.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] erros llamar mapinfo

2014-12-02 Thread Carlos Ruiz
Eduardo,
You don't provide more information about what are you trying to do, but I can 
suggest the following. In the LAYER section you must have a TEMPLATE label 
which must refer to a HTML file.

No tengo información sobre lo que intentas hacer, pero puedo sugerir lo 
siguiente. En la sección LAYER debes de tener una etiqueta TEMPLATE, la cual 
debe hacer referencia a un archivo HTML.
LAYER
...
TEMPLATE FOO.HTML...
END

 Mtro. Carlos Ruiz

  From: Eduardo Arévalo eareval...@gmail.com
 To: mapserver-users@lists.osgeo.org 
 Sent: Monday, December 1, 2014 2:44 PM
 Subject: [mapserver-users] erros llamar mapinfo
   
hola  a todos me podrían dar algunas pistas para resolver este error:mapserv(): 
Web application error. No template provided.

___
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] An interesting SQL linestring building problem from postgres.

2014-12-02 Thread Basques, Bob (CI-StPaul)
All,

I have a bunch of individual LINE segments in Postgres and want to display them 
via MapServer like so:

First:

*  Get a chunk of them based on a set of IDs (a set of three for 
example)  and a begin/end timestamp (got this figured out already)

*  Take the result and combine up the separate line strings into 
multi-segment (grouped) lines ordered by ID, timestamp (got this figured out 
for individual IDs)

*  Add a random number to each grouping of multi-line string rows for 
dynamic color-coding of each group. (got this figured out for individual IDs)

*  Have results output as three rows, one for each multi-segment line.

I'm lost on the method to do the last piece.  Mostly it relates about how to 
approach which piece first.  Seems like a straightforward SQL, but I've tried a 
few different things, and it falls part each time for me.

Anyone have examples of something like this to start from?

The pertinent Mapfile fragment, I know this only color codes each individual 
segment at the moment.  VEH_IDs are passed into the MapFile from CGI 
(vname=veh_id in DB):

DATA the_line FROM (select the_line, vname, acqtime, trunc(random() * 4 + 1) 
rnum from loc) as foo USING unique vname using SRID=4326

FILTER  vname in (%veh_id%) AND acqtime  '%time_idx1%' AND 
acqtime '%time_idx2%' 

VALIDATION
'time_idx1' '.*'
'time_idx2' '.*'
'veh_id' '.*' ## veh_id='100','200','300' . . .
END

CLASSITEM rnum

CLASS ## Use the RNUM value to color code the line strings 
randomly.
STYLE
COLOR 255 0 0
WIDTH 5
END
EXPRESSION '1'
END
CLASS
STYLE
COLOR 0 255 0
WIDTH 5
END
EXPRESSION '2'
END
CLASS
STYLE
COLOR 0 0 255
WIDTH 5
END
EXPRESSION '3'
END
CLASS
STYLE
COLOR 255 255 0
WIDTH 5
END
EXPRESSION '4'
END
CLASS
NAME Segments
STYLE
COLOR 0 255 0
WIDTH 5
END
END


Thanks

Bobb



___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] An interesting SQL linestring building problem from postgres.

2014-12-02 Thread Stephen Woodbridge

On 12/2/2014 2:56 PM, Basques, Bob (CI-StPaul) wrote:

All,

I have a bunch of individual LINE segments in Postgres and want to
display them via MapServer like so:

First:

·Get a chunk of them based on a set of IDs (a set of three for example)
  and a begin/end timestamp (got this figured out already)

·Take the result and combine up the separate line strings into
multi-segment (grouped) lines ordered by ID, timestamp (got this figured
out for individual IDs)

·Add a random number to each grouping of multi-line string rows for
dynamic color-coding of each group. (got this figured out for individual
IDs)

·Have results output as three rows, one for each multi-segment line.


If the goal is to just display them, then you do not need to create a 
multi-segment line, just display them as individual lines with the color 
attribute.


I you need them 'glued together' as a multilines for some other reason. 
then union should work.


select color, union(geom) from lines group by color order by timestamp;


I’m lost on the method to do the last piece.  Mostly it relates about
how to approach which piece first.  Seems like a straightforward SQL,
but I’ve tried a few different things, and it falls part each time for me.

Anyone have examples of something like this to start from?

The pertinent Mapfile fragment, I know this only color codes each
individual segment at the moment.  VEH_IDs are passed into the MapFile
from CGI (vname=veh_id in DB):

DATA the_line FROM (select the_line, vname, acqtime, trunc(random() * 4
+ 1) rnum from loc) as foo USING unique vname using SRID=4326

 FILTER  vname in (%veh_id%) AND acqtime 
'%time_idx1%' AND acqtime '%time_idx2%' 

 VALIDATION
 'time_idx1' '.*'
 'time_idx2' '.*'
 'veh_id' '.*' ## veh_id=’100’,’200’,’300’ . . .
 END

 CLASSITEM rnum

 CLASS ## Use the RNUM value to color code the line
strings randomly.
 STYLE
 COLOR 255 0 0
 WIDTH 5
 END
 EXPRESSION '1'
 END
 CLASS
 STYLE
 COLOR 0 255 0
 WIDTH 5
 END
 EXPRESSION '2'
 END
 CLASS
 STYLE
 COLOR 0 0 255
 WIDTH 5
 END
 EXPRESSION '3'
 END
 CLASS
 STYLE
 COLOR 255 255 0
 WIDTH 5
 END
 EXPRESSION '4'
 END
 CLASS
 NAME Segments
 STYLE
 COLOR 0 255 0
 WIDTH 5
 END
 END

Thanks

Bobb



___
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] An interesting SQL linestring building problem from postgres.

2014-12-02 Thread Worth Lutz

I've done something similar.

I don't have it in front of me at the moment but a postgres select can 
do this.


Look in Postgres for window  and row_number.

You use the postgres OVER clause to group the items and then 
row_number to get a key for color.


SELECT
a,
b,
c,
row_number() OVER (PARTITION BY d) AS color_key
FROM table

The partition is your grouping of three.  row_number would be your 
color_key.  Use a modulus to limit the number of colors.


here is a link which might get you started
http://www.codeproject.com/articles/308281/How-to-Use-ROW-NUMBER-to-Enumerate-and-Partition-R

Note the final SQL statement which shows multiple items inside the 
OVER clause.


I hope this helps point you in the right direction.

If I can find a second, I'll look at your problem a little harder.

*Worth Lutz*
--

On 12/02/2014 02:56 PM, Basques, Bob (CI-StPaul) wrote:


All,

I have a bunch of individual LINE segments in Postgres and want to 
display them via MapServer like so:


First:

·Get a chunk of them based on a set of IDs (a set of three for 
example)  and a begin/end timestamp (got this figured out already)


·Take the result and combine up the separate line strings into 
multi-segment (grouped) lines ordered by ID, timestamp (got this 
figured out for individual IDs)


·Add a random number to each grouping of multi-line string rows for 
dynamic color-coding of each group. (got this figured out for 
individual IDs)


·Have results output as three rows, one for each multi-segment line.

I’m lost on the method to do the last piece. Mostly it relates about 
how to approach which piece first. Seems like a straightforward SQL, 
but I’ve tried a few different things, and it falls part each time for me.


Anyone have examples of something like this to start from?

The pertinent Mapfile fragment, I know this only color codes each 
individual segment at the moment.  VEH_IDs are passed into the MapFile 
from CGI (vname=veh_id in DB):


DATA the_line FROM (select the_line, vname, acqtime, trunc(random() * 
4 + 1) rnum from loc) as foo USING unique vname using SRID=4326


FILTER  vname in (%veh_id%) AND acqtime  
'%time_idx1%' AND acqtime '%time_idx2%' 


VALIDATION
'time_idx1' '.*'
'time_idx2' '.*'
'veh_id' '.*' ## veh_id=’100’,’200’,’300’ 
. . .

END

CLASSITEM rnum

CLASS ## Use the RNUM value to color code the line 
strings randomly.

STYLE
COLOR 255 0 0
WIDTH 5
END
EXPRESSION '1'
END
CLASS
STYLE
COLOR 0 255 0
WIDTH 5
END
EXPRESSION '2'
END
CLASS
STYLE
COLOR 0 0 255
WIDTH 5
END
EXPRESSION '3'
END
CLASS
STYLE
COLOR 255 255 0
WIDTH 5
END
EXPRESSION '4'
END
CLASS
NAME Segments
STYLE
COLOR 0 255 0
WIDTH 5
END
END

Thanks

Bobb



___
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