Re: [mapserver-users] WMS service problem with mapserver mapfile layer classes

2015-06-03 Thread gorank
Hi Jorg,
It works with you help. Thanks. Actually I had problem to show
municipalities in qgis but your suggestion to add YEAR in service url,
solves the problem. I use shapefile with Year as attribute name (time series
from 2009 to 2013) so in openlayers I select year from dropdown list and in
the map show values from the shossen column.

I would like from you confirmation url that you gave 
http://mapserver.stat.gov.mk/cgi-bin/GDZS/wms?map=/ms4w/apps/GDZS/NAS001_op.map&GODINA=2013&;

is final WMS url that users should have from our side, to access our WMS
service?

Goran



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/WMS-service-problem-with-mapserver-mapfile-layer-classes-tp5208743p5208979.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


Re: [mapserver-users] color range fade to transparent.

2015-06-03 Thread Rahkonen Jukka (MML)
Hi,

Never tried myself but for sure nodata value is not the way because it is not 
any continuous measure, it is just on/off. And opacity setting affects the 
whole layer as Jörg wrote.

I believe that the right way is to include alpha channel to the output 
colorrange. There are examples in the kernel density document 
http://mapserver.org/development/rfc/ms-rfc-108.html. In this example I suppose 
that the output color is total blue for the whole range from 0 to 32 but alpha 
value is growing from 0 to 255.

style
COLORRANGE  "#ff00"  "#"
DATARANGE 0 32
end

I do not know how well and which clients support partial alpha values.

-Jukka Rahkonen-
 
Jörg Thomsen wrote:

Hi Bob,

this cannot work I think. A colorrange from 255 0 0 to 254 254 254 renders a 
map with many colors. In  best case only data values at 300 will be rendered 
254 254 254 (perhaps you can check that with a color-picker? perhaps a clean 
254 254 254 is never reached).

But I think you would like to have a layer where the smallest value is not 
transparent, the highest value is totally transparent and the values between 
are a bit transparent, right? I think you only can set the opacity for the 
whole layer.

Jörg

 Am 03.06.2015 um 00:33 schrieb Basques, Bob (CI-StPaul):
