Re: [mapserver-users] 16 bit PNG or 16 bit jpeg output

2012-01-19 Thread Rahkonen Jukka
Hi,

Could it be possible for you to use WCS 1.0.0 for avoiding the multipart thing?

-Jukka Rahkonen-


Ragi Burhum  wrote:
Hello,

I am trying to output a single band 16bit png (or jpeg) output from a Mapserver 
WCS service.

I have tried the following output formats:

OUTPUTFORMAT
NAME jpeg
DRIVER "GDAL/JPEG"
MIMETYPE "image/jpeg"
IMAGEMODE INT16
EXTENSION "jpg"
FORMATOPTION "QUALITY=85"
 END

OUTPUTFORMAT
NAME GDALPNG
DRIVER "GDAL/PNG"
MIMETYPE "image/png"
IMAGEMODE INT16
EXTENSION "png"
FORMATOPTION "FILENAME=result.png"
  END

When I try different IMAGEMODEs, I get the correct results, but for some 
reason, INT16 does not work. I looked through the mailing list and I noticed 
that this question has been asked before:

http://osgeo-org.1803224.n2.nabble.com/16-Bit-PNG-Output-td6249725.html
http://osgeo-org.1803224.n2.nabble.com/Using-a-16-bit-per-band-PNG-image-td2490088.html

I tried looking for a ticket in Trac, but I had no luck. Am I doing something 
wrong? Perhaps I could accomplish this somehow with a custom gdal driver?

Also, a side question, if I wanted to make sure the replies from my WCS 
getcoverage calls were not multipart (I am just interested in the binary 
output), is there some mapserver-specific setting I can use to just get that 
image as a reply instead of the accompanying xml files?

Thanks!

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


[mapserver-users] Re: Mapserver + regex license

2012-01-19 Thread jbicik
Dear All,

Thank you very much for your replies and clarifications. Your are right that
Mapserver on its own does not use GNU regex. The MS4W windows build seems to
use it
(http://maptools.org/ms4w/index.phtml?page=README_INSTALL.html#mapserver-build-environment).
I might get in touch with the MS4W maintainers to clarify their license: "In
general MS4W is licensed under an MIT/X style license".

As you have all pointed out, Mapserver for Windows can be quite easily built
with other non-GPL implementations of regex. I did not realise this from the
Build instructions on Mapserver's website
(http://www.mapserver.org/installation/win32.html). However, the nmake.opt
file gives a hint that this can be done. I was successful with the PHP 5.3.1
regex (http://museum.php.net/php5/php-5.3.1.tar.bz2). As someone mentioned
in the dev mailing list recently, the regex from PHP 5.3.9 cannot be used so
easily since the latest regex code includes some other PHP-related files. I
have not yet tried the PCRE implementation Norman kindly suggested in his
reply.

Frank, I very much appreciate your explanation of the requirements of GPL v2
license. This sounds very reassuring for the commercial application I had in
mind!

All the best, Josef

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Mapserver-regex-license-tp7192530p7203106.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] Labeling behavior at the edge of image

2012-01-19 Thread Jackey Cheung
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] Mapserver on nginx

2012-01-19 Thread Peter Maes
Does anyone have a working config of mapserver on nginx?

I would be grateful if someone could past the relevant bits!
___
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

2012-01-19 Thread Lime, Steve D (DNR)
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


[mapserver-users] Php MapScript processquerytemplate

2012-01-19 Thread Lucas Middleton

Hello,


I am using Mapserver 6.0.1 and am having some trouble understanding exactly
how the method processQueryTemplate works in php mapscript.

I am unable to get processquerytemplate to return anything even though I
have verified that the proper template is set in my classObj object.

I threw together a quick query script with direct paths to my mapfile and
the Expression for a feature that I know to exist plugged in. I am receiving a 
query result
but processquerytemplate still isn't giving me anything back...

The documentation does not go in to much detail and I was hoping someone
could provide a more detailed explanation of what is supposed to be passed
to processquerytemplate and what is returned

Any advice would be greatly appreciated!

Thanks,

-Luke

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


[mapserver-users] template WFS

2012-01-19 Thread Stefan W.

Hi List,

is it possible to use a  template with a WFS server to customize the 
response?  Like the .html templates for WMS GetFeatureInfo responses.



Best regards,
Stefan

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


[mapserver-users] MS4W with an external Apache

2012-01-19 Thread Juan Jesús Cremades Monserrat
Hi,

I have a Windows XP with an apache 2.2 installation. In my job I have been
asked whether it is possible conect a MS4W for uses this Apache instead of
the server which comes with the MS4W package, Is it possible? Thanks
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] MS4W with an external Apache

