[mapserver-users] Fwd: Re: [MapProxy] more opacity questions

2012-01-09 Thread DeDuikertjes

Oliver,

Thank you. This is very informative.
Indeed the layer has transparency and areas that have to be semi 
transparent on blending.


Does this limitation of PIL mean that if the source wms serves images 
with transparency AND semi transparent features (and Mapproxy config 
does NOT have any transparency settings) the result of a multi-layer 
request will have these problems?


Can these PIL problems be mitigated by having the source WMS serve 
images on a white background and set mapproxy transparency color to white?


Marco
Op 8-1-2012 13:35, Oliver Tonnhofer schreef:

Hi Marco,

On 07.01.2012, at 20:27, DeDuikertjes wrote:

Here you can find some example images in different shades of black-opaque:

http://178.63.74.185/hosting/demo/demo1.png
http://178.63.74.185/hosting/demo/demo2.png
http://178.63.74.185/hosting/demo/demo3.png

So you have a layer that already has transparency and you want the filled areas 
to be semi-transparent. The image blending function of PIL does not support the 
alpha channel. The transparent areas in your image are blended over with your 
opacity value, but even if these areas are transparent they still have color 
value, and in your case they are either black or white.

It should be possible to work around that with some image processing during the 
blending, but that would require more than just a single line patch…


Regards,
Oliver


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


Re: [mapserver-users] Mapserver ogc:Filter fails against Geoserver WFS

2012-01-09 Thread Michal Šrédl
Thanks Andreas,

I tried to provide the complete filter with leading ogc:Filter
xmlns:ogc=http://www.opengis.net/ogc; tag and I had to cut it away
manually to make it work at least against another mapserver.  Yes, I
can try to use Filter tag. I belive it can work against Geoserver.
But I already do know that it would not work against Intergraph
server. E.g. the following request can be broken by taking the
namespaces away:

http://portal.ingr.briseide.eu/TRACASA_VD12_WFS/wfservice.aspx?request=getfeatureservice=wfsversion=1.1.0typename=CATAST_POL_SUBPARURBAfilter=ogc:Filter+xmlns:ogc=http://www.opengis.net/ogc;ogc:PropertyIsLessThan+xmlns:ogc=http://www.opengis.net/ogc;ogc:PropertyNamePARCELA/ogc:PropertyNameogc:Literal200/ogc:Literal/ogc:PropertyIsLessThan/ogc:Filter

I don't dare to blame Intergraph in this case, as they are just
following FES and XML standards. I tried to use POST instead of GET,
and this is what I saw:

?xml version=1.0 ?
wfs:GetFeature service=WFS version=1.0.0 outputFormat=GML2
  wfs:Query typeName=ccss:Flood2010_FloodActivityGrade
ogc:Filter
  ogc:PropertyIsEqualTo
xmlns:ogc=http://www.opengis.net/ogc;ogc:PropertyNameSTUPEN/ogc:PropertyNameogc:Literal3/ogc:Literal/ogc:PropertyIsEqualTo
/ogc:Filter
  /wfs:Query
/wfs:GetFeature

As you can see, this is again not a vaild XML as it does not define
the namespaces. Mapserver doesn't mind, but other servers are using
standard XML libraries to parse it and they can not.

Best Regards,

Michal


2012/1/9 Eichner, Andreas - SID-NLKM andreas.eich...@sid.sachsen.de:

 At least in version 6.0.1 MapServer checks if a Filter or ogc:Filter tag 
 was given in wfs_filter metadata and uses this. So you should be able to use 
 Filter without a namespace prefix.



 -Ursprüngliche Nachricht-
 Von: mapserver-users-boun...@lists.osgeo.org
 [mailto:mapserver-users-boun...@lists.osgeo.org] Im Auftrag
 von Michal Šrédl
 Gesendet: Freitag, 6. Januar 2012 10:52
 An: mapserver-users@lists.osgeo.org
 Cc: Premysl Vohnout; Jachym Cepicky
 Betreff: [mapserver-users] Mapserver ogc:Filter fails
 against Geoserver WFS

 Dear all,

 I am not able to use WFS filter in Mapserver Mapfile against the
 Geoserver WFS, apparently as Mapserver produces invalid XML as the
 final filter that goes to the request.

 In Mapfile, I say

 LAYER
   METADATA
       wfs_filter  'ogc:PropertyIsEqualTo
 xmlns:ogc=http://www.opengis.net/ogc;ogc:PropertyNameSTUPE
 N/ogc:PropertyNameogc:Literal3/ogc:Literal/ogc:PropertyIsEqualTo'

 (the whole Mapfile is attached)

 The request that leaves Mapserver towards the Geoserver WFS
 looks like this:

 http://88.81.191.230:8080/geoserver/ows?REQUEST=GetFeatureVE
 RSION=1.0.0SERVICE=WFSTYPENAME=ccss:Flood2010_FloodActivityG
 radeFILTER=ogc:Filterogc:PropertyIsEqualTo+xmlns:ogc=http://www.opengis.net/ogc;og
  c:PropertyNameSTUPEN/ogc:PropertyNameogc:Literal3/ogc:Li
 teral/ogc:PropertyIsEqualTo/ogc:Filter

 Please note the ogc:Filter filter tag - with namespace used, but not
 defined. This is an issue, as it is not valid and Geoserver replies
 with an exception.

 Changing manually the filter tag either to Filter or
 ogc:Filter+xmlns:ogc=http://www.opengis.net/ogc; makes the whole
 thing work. Unfortunately, the Mapserver documentation [1] says, that

 The filter given as a value of the wfs_filter metadata should not
 contain Filter start and end tags.

 So whatever I provide as the wfs_filter value, is later broken by
 ogc:Filter tag.

 Do you consider it a bug? Or is there any way how to make Mapserver to
 create the filter as valid XML? Or let me include the Filter tag in
 the wfs_filter?

 Thank you for your advice,

 Michal


 Note: Mapserver itself wouldn't mind such a behaviour and would accept
 such a request, e.g. this one:

 http://bnhelp.cz/cgi-bin/crwfs/cgi-bin/crwfs?REQUEST=GetFeatu
 reVERSION=1.0.0SERVICE=WFSTYPENAME=okresyFILTER=ogc:Filte
 rogc:PropertyIsLessThan+xmlns:ogc=http://www.opengis.net/ogc;ogc:PropertyName
  KODOK/ogc:PropertyNameogc:Literal3555/ogc:Literal/ogc:P
 ropertyIsLessThan/ogc:Filter

 But Geoserver is not that tolerant...


 [1] http://mapserver.org/ogc/filter_encoding.html


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


[mapserver-users] Re: annotation symbol with label and labelpoy

2012-01-09 Thread Makoto Niwa
Hello Jeff!

Thank you very much for confirming label and legend issues, and creating 
tickets.

Thanks!

makoto.

At 06 Jan 2012 12:20:36 -0400 Jeff McKenna wrote:
 I have verified Niwa-san's issue on Windows (in fact mapserv.exe crashes when 
 using a shapfile with some NULL values, and geomtransorm), and I have 
 verified that his patch solves the issue.  Follow along at: 
 http://trac.osgeo.org/mapserver/ticket/4146
 
 -jeff
 
 
 
 -- 
 Jeff McKenna
 MapServer Consulting and Training Services
 http://www.gatewaygeomatics.com/
 
 
 On 11-12-19 11:07 PM, Makoto Niwa wrote:
  Hello everyone,
 
  I have a label problem in MapServer 6.0.1
  I cannot get corrct label image in annotation layer with symbol,label
  and labelpoly - backgound color.(see attached image label_error.jpg)
 
  Layer definition in mapfile as follows.
  LAYER
 NAME RND
 DATA Road/road_rnd_13.shp
 STATUS DEFAULT
 TYPE ANNOTATION
 PROJECTION init=epsg:4612 END
 MAXSCALE 5
 LABELITEM NAME_KANJI
 CLASSITEM SIGNAL_F
 
 CLASS NAME RND EXPRESSION 1
  STYLE SYMBOL 027 END
  LABEL PRIORITY 6 TYPE TRUETYPE POSITION AUTO OFFSET -5 -5 MINDISTANCE 
  50 PARTIALS FALSE FONT gothic COLOR 255 255 255 SIZE 8 ENCODING SJIS STYLE 
  GEOMTRANSFORM 'labelpoly' COLOR 0 85 170 END END
 END
 
  I make a patch for this problem.
  Then I can get correct label image(attached image label_patched.jpg).
  But this patch is not testing for many cases.
 
  regaeds,
 
  makoto.
 
 
 
 
 ___
 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