AW: [mapserver-users] Low-resolution raster image problem when usingOpenlayers

2011-07-01 Thread Arnd Wippermann
You can request tiles from MapServer by a MapServer cgi request or by a WMS
request.
 
OpenLayers uses this
 
DEFAULT_PARAMS: {
mode: map,
map_imagetype: png // a 8bit png if not otherwise declared in the
mapfile
},

for OpenLayers.Layer.MapServer
 
DEFAULT_PARAMS: { service: WMS,
  version: 1.1.1,
  request: GetMap,
  styles: ,
  exceptions: application/vnd.ogc.se_inimage,
  format: image/jpeg
 },

for OpenLayers.Layer.WMS
 
if you not specify a imageformat, then the OpenLayers.Layer.MapServer
requests a png and the WMS requests a jpg (if not set transparent=true).
 
Arnd

  _  

Von: kensei3000 [mailto:kensei3...@yahoo.com] 
Gesendet: Donnerstag, 30. Juni 2011 04:58
An: Arnd Wippermann
Cc: mapserver-users@lists.osgeo.org
Betreff: Re: AW: [mapserver-users] Low-resolution raster image problem
when usingOpenlayers


Hi Arnd,


I see. I used the same 'mapserv' url in both OpenLayers.Layer.WMS and
.MapServer code. The requests were sent to the same remote server. So the
difference must be in the requests. Is it possible that OpenLayers.Layer.WMS
generated a different output url string from the one generated by
OpenLayers.Layer.MapServer?

Ken

  _  

From: Arnd Wippermann arnd.wipperm...@web.de
To: 'kensei3000' kensei3...@yahoo.com
Cc: mapserver-users@lists.osgeo.org
Sent: Thursday, June 30, 2011 1:15 AM
Subject: AW: [mapserver-users] Low-resolution raster image problem when
usingOpenlayers


Hi Ken,
 
Quote : Interestingly, if I use the 'mapserv' executable directly in the
browser instead of using OpenLayers API, the image also renders correctly.
 
There could be no difference (OpenLayers.Layer.WMS or .MapServer), because
with OpenLayers you only create an url for an image tag (img src=url).
The response have to be the same as from the browser directly.
 
The difference could only be a result from different requests or the same
request to different servers.
 
Arnd
 
  _  

Von: kensei3000 [mailto:kensei3...@yahoo.com] 
Gesendet: Mittwoch, 29. Juni 2011 09:56
An: Arnd Wippermann
Cc: us...@openlayers.org
Betreff: Re: AW: [mapserver-users] Low-resolution raster image problem
when usingOpenlayers


Hi Arnd,


I checked the images properties of the tile images using ImageMagick.

tile_topleft_remote.png has image type Palette (8-bit)
tile_topleft_local.png has image type TrueColor (32-bit)

The results I got seem to correlate with your findings.
Indeed, it appears that the image rendering between my local pc and the
server are different.

The map files are exactly same since I sync them in both computers. 


The MapServer versions, however, are different. Here's what I got:

LOCAL:
MapServer version 6.0.0 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ
SUPPORTS=AGG SUPPORTS=CAIRO SUPPORTS=FREETYPE 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=POSTGIS INPUT=OGR INPUT=GDAL
INPUT=SHAPEFILE


REMOTE:
MapServer version 5.6.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE
SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT
SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=FASTCGI
SUPPORTS=THREADS SUPPORTS=GEOS INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR
INPUT=GDAL INPUT=SHAPEFILE