2012-01-19 Thread Carlos Ruiz
Juan,

Lo que quiero entender es que tienes un servidor de producción que tiene 
instalado MS4W y además otra versión de Apache.

Nunca he intentado hacer lo que comentas. Supongo que tienes que igualar de 
alguna manera las configuraciones del archivo httpd.conf de la instalación de 
MS4W (módulos instalados, variables de entorno, etc), que se encuentra en 
/ms4w/Apache/conf.


Saludos desde México


Juan,

I want to understand that you have a production server which has MS4W installed 
and also another Apache version.

I've never tried to do something like that. I suppose that you have to match 
the MS4W httpd.conf configuration file (loaded modules, environment variables, 
etc) located at /ms4w/Apache/conf.
 


Cheers from México


IC Carlos Ruiz




 From: Juan Jesús Cremades Monserrat 
To: mapserver-users@lists.osgeo.org 
Sent: Thursday, January 19, 2012 9:37 AM
Subject: [mapserver-users] MS4W with an external Apache
 

Hi,

I have a Windows XP with an apache 2.2 installation. In my job I have been 
asked whether it is possible conect a MS4W for uses this Apache instead of the 
server which comes with the MS4W package, Is it possible? Thanks
___
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] MS4W with an external Apache

2012-01-19 Thread Juan Jesús Cremades Monserrat
Hi Giovanni,

I do not use the PHP MapFish. I'm only working with OpenLayers and MapFish
JS.

Carlos,

The production server is that have the Apache 2.2 only. But in development
I've used MS4W. In this case, the apps folder is outside of the Apache
folder and the configuration seems so difficult.

El 19 de enero de 2012 16:59, Carlos Ruiz  escribió:

> Juan,
>
> Lo que quiero entender es que tienes un servidor de producción que tiene
> instalado MS4W y además otra versión de Apache.
>
> Nunca he intentado hacer lo que comentas. Supongo que tienes que igualar
> de alguna manera las configuraciones del archivo httpd.conf de la
> instalación de MS4W (módulos instalados, variables de entorno, etc), que se
> encuentra en /ms4w/Apache/conf.
>
> Saludos desde México
>
> Juan,
>
> I want to understand that you have a production server which has MS4W
> installed and also another Apache version.
>
> I've never tried to do something like that. I suppose that you have to
> match the MS4W httpd.conf configuration file (loaded modules, environment
> variables, etc) located at /ms4w/Apache/conf.
>
>
> Cheers from México
>
> IC Carlos Ruiz
>
>   --
> *From:* Juan Jesús Cremades Monserrat 
> *To:* mapserver-users@lists.osgeo.org
> *Sent:* Thursday, January 19, 2012 9:37 AM
> *Subject:* [mapserver-users] MS4W with an external Apache
>
> Hi,
>
> I have a Windows XP with an apache 2.2 installation. In my job I have been
> asked whether it is possible conect a MS4W for uses this Apache instead of
> the server which comes with the MS4W package, Is it possible? Thanks
>
> ___
> 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] MS4W with an external Apache

2012-01-19 Thread Juan Jesús Cremades Monserrat
Carlos,

The production server is that have the Apache 2.2 only. But in development
I've used MS4W. In this case, the apps folder is outside of the Apache
folder and the configuration seems so difficult.

El 19 de enero de 2012 16:59, Carlos Ruiz  escribió:

Juan,
>
> Lo que quiero entender es que tienes un servidor de producción que tiene
> instalado MS4W y además otra versión de Apache.
>
> Nunca he intentado hacer lo que comentas. Supongo que tienes que igualar
> de alguna manera las configuraciones del archivo httpd.conf de la
> instalación de MS4W (módulos instalados, variables de entorno, etc), que se
> encuentra en /ms4w/Apache/conf.
>
> Saludos desde México
>
> Juan,
>
> I want to understand that you have a production server which has MS4W
> installed and also another Apache version.
>
> I've never tried to do something like that. I suppose that you have to
> match the MS4W httpd.conf configuration file (loaded modules, environment
> variables, etc) located at /ms4w/Apache/conf.
>
>
> Cheers from México
>
> IC Carlos Ruiz
>
>   --
> *From:* Juan Jesús Cremades Monserrat 
> *To:* mapserver-users@lists.osgeo.org
> *Sent:* Thursday, January 19, 2012 9:37 AM
> *Subject:* [mapserver-users] MS4W with an external Apache
>
> Hi,
>
> I have a Windows XP with an apache 2.2 installation. In my job I have been
> asked whether it is possible conect a MS4W for uses this Apache instead of
> the server which comes with the MS4W package, Is it possible? Thanks
>
> ___
> 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] Shapefiles not rendered

2012-01-19 Thread Juan Jesús Cremades Monserrat
Hi David,

Thank you about your clues I've resolveed the problem. You have reason, the
projection and the units weren't wrong.

El 16 de enero de 2012 09:45, Juan Jesús Cremades Monserrat <
relic...@gmail.com> escribió:

> Hi David,
>
> Muy BBOX is defined into a JS with OpenLayers. When I create the
> "OpenLayers.Map" object, the opcion values are:
>
> {
>  minExtent : new OpenLayers.Bounds(-1, -1, 1, 1),
> maxResolution : 0.35,
>  maxZoomLevel : 10,
> maxExtent : new OpenLayers.Bounds(-180, -90, 180, 90)
>  };
>
> I tried change the Space Reference System or coomenting the TRANSPARENCY,
> MINSCALE & MAXSCALE parameters, but The problem contues.
>
> Too I was trying change LAYER METADATA vms_extend parameter with degree
> values, but nothing.
>
> I was tried this map file at the gvSIG DEsktop, and it works... But I don'
> konw what,s the problem with the server.
>
> Cheers
>
> 2012/1/13 Fawcett, David (MPCA) 
>
>  Juan, 
>>
>> ** **
>>
>> The projection block at the map level specifies 4326 as the spatial
>> reference system, but the units of your extent look like they are in
>> meters, not decimal degrees.  This may be involved in the issue, or maybe
>> not, but it would screw up a regular MapServer CGI request if you don’t
>> specify a bbox.  
>>
>> ** **
>>
>> The use of a ‘.’ Character in a layer name may be valid in MapServer and
>> the OGC WMS spec, but it looks funky to me.  Again, probably not the
>> problem.
>>
>> ** **
>>
>> I would simplify your map file by commenting out the MINSCALE, MAXSCALE,
>> and TRANSPARENCY lines.  I am guessing that one of these is causing your
>> problem.
>>
>> ** **
>>
>> David.
>>
>> ** **
>>
>> *From:* mapserver-users-boun...@lists.osgeo.org [mailto:
>> mapserver-users-boun...@lists.osgeo.org] *On Behalf Of *Juan Jesús
>> Cremades Monserrat
>> *Sent:* Friday, January 13, 2012 5:50 AM
>> *To:* mapserver-users@lists.osgeo.org
>> *Subject:* [mapserver-users] Shapefiles not rendered
>>
>> ** **
>>
>> Hi,
>>
>> ** **
>>
>> I want execute the getMap method with an URL like this:
>>
>> ** **
>>
>>
>> http://localhost:9000/cgi-bin/mapserv.exe?LAYERS=COMACOM.SHP&FORMAT=image/png&TRANSPARENT=true&MAP=/ms4w/apps/demo-cv/demoCV.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application/vnd.ogc.se_inimage&SRS=EPSG:4326&BBOX=-180,-90,180,90&WIDTH=551&HEIGHT=356
>> 
>>
>> ** **
>>
>> But the result is always a white page. Where the error may be? My
>> MapServer is the MS4W. Thanks
>>
>> ** **
>>
>> My MapFile is this:
>>
>> ** **
>>
>> MAP
>>
>>NAME map_generated_by_gvsig
>>
>>EXTENT 626679.4375 4191039.75 797868.9375 4519396.0
>>
>>SYMBOLSET "demoCV.sym"
>>
>>FONTSET "fonts.txt"
>>
>>LEGEND
>>
>>   IMAGECOLOR -1 -1 -1
>>
>>   LABEL
>>
>>  FONT "vera"
>>
>>  ANGLE FOLLOW
>>
>>  COLOR 0 0 0
>>
>>  ENCODING "UTF-8"
>>
>>  TYPE truetype
>>
>>  SIZE 8
>>
>>   END
>>
>>   STATUS ON
>>
>>   TRANSPARENT ON
>>
>>END
>>
>> ** **
>>
>>SIZE 800 800
>>
>>   OUTPUTFORMAT
>>
>> NAME PNG24
>>
>> DRIVER AGG/PNG
>>
>> IMAGEMODE RGB
>>
>>END
>>
>> ** **
>>
>>WEB
>>
>>   METADATA
>>
>>  "wms_encoding" "UTF-8"
>>
>>  "wms_title" "Mapserver WMS"
>>
>>  "wms_abstract" ""
>>
>>  "wms_srs" " EPSG:4326"
>>
>>  "wms_onlineresource" "
>> http://localhost:9000/cgi-bin/mapserv.exe?map=E%3A%5Cms4w%5Capps%5Cdemo-cv%5CdemoCV.map
>> "
>>
>>  "ows_enable_request" "*"
>>
>>  "wms_feature_info_mime_type" "text/html"
>>
>>   END
>>
>>END
>>
>>PROJECTION
>>
>>   "init=epsg:4326"
>>
>>END
>>
>>LAYER
>>
>>   NAME "COMACOM.SHP"
>>
>>   STATUS ON
>>
>>   DUMP true
>>
>>   TEMPLATE "templates/provincias.html"
>>
>>   TYPE POLYGON
>>
>>   DATA "E:\COMACOM.SHP"
>>
>>   MAXSCALE -1.0
>>
>>   MINSCALE -1.0
>>
>>   TRANSPARENCY 100
>>
>>   SIZEUNITS pixels
>>
>>   PROJECTION
>>
>>  "init=epsg:4326"
>>
>>   END
>>
>>   CLASS
>>
>>  STYLE 
>>
>> COLOR 104 108 2
>>
>> OUTLINECOLOR 72 75 1
>>
>> WIDTH 1
>>
>>  END
>>
>>  NAME "default"
>>
>>   END
>>
>>   METADATA
>>
>>  "wms_title" "COMACOM.SHP"
>>
>>  "wms_abstract" "generated by gvSIG"
>>
>>  "wms_extent" "626679.4375 4191039.75 797868.9375 4519379.0"
>>
>>  "gml_include_items" "all"
>>
>>  "ows_enable_request" "*"
>>
>>   END
>>
>>END # Layer
>>
>> END # Map File
>>
>> ** **
>>
>
>
___
mapserver-users mailing list
maps

Re: [mapserver-users] 16 bit PNG or 16 bit jpeg output

2012-01-19 Thread Ragi Burhum
Hi Jukka,

I assume you mean WCS 2.0 and that you are referring to the MEDIATYPE
directive. The documentation at
http://mapserver.org/ogc/wcs_server.html#test-your-wcs-1-0-server said that
only "multipart/mixed" was allowed. Am I mistaken?


> Date: Thu, 19 Jan 2012 08:13:54 +
> From: Rahkonen Jukka 
> Subject: Re: [mapserver-users] 16 bit PNG or 16 bit jpeg output
> To: "'mapserver-users@lists.osgeo.org'"
>
> Message-ID:
><84446def76453c439e9e97e438e13a63063...@suutari.haapa.mmm.fi>
> Content-Type: text/plain; charset="us-ascii"
>
> Hi,
>
> Could it be possible for you to use WCS 1.0.0 for avoiding the multipart
> thing?
>
> -Jukka Rahkonen-
>
> 
> Ragi Burhum  wrote:
> Hello,
>
> I am trying to output a single band 16bit png (or jpeg) output from a
> Mapserver WCS service.
>
> I have tried the following output formats:
>
> OUTPUTFORMAT
>NAME jpeg
>DRIVER "GDAL/JPEG"
>MIMETYPE "image/jpeg"
>IMAGEMODE INT16
>EXTENSION "jpg"
>FORMATOPTION "QUALITY=85"
>  END
>
> OUTPUTFORMAT
>NAME GDALPNG
>DRIVER "GDAL/PNG"
>MIMETYPE "image/png"
>IMAGEMODE INT16
>EXTENSION "png"
>FORMATOPTION "FILENAME=result.png"
>  END
>
> When I try different IMAGEMODEs, I get the correct results, but for some
> reason, INT16 does not work. I looked through the mailing list and I
> noticed that this question has been asked before:
>
> http://osgeo-org.1803224.n2.nabble.com/16-Bit-PNG-Output-td6249725.html
>
> http://osgeo-org.1803224.n2.nabble.com/Using-a-16-bit-per-band-PNG-image-td2490088.html
>
> I tried looking for a ticket in Trac, but I had no luck. Am I doing
> something wrong? Perhaps I could accomplish this somehow with a custom gdal
> driver?
>
> Also, a side question, if I wanted to make sure the replies from my WCS
> getcoverage calls were not multipart (I am just interested in the binary
> output), is there some mapserver-specific setting I can use to just get
> that image as a reply instead of the accompanying xml files?
>
> Thanks!
>
> - Ragi
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] 16 bit PNG or 16 bit jpeg output

2012-01-19 Thread Rahkonen Jukka
Hi,

No way, I mean the WCS version 1.0 as described in the very same document 
http://www.mapserver.org/ogc/wcs_server.html

-Jukka Rahkonen-



Lähettäjä: Ragi Burhum [r...@burhum.com]
Lähetetty: 19. tammikuuta 2012 19:02
Vastaanottaja: mapserver-users@lists.osgeo.org; Rahkonen Jukka
Aihe: Re: [mapserver-users] 16 bit PNG or 16 bit jpeg output

Hi Jukka,

I assume you mean WCS 2.0 and that you are referring to the MEDIATYPE 
directive. The documentation at 
http://mapserver.org/ogc/wcs_server.html#test-your-wcs-1-0-server said that 
only "multipart/mixed" was allowed. Am I mistaken?

Date: Thu, 19 Jan 2012 08:13:54 +
From: Rahkonen Jukka 
mailto:jukka.rahko...@mmmtike.fi>>
Subject: Re: [mapserver-users] 16 bit PNG or 16 bit jpeg output
To: "'mapserver-users@lists.osgeo.org'"
   mailto:mapserver-users@lists.osgeo.org>>
Message-ID:
   
<84446def76453c439e9e97e438e13a63063...@suutari.haapa.mmm.fi>
Content-Type: text/plain; charset="us-ascii"

Hi,

Could it be possible for you to use WCS 1.0.0 for avoiding the multipart thing?

-Jukka Rahkonen-


Ragi Burhum  wrote:
Hello,

I am trying to output a single band 16bit png (or jpeg) output from a Mapserver 
WCS service.

I have tried the following output formats:

OUTPUTFORMAT
   NAME jpeg
   DRIVER "GDAL/JPEG"
   MIMETYPE "image/jpeg"
   IMAGEMODE INT16
   EXTENSION "jpg"
   FORMATOPTION "QUALITY=85"
 END

OUTPUTFORMAT
   NAME GDALPNG
   DRIVER "GDAL/PNG"
   MIMETYPE "image/png"
   IMAGEMODE INT16
   EXTENSION "png"
   FORMATOPTION "FILENAME=result.png"
 END

When I try different IMAGEMODEs, I get the correct results, but for some 
reason, INT16 does not work. I looked through the mailing list and I noticed 
that this question has been asked before:

http://osgeo-org.1803224.n2.nabble.com/16-Bit-PNG-Output-td6249725.html
http://osgeo-org.1803224.n2.nabble.com/Using-a-16-bit-per-band-PNG-image-td2490088.html

I tried looking for a ticket in Trac, but I had no luck. Am I doing something 
wrong? Perhaps I could accomplish this somehow with a custom gdal driver?

Also, a side question, if I wanted to make sure the replies from my WCS 
getcoverage calls were not multipart (I am just interested in the binary 
output), is there some mapserver-specific setting I can use to just get that 
image as a reply instead of the accompanying xml files?

Thanks!

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


Re: [mapserver-users] 16 bit PNG or 16 bit jpeg output

2012-01-19 Thread Stephan Meißl
Hi,

if you omit the mediatype parameter with version 2.0 you definitely get
back only the binary output as requested in the format parameter. In WCS
1.1 afaik you always get back a multipart response and in WCS 1.0 always
only the binary.

cu
Stephan


On Thu, 2012-01-19 at 17:16 +, Rahkonen Jukka wrote: 
> Hi,
> 
> No way, I mean the WCS version 1.0 as described in the very same document 
> http://www.mapserver.org/ogc/wcs_server.html
> 
> -Jukka Rahkonen-
> 
> 
> 
> Lähettäjä: Ragi Burhum [r...@burhum.com]
> Lähetetty: 19. tammikuuta 2012 19:02
> Vastaanottaja: mapserver-users@lists.osgeo.org; Rahkonen Jukka
> Aihe: Re: [mapserver-users] 16 bit PNG or 16 bit jpeg output
> 
> Hi Jukka,
> 
> I assume you mean WCS 2.0 and that you are referring to the MEDIATYPE 
> directive. The documentation at 
> http://mapserver.org/ogc/wcs_server.html#test-your-wcs-1-0-server said that 
> only "multipart/mixed" was allowed. Am I mistaken?
> 
> Date: Thu, 19 Jan 2012 08:13:54 +
> From: Rahkonen Jukka 
> mailto:jukka.rahko...@mmmtike.fi>>
> Subject: Re: [mapserver-users] 16 bit PNG or 16 bit jpeg output
> To: 
> "'mapserver-users@lists.osgeo.org'"
>
> mailto:mapserver-users@lists.osgeo.org>>
> Message-ID:
>
> <84446def76453c439e9e97e438e13a63063...@suutari.haapa.mmm.fi>
> Content-Type: text/plain; charset="us-ascii"
> 
> Hi,
> 
> Could it be possible for you to use WCS 1.0.0 for avoiding the multipart 
> thing?
> 
> -Jukka Rahkonen-
> 
> 
> Ragi Burhum  wrote:
> Hello,
> 
> I am trying to output a single band 16bit png (or jpeg) output from a 
> Mapserver WCS service.
> 
> I have tried the following output formats:
> 
> OUTPUTFORMAT
>NAME jpeg
>DRIVER "GDAL/JPEG"
>MIMETYPE "image/jpeg"
>IMAGEMODE INT16
>EXTENSION "jpg"
>FORMATOPTION "QUALITY=85"
>  END
> 
> OUTPUTFORMAT
>NAME GDALPNG
>DRIVER "GDAL/PNG"
>MIMETYPE "image/png"
>IMAGEMODE INT16
>EXTENSION "png"
>FORMATOPTION "FILENAME=result.png"
>  END
> 
> When I try different IMAGEMODEs, I get the correct results, but for some 
> reason, INT16 does not work. I looked through the mailing list and I noticed 
> that this question has been asked before:
> 
> http://osgeo-org.1803224.n2.nabble.com/16-Bit-PNG-Output-td6249725.html
> http://osgeo-org.1803224.n2.nabble.com/Using-a-16-bit-per-band-PNG-image-td2490088.html
> 
> I tried looking for a ticket in Trac, but I had no luck. Am I doing something 
> wrong? Perhaps I could accomplish this somehow with a custom gdal driver?
> 
> Also, a side question, if I wanted to make sure the replies from my WCS 
> getcoverage calls were not multipart (I am just interested in the binary 
> output), is there some mapserver-specific setting I can use to just get that 
> image as a reply instead of the accompanying xml files?
> 
> Thanks!
> 
> - Ragi
> ___
> 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

2012-01-19 Thread Jan Hartmann
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.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.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.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


Re: [mapserver-users] 16 bit PNG or 16 bit jpeg output

2012-01-19 Thread Ragi Burhum
Hello Jukka and Stephan,

Thank you a lot for the pointer. Yes, version 1.0.0 definitely does the
trick and I will use that instead. I got a big confused with the
documentation and it was not too clear to me that was the behavior. Thank
you!

As far as my original question for 16bit png (or jpeg) output, is there
something that can be done about that?

The tiff output files I get are too big for such a small area and it makes
unusable for mobile devices.

Thanks again,

- Ragi



> Date: Thu, 19 Jan 2012 18:46:37 +0100
> From: Stephan Mei?l 
> Subject: Re: [mapserver-users] 16 bit PNG or 16 bit jpeg output
> To: Rahkonen Jukka 
> Cc: "mapserver-users@lists.osgeo.org"
>
> Message-ID: <1326995197.2995.49.camel@io>
> Content-Type: text/plain; charset="UTF-8"
>
> Hi,
>
> if you omit the mediatype parameter with version 2.0 you definitely get
> back only the binary output as requested in the format parameter. In WCS
> 1.1 afaik you always get back a multipart response and in WCS 1.0 always
> only the binary.
>
> cu
> Stephan
>
>
> On Thu, 2012-01-19 at 17:16 +, Rahkonen Jukka wrote:
> > Hi,
> >
> > No way, I mean the WCS version 1.0 as described in the very same
> document http://www.mapserver.org/ogc/wcs_server.html
> >
> > -Jukka Rahkonen-
> >
> >
> > 
> > LƤhettƤjƤ: Ragi Burhum [r...@burhum.com]
> > LƤhetetty: 19. tammikuuta 2012 19:02
> > Vastaanottaja: mapserver-users@lists.osgeo.org; Rahkonen Jukka
> > Aihe: Re: [mapserver-users] 16 bit PNG or 16 bit jpeg output
> >
> > Hi Jukka,
> >
> > I assume you mean WCS 2.0 and that you are referring to the MEDIATYPE
> directive. The documentation at
> http://mapserver.org/ogc/wcs_server.html#test-your-wcs-1-0-server said
> that only "multipart/mixed" was allowed. Am I mistaken?
> >
> > Date: Thu, 19 Jan 2012 08:13:54 +
> > From: Rahkonen Jukka  jukka.rahko...@mmmtike.fi>>
> > Subject: Re: [mapserver-users] 16 bit PNG or 16 bit jpeg output
> > To: "'mapserver-users@lists.osgeo.org mapserver-users@lists.osgeo.org>'"
> > mapserver-users@lists.osgeo.org>>
> > Message-ID:
> ><84446def76453c439e9e97e438e13a63063...@suutari.haapa.mmm.fi
> >
> > Content-Type: text/plain; charset="us-ascii"
> >
> > Hi,
> >
> > Could it be possible for you to use WCS 1.0.0 for avoiding the multipart
> thing?
> >
> > -Jukka Rahkonen-
> >
> > 
> > Ragi Burhum  wrote:
> > Hello,
> >
> > I am trying to output a single band 16bit png (or jpeg) output from a
> Mapserver WCS service.
> >
> > I have tried the following output formats:
> >
> > OUTPUTFORMAT
> >NAME jpeg
> >DRIVER "GDAL/JPEG"
> >MIMETYPE "image/jpeg"
> >IMAGEMODE INT16
> >EXTENSION "jpg"
> >FORMATOPTION "QUALITY=85"
> >  END
> >
> > OUTPUTFORMAT
> >NAME GDALPNG
> >DRIVER "GDAL/PNG"
> >MIMETYPE "image/png"
> >IMAGEMODE INT16
> >EXTENSION "png"
> >FORMATOPTION "FILENAME=result.png"
> >  END
> >
> > When I try different IMAGEMODEs, I get the correct results, but for some
> reason, INT16 does not work. I looked through the mailing list and I
> noticed that this question has been asked before:
> >
> > http://osgeo-org.1803224.n2.nabble.com/16-Bit-PNG-Output-td6249725.html
> >
> http://osgeo-org.1803224.n2.nabble.com/Using-a-16-bit-per-band-PNG-image-td2490088.html
> >
> > I tried looking for a ticket in Trac, but I had no luck. Am I doing
> something wrong? Perhaps I could accomplish this somehow with a custom gdal
> driver?
> >
> > Also, a side question, if I wanted to make sure the replies from my WCS
> getcoverage calls were not multipart (I am just interested in the binary
> output), is there some mapserver-specific setting I can use to just get
> that image as a reply instead of the accompanying xml files?
> >
> > Thanks!
> >
> > - Ragi
> 
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] 16 bit PNG or 16 bit jpeg output

2012-01-19 Thread Rahkonen Jukka
Hi,

I believe you can configure Mapserver to create also compressed tiffs. There 
are many alternatives to choose on the gdal driver page 
http://gdal.org/frmt_gtiff.html

-Jukka Rahkonen-

Ragi Burhum wrote:

> Hello Jukka and Stephan,

> Thank you a lot for the pointer. Yes, version 1.0.0 definitely does the trick 
> and I will use that instead. I got a big confused with the documentation and 
> it was not too clear to me that was the behavior. Thank you!

> As far as my original question for 16bit png (or jpeg) output, is there 
> something that can be done about that?

> The tiff output files I get are too big for such a small area and it makes 
> unusable for mobile devices.

Thanks again,

- Ragi


Date: Thu, 19 Jan 2012 18:46:37 +0100
From: Stephan Mei?l mailto:step...@meissl.name>>
Subject: Re: [mapserver-users] 16 bit PNG or 16 bit jpeg output
To: Rahkonen Jukka mailto:jukka.rahko...@mmmtike.fi>>
Cc: "mapserver-users@lists.osgeo.org"
   mailto:mapserver-users@lists.osgeo.org>>
Message-ID: <1326995197.2995.49.camel@io>
Content-Type: text/plain; charset="UTF-8"

Hi,

if you omit the mediatype parameter with version 2.0 you definitely get
back only the binary output as requested in the format parameter. In WCS
1.1 afaik you always get back a multipart response and in WCS 1.0 always
only the binary.

cu
Stephan


On Thu, 2012-01-19 at 17:16 +, Rahkonen Jukka wrote:
> Hi,
>
> No way, I mean the WCS version 1.0 as described in the very same document 
> http://www.mapserver.org/ogc/wcs_server.html
>
> -Jukka Rahkonen-
>
>
> 
> LƤhettƤjƤ: Ragi Burhum [r...@burhum.com]
> LƤhetetty: 19. tammikuuta 2012 19:02
> Vastaanottaja: 
> mapserver-users@lists.osgeo.org; 
> Rahkonen Jukka
> Aihe: Re: [mapserver-users] 16 bit PNG or 16 bit jpeg output
>
> Hi Jukka,
>
> I assume you mean WCS 2.0 and that you are referring to the MEDIATYPE 
> directive. The documentation at 
> http://mapserver.org/ogc/wcs_server.html#test-your-wcs-1-0-server said that 
> only "multipart/mixed" was allowed. Am I mistaken?
>
> Date: Thu, 19 Jan 2012 08:13:54 +
> From: Rahkonen Jukka 
> mailto:jukka.rahko...@mmmtike.fi>>>
> Subject: Re: [mapserver-users] 16 bit PNG or 16 bit jpeg output
> To: 
> "'mapserver-users@lists.osgeo.org>'"
>
> mailto:mapserver-users@lists.osgeo.org>>>
> Message-ID:
>
> <84446def76453c439e9e97e438e13a63063...@suutari.haapa.mmm.fi>>
> Content-Type: text/plain; charset="us-ascii"
>
> Hi,
>
> Could it be possible for you to use WCS 1.0.0 for avoiding the multipart 
> thing?
>
> -Jukka Rahkonen-
>
> 
> Ragi Burhum  wrote:
> Hello,
>
> I am trying to output a single band 16bit png (or jpeg) output from a 
> Mapserver WCS service.
>
> I have tried the following output formats:
>
> OUTPUTFORMAT
>NAME jpeg
>DRIVER "GDAL/JPEG"
>MIMETYPE "image/jpeg"
>IMAGEMODE INT16
>EXTENSION "jpg"
>FORMATOPTION "QUALITY=85"
>  END
>
> OUTPUTFORMAT
>NAME GDALPNG
>DRIVER "GDAL/PNG"
>MIMETYPE "image/png"
>IMAGEMODE INT16
>EXTENSION "png"
>FORMATOPTION "FILENAME=result.png"
>  END
>
> When I try different IMAGEMODEs, I get the correct results, but for some 
> reason, INT16 does not work. I looked through the mailing list and I noticed 
> that this question has been asked before:
>
> http://osgeo-org.1803224.n2.nabble.com/16-Bit-PNG-Output-td6249725.html
> http://osgeo-org.1803224.n2.nabble.com/Using-a-16-bit-per-band-PNG-image-td2490088.html
>
> I tried looking for a ticket in Trac, but I had no luck. Am I doing something 
> wrong? Perhaps I could accomplish this somehow with a custom gdal driver?
>
> Also, a side question, if I wanted to make sure the replies from my WCS 
> getcoverage calls were not multipart (I am just interested in the binary 
> output), is there some mapserver-specific setting I can use to just get that 
> image as a reply instead of the accompanying xml files?
>
> Thanks!
>
> - Ragi

___
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

2012-01-19 Thread Jackey Cheung
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)
 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