> All,
> 
> My solution below turned out to not be correct either.  It just ramps 
> down from RED to the color WHITE, no transparency.
> 
> Here is the layer block I'm using that I'm trying to fade to a 
> transparent feature:
> 
> MAP
> 
> TRANSPARENT true
> IMAGECOLOR 254 254 254
> 
> 
> 
> LAYER
> METADATA
>  "ows_title" "bbox"
>  "gml_include_items" "all"
> END
> GROUP 'users'
> NAME 'bbox'
> STATUS ON
> TYPE LINE
> 
> 
> 
> 
> 
> ## the following greabs a 5 min chunk of data (BBOX geoms  from the 
> database from 28 hrs ago and assigns a seq and elapsed time column to 
> the result.
> DATA "bbox from (
> 
> SELECT
> row_number() over (order by accessed_at nulls last) as seq, 
> date_part('epoch', (now() - INTERVAL '28 hours' -
> accessed_at)::interval) as elapsed,
> id, accessed_at, bbox
> FROM
> layer_metrics
> Where
> accessed_at < (NOW() - INTERVAL '28 
> hours') AND
> accessed_at >= (NOW() - INTERVAL '28 
> hours' - INTERVAL '5 minute')
> 
>  ) as subquery using unique id 
> using srid=200068"
> 
> LABELITEM "elapsed"
> 
> CLASS
> #NAME "5 Minute Trail"
> EXPRESSION ([elapsed] >= 0 AND [elapsed] < 300) ## 0-5min STYLE
> OUTLINECOLOR 0 0 0
> OUTLINEWIDTH 1
> #COLOR 0 255 0 COLORRANGE 255 0 0 254 
> 254 254 ##red to opaque (see IMAGECOLOR in the MAP block above) 
> DATARANGE 0 300 RANGEITEM "elapsed"
> 
> END
> END
> END
> END
> 
> 
> bobb
> 
> 
> 
>> On Jun 2, 2015, at 4:27 PM, Ben Madin > > wrote:
>>
>> Bob,
>>
>> Nice, I never knew that such a colorrange option existed (at least, I 
>> couldn't find it documented anywhere?) but I would have presumed 
>> maybe you could specify the colour using the alpha like any other colour?
>>
>>> COLORRANGE 255 0 0 255 255 255 255  0 ## red -> transparent
>>
>>
>>
>> Alternatively, if you had a common background colour, you could fade 
>> to that?
>>
>> cheers
>>
>> Ben
>>
>>
>>
>>> On 2015-06-03, at 04:48 , Basques, Bob (CI-StPaul) 
>>> mailto:bob.basq...@ci.stpaul.mn.us>> wrote:
>>>
>>> All,
>>>
>>> Anyone know how to use a transparent color on one end of the 
>>> coloring option?
>>>
>>> COLORRANGE 255 0 0 ??? ??? ??? ## red -> transparent
>>>
>>> It there a RGB color to use for Transparency to fade to?  I 
>>> basically want to fade a line based on age to nothing.
>>>
>>> Thanks
>>>
>>> bobb
>>>
>>>
>>>
>>> ___
>>> mapserver-users mailing list
>>> mapserver-users@lists.osgeo.org 
>>> 
>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
>>
>> --
>>
>> Ben Madin
>>
>> t : +61 8 6102 5535
>> m : +61 448 887 220
>> e : b...@ausvet.com.au 
>>
>> AusVet Animal Health Services
>> Western Australia
>>
>> AusVet's website:  http://www.ausvet.com.au
>>
>> This transmission is for the intended addressee only and is 
>> confidential information. If you have received this transmission in 
>> error, please delete it and notify the sender. The contents of this 
>> email are the opinion of the writer only and are not endorsed by 
>> AusVet Animal Health Services unless expressly stated otherwise.
>> Although AusVet uses virus scanning software we do not accept 
>> liability for viruses or

Re: [mapserver-users] color range fade to transparent.

2015-06-03 Thread Jörg Thomsen
Hi Bob,

this cannot work I think. A colorrange from 255 0 0 to 254 254 254
renders a map with many colors. In  best case only data values at 300
will be rendered 254 254 254 (perhaps you can check that with a
color-picker? perhaps a clean 254 254 254 is never reached).

But I think you would like to have a layer where the smallest value is
not transparent, the highest value is totally transparent and the values
between are a bit transparent, right? I think you only can set the
opacity for the whole layer.

Jörg

 Am 03.06.2015 um 00:33 schrieb Basques, Bob (CI-StPaul):
> All,
> 
> My solution below turned out to not be correct either.  It just ramps
> down from RED to the color WHITE, no transparency.
> 
> Here is the layer block I’m using that I’m trying to fade to a
> transparent feature:
> 
> MAP
> 
> TRANSPARENT true
> IMAGECOLOR 254 254 254
> 
> 
> 
> LAYER
> METADATA
>  "ows_title" "bbox"
>  "gml_include_items" "all"
> END
> GROUP 'users'
> NAME 'bbox'
> STATUS ON
> TYPE LINE
> 
> 
> 
> 
> 
> ## the following greabs a 5 min chunk of data (BBOX geoms  from the
> database from 28 hrs ago and assigns a seq and elapsed time column to
> the result.
> DATA "bbox from (
> 
> SELECT
> row_number() over (order by accessed_at nulls last) as seq,
> date_part('epoch', (now() - INTERVAL '28 hours' -
> accessed_at)::interval) as elapsed,
> id, accessed_at, bbox
> FROM
> layer_metrics
> Where
> accessed_at < (NOW() - INTERVAL '28 hours')
> AND
> accessed_at >= (NOW() - INTERVAL '28
> hours' - INTERVAL '5 minute')
> 
>  ) as subquery using unique id
> using srid=200068"
> 
> LABELITEM "elapsed"
> 
> CLASS
> #NAME "5 Minute Trail"
> EXPRESSION ([elapsed] >= 0 AND [elapsed] < 300) ## 0-5min 
> STYLE
> OUTLINECOLOR 0 0 0
> OUTLINEWIDTH 1
> #COLOR 0 255 0
> COLORRANGE 255 0 0 254 254 254 ##red to opaque (see IMAGECOLOR in the
> MAP block above)
> DATARANGE 0 300
> RANGEITEM "elapsed"
> 
> END
> END
> END
> END
> 
> 
> bobb
> 
> 
> 
>> On Jun 2, 2015, at 4:27 PM, Ben Madin > > wrote:
>>
>> Bob,
>>
>> Nice, I never knew that such a colorrange option existed (at least, I
>> couldn’t find it documented anywhere?) but I would have presumed maybe
>> you could specify the colour using the alpha like any other colour?
>>
>>> COLORRANGE 255 0 0 255 255 255 255  0 ## red -> transparent
>>
>>
>>
>> Alternatively, if you had a common background colour, you could fade
>> to that?
>>
>> cheers
>>
>> Ben
>>
>>
>>
>>> On 2015-06-03, at 04:48 , Basques, Bob (CI-StPaul)
>>> mailto:bob.basq...@ci.stpaul.mn.us>> wrote:
>>>
>>> All,
>>>
>>> Anyone know how to use a transparent color on one end of the coloring
>>> option?
>>>
>>> COLORRANGE 255 0 0 ??? ??? ??? ## red -> transparent
>>>
>>> It there a RGB color to use for Transparency to fade to?  I basically
>>> want to fade a line based on age to nothing.
>>>
>>> Thanks
>>>
>>> bobb
>>>
>>>
>>>
>>> ___
>>> mapserver-users mailing list
>>> mapserver-users@lists.osgeo.org 
>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
>>
>> -- 
>>
>> Ben Madin
>>
>> t : +61 8 6102 5535
>> m : +61 448 887 220
>> e : b...@ausvet.com.au 
>>
>> AusVet Animal Health Services
>> Western Australia
>>
>> AusVet's website:  http://www.ausvet.com.au
>>
>> This transmission is for the intended addressee only and is
>> confidential information. If you have received this transmission in
>> error, please delete it and notify the sender. The contents of this
>> email are the opinion of the writer only and are not endorsed by
>> AusVet Animal Health Services unless expressly stated otherwise.
>> Although AusVet uses virus scanning software we do not accept
>> liability for viruses or similar in any attachments. Thanks for reading.
>>
> 
> 
> 
> ___
> 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] WMS service problem with mapserver mapfile layer classes

2015-06-03 Thread Jörg Thomsen
Hi Goran,

problem solved? it seems to work...?

these two requests result in different maps:

http://mapserver.stat.gov.mk/cgi-bin/GDZS/wms?map=/ms4w/apps/GDZS/NAS001_op.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG:7269&FORMAT=image/png&LAYERS=Opstini%2CRegioni%2CDrzGran%2CEzera&&BBOX=436350.358101,4509075,688350.358101,4698075&WIDTH=800&HEIGHT=600&GODINA=2013%20%3E%3E%20mapsermapserver.stat.gov.mk/cgi-bin/GDZS/wms?map=/ms4w/apps/GDZS/NAS001_op.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG:7269&FORMAT=image/png&LAYERS=Opstini,Regioni,DrzGran,Ezera&&BBOX=436350.358101,4509075,688350.358101,4698075&WIDTH=800&HEIGHT=600&GODINA=2013

http://mapserver.stat.gov.mk/cgi-bin/GDZS/wms?map=/ms4w/apps/GDZS/NAS001_op.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG:7269&FORMAT=image/png&LAYERS=Opstini%2CRegioni%2CDrzGran%2CEzera&&BBOX=436350.358101,4509075,688350.358101,4698075&WIDTH=800&HEIGHT=600&GODINA=2013%20%3E%3E%20mapsermapserver.stat.gov.mk/cgi-bin/GDZS/wms?map=/ms4w/apps/GDZS/NAS001_op.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG:7269&FORMAT=image/png&LAYERS=Opstini,Regioni,DrzGran,Ezera&&BBOX=436350.358101,4509075,688350.358101,4698075&WIDTH=800&HEIGHT=600&GODINA=2009

What I don't understand is your classification. The validation only
allows 4-digit values and there's only one class that fits ( EXPRESSION
([%godina%] >= 20 and [%godina%] < 1)).

Or do you only wnat to know why your WMS does not work with qgis?
There you have to add your vendor parameter to the base url:
http://mapserver.stat.gov.mk/cgi-bin/GDZS/wms?map=/ms4w/apps/GDZS/NAS001_op.map&GODINA=2013&;

*AND* you have to check the option 'ingnore getMap-URI from
Capabilities' (or sth like that, don't know the english expression).

Jörg


Am 02.06.2015 um 23:30 schrieb gorank:
> Here is image of all layers defined in mapfile and called with URL
> 
> http://mapserver.stat.gov.mk/cgi-bin/GDZS/wms?map=/ms4w/apps/GDZS/NAS001_op.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG:7269&FORMAT=image/png&LAYERS=Opstini%2CRegioni%2CDrzGran%2CEzera&GODINA=2009&BBOX=436350.358101,4509075,688350.358101,4698075&WIDTH=800&HEIGHT=600
>   
> 
>  
> 
> Here is image of QGIS with all layers called plus Google Maps. All defined
> layers in mapfile are shown except of layer Opstini (means municipalities). 
> 
>   
> 
> Why I cannot see the layer with municipalities and few classes?
> 
> Goran
> 
> 
> 
> --
> View this message in context: 
> http://osgeo-org.1560.x6.nabble.com/WMS-service-problem-with-mapserver-mapfile-layer-classes-tp5208743p5208769.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