The MapServer executable in the remote server is an older version (5.6.1)
than the one in my pc (6.0.0). I edited the map files and images in my local
pc, then synced them to the server, so there may be an incompatibility. I
checked the Mapserver Migration Guide
(http://mapserver.org/de/MIGRATION_GUIDE.html) and my guess was that the
default OUTPUTFORMAT specifications of both versions could be different. I
did not specify an explicit OUTPUTFORMAT in my map file.


I created another test. This time I explicitly defined the OUTPUTFORMAT with
the following lines added to the map file in the remote server:


 OUTPUTFORMAT

NAME jpeg
DRIVER AGG/JPEG
MIMETYPE image/jpeg
IMAGEMODE RGB
EXTENSION jpg
  END

The result was that the output image generated by the remote server rendered
in TrueColor, similar to the output image in my local pc. Problem appears to
be fixed.


My guess right now is that the  IMAGEMODE parameter above was somehow set to
PC256 (i.e. 8-bit color palette) by default.


Interestingly, if I use the 'mapserv' executable directly in the browser
instead of using OpenLayers API, the image also renders correctly.
EXAMPLE: 
http://remotehost/cgi-bin/mapserv?map=/opt/maps/sandbox/mapserver_openlayers
_if/sample.mapmode=map



Above 'sample.map' did not have the OUTPUTFORMAT object explicitly defined. 


In another test I ran using the original 'sample.map' (i.e. no OUTPUTFORMAT
object), I edited the 

[mapserver-users] Re: Mapserver 5.6.6 and Python mapscript

2011-07-01 Thread ChiefDan
There are options I use in mapserver that are not compiled into the ubuntu
distribution.

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Mapserver-5-6-6-and-Python-mapscript-tp6534460p6537782.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] Re: MapServer Make Failure on RedHat

2011-07-01 Thread ChiefDan
I stumbled across this:
http://www.mail-archive.com/mapserver-users@lists.osgeo.org/msg09257.html
that seems to be similar to your issue.

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/MapServer-Make-Failure-on-RedHat-tp6528584p6537807.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] wms server - raster image quality

2011-07-01 Thread Mark Volz
Hello

I set up a WMS Server using Mapserver.  The quality of the map is terrible.   
If anyone an example of a mapfile to serve imagery via wms it would be 
appreciated.

Thanks

MAP
NAME MAP
EXTENT  699283 4853930 736320 4904147
PROJECTION
init=epsg:26914
END #PROJECTION
OUTPUTFORMAT
NAME 'gd/jpeg'
#DRIVER GD/JPEG
IMAGEMODE RGB
#IMAGEMODE PC256
FORMATOPTION TRANSPARENT=FALSE
FORMATOPTION QUALITY=90
DRIVER AGG/JPEG
MIMETYPE image/jpeg
END #outputformat
MAXSIZE 1  #limit size of wms
IMAGETYPE gd/jpeg
WEB
IMAGEPATH '/tmp/'
IMAGEURL '/tmp/'
METADATA
'wms_title' 'MAP'
'wms_onlineresource' 
'http://localhost/cgi-bin/mapserv.exe?MAP=/ms4w/apps/PipestoneMOOSE/maps_pipestone/Raster/LocalRaster/FSA2010/LocalFSA2010.map'
'wms_srs' 'EPSG:26914'
END #metadata
END #web
###
LAYER
NAME 'FSA'
TYPE RASTER
DATA './ortho_1-1_1n_s_mn117_2010_1.sid'
METADATA
'wms_title' 'FSA'
END #metadata
STATUS DEFAULT
PROJECTION
proj=utm
zone=14
ellps=GRS80
datum=NAD83
units=m
no_defs
END #PROJECTION
PROCESSING OVERSAMPLE_RATIO=1
END #layer
END ## end Map


Mark Volz
GIS Specialist



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


[mapserver-users] job opportunity for web project

2011-07-01 Thread John Callahan
[Hopefully, it's OK to post job opportunities to this list.   I posted this
to the PostGIS list but Mapserver may play a more prominent role is getting
this work done.  I am not sure which method/software to use for these
tasks.]

I'm looking to hire someone to help on a web project I'm working on.  We use
Postgres/PostGIS as the database, MapServer as the map engine, and
OpenLayers/GeoExt as the javascript mapping framework on the front end.
Server-side: PHP/Python, Windows, Apache.

The project involves displaying numerous spatial data layers on a map with
common functionality; this part has already been done, (screenshot at
http://www.dgs.udel.edu/temp/screenshot_weblayout.png)However, we need
to add several specific tasks, such as:

- display subsets of points based on a certain criteria selected by user via
radio-buttons
- based on mouse click, return values of the polygon or raster grid cell
clicked within
- use attribute of a clicked polygon to perform queries/reporting from other
tables
- if a groundwater well is click on (points), then display time series graph
of data
- based on user selected criteria, select points and return as line and
display on map


If you would be interested in this opportunity or think this post would be
more appropriate on another list, please let me know.  It's fine with me if
any work done is shared back to the community.  Start date is anytime,
sooner the better.  Thanks.

- John

***
John Callahan, Research Scientist
Delaware Geological Survey
University of Delaware
URL: http://www.dgs.udel.edu
***
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users