[mapserver-users] quick question from mapserver beginner!

2010-05-12 Thread Asuka Milano
hello everyone, ive just started using mapserver with openlayers for a 
custom app for our company. being the super newbie that i am, i have 
this problem:


http://img688.imageshack.us/img688/5926/99138762.jpg

as you can see, i have my mapserver data as an overlay above a 
basemap(from google)...
i have a TIFF image (the field) about 3000px by 2000px which i am just 
supposed to use as a raster overlay so i guess i am somewhat successful 
with displaying it abeit it was just a test overlay and the world file 
values arnt really accurate at the moment


now the problem is the background color. it seems that resizing the 
raster image through the world file only fixes the layer and im left 
with an opaque map that covers the base layer.. ive tried adjusting the 
map size and extent bounds to no avail.. help please! here's my map file:


---
  # Map image size
  SIZE 968 232 - i tried adjusting this but doesnt have any effect
  UNITS dd

  EXTENT -90 -45 90 45 - i tried adjusting this too
  PROJECTION
'proj=longlat'
'ellps=WGS84'
'datum=WGS84'
'no_defs'
''
  END


  IMAGECOLOR 0 0 0 - obviously this is the black that i see
  IMAGEQUALITY 95
  IMAGETYPE PNG24
  OUTPUTFORMAT
NAME PNG
DRIVER 'GD/PNG24'
MIMETYPE 'image/PNG'
#IMAGEMODE PC256
EXTENSION 'PNG'
  END
  # Legend
  LEGEND
  IMAGECOLOR 255 255 255
STATUS ON
KEYSIZE 18 12
LABEL
  TYPE BITMAP
  SIZE MEDIUM
  COLOR 0 0 89
END
  END


  WEB
IMAGEPATH '/tmp/'
IMAGEURL '/tmp/'


METADATA
  'wms_title'   'bell'
  'wms_onlineresource'  
'http://my.host.com/cgi-bin/mapserv?map=wms.map;'

  'wms_srs' 'EPSG:4326'
END

  END

  LAYER
NAME ''
TYPE RASTER
DATA '*'
METADATA
  'wms_title' '***'
END
STATUS DEFAULT
TRANSPARENCY 100
PROJECTION
'proj=longlat'
'ellps=WGS84'
'datum=WGS84'
'no_defs'
''
END
  END

END
--


i look forward to hearing from you guys :D
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Cent Os vs debian

2010-05-12 Thread Tonton
hello
i use mapserver on Ubuntu and i have to move installation to CentOs

so link change

it was

http://host/cgi-bin/mapserv?map=pathtomapfile...   /var/www/html/foo.map

but on
http://host/cgi-bin/mapserv?  reply NOT FOUND instead of  No query
information to decode. QUERY_STRING is set, but empty. :o(


/var/www/cgi-bin empty (which not exist in ubuntu)
may i have to link with

cd /var/www/cgi-bin
ln -s /usr/bin/mapserv mapserv ?
and which user right on ?

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


[mapserver-users] Re: quick question from mapserver beginner!

2010-05-12 Thread mani2604

hi
  Well jus guessing that u need to lower the 
http://mapserver.org/mapfile/layer.html#opacity TRANSPARENCY/OPACITY  value
for Raster image; So that the base map is not obscured by the raster overlay
you were trying to apply. Is that the thing u wer asking for?!  I jus can't
see your image as the site is blocked...

Gud luck,

-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/quick-question-from-mapserver-beginner-tp5040040p5040556.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] MapServer join with dbf table or spatial query

2010-05-12 Thread Jeff McKenna

Enrico Raviglione wrote:

Hi to all,

 

i try to do with MapServer (with p.mapper as interface)  a join with a 
shape into a layer and a dbf table. The type of join are one to many. I 
follow the manual but i never see any query result also if i try to make 
a one-to-one join.


 


I can obtain the same result of the join if i can do a spatial query.

My need are make a spatial query from one shape on a specific layer, 
selected by the user with the mouse click, to find a list of overlapped 
shapes (and its attributes) who stay on some different layers.


 

Can anyone help me or send some samples or documentation for one or the 
two different solution?




Hello,

The documentation contains examples for joining a SHP with a DBF 
(http://www.mapserver.org/mapfile/join.html).  The examples in that 
document use MapServer CGI, but I am not familiar with p.mapper.  Maybe 
try your initial tests with MapServer CGI, to verify that you have the 
correct configuration, before testing with your application.


-jeff


--
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/


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


[mapserver-users] Re: Cent Os vs debian

2010-05-12 Thread Tonton

 http://host/cgi-bin/mapserv?  reply NOT FOUND instead of  No query
 information to decode. QUERY_STRING is set, but empty. :o(



Modify virtualhost config in /etc/httpd/conf/httpd.conf

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


[mapserver-users] Re: quick question from mapserver beginner!

2010-05-12 Thread mattmendick

You first have to make sure you are outputting the image as a png or some
other image format that supports transparency. Like this, at the base of the
mapfile:

OUTPUTFORMAT
NAME mypng
DRIVER GD/PNG
IMAGEMODE RGB
FORMATOPTION INTERLACE=false
MIMETYPE image/png
EXTENSION png
END
IMAGETYPE mypng

Then, if your source image is not perfectly square, and has black in areas
that you want to be transparent, you can use the OFFSITE [R] [G] [B]
attribute. This tells mapserver that any color in the raster that matches
the color in your OFFSITE parameter should be rendered transparent.

ex:

LAYER
   NAME blah
   DATA '/path/to/raster.tiff'
   OFFSITE 0 0 0
END

This has worked for me in the past, I hope it works for you.

-Matt Mendick
-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/quick-question-from-mapserver-beginner-tp5040040p5040856.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] wms layer query

2010-05-12 Thread Eric Weisbender
Thanks Dave,

I have tried a direct getFeatureInfo request and it works great... 
http://rmgsc.cr.usgs.gov/arcgis/services/nhss_haz/MapServer/WMSServer?service=WMSversion=1.1.1request=GetFeatureInfoSRS=EPSG:4326BBOX=-159.845000,20.809000,-72.815000,67.239000query_layers=1WIDTH=1HEIGHT=1X=1Y=1info_format=text/html;.
  When I query it through my MapServer I get the following error...  
msQueryByRect(): Search returned no results. No matching record(s) found.  I 
am using MapServer Version 5.2.2 and the WMS service is a USGS service 
available in both WMS Version 1.1.1 and 1.3.0.  I'm wondering if there are some 
compatibility issues and if anyone has a working example I might take a look 
at.  Again, thanks in advance.

EW

 Fawcett, David (MPCA) david.fawc...@state.mn.us 5/10/2010 7:33 AM 
Have you tried a direct getFeatureInfo request from a browser?  

David.

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Eric Weisbender
Sent: Friday, May 07, 2010 2:19 PM
To: mapserver-users@lists.osgeo.org 
Subject: [mapserver-users] wms layer query

Hello,

I have a wms layer defined in my map file coming from a USGS service that is 
supposed to be queryable  but when I query it I get nothing in return.  It 
draws fine and the GetCapabilities request says Layer queryable=1.  I 
wondering if it's my layer definition or if you just can't do this in basic 
mapserver.  Below is my layer def and any help is beer worthy.  Thanks in 
advance.


LAYER
  NAME firetest
  METADATA
wms_srs EPSG:4326
wms_name1
wms_server_version  1.1.1
wms_format  image/png
wms_title 1
wfs_title 1
wms_metadataurl_format text/html
 gml_include_items all
 wms_include_items all
 END
  STATUS OFF
  TYPE RASTER
  #MINSCALE 3800
  CONNECTIONTYPE WMS
  CONNECTION 
http://rmgsc.cr.usgs.gov/arcgis/services/nhss_haz/MapServer/WMSServer?service=WMSversion=1.1.1request=GetMaplayers=1styles=defaluttransparent=TRUEformat=image/png;
  PROJECTION
  init=epsg:4326
  END
  CLASS
NAME fire wms test
KEYIMAGE '/data/gis/www/html/ms_common/fire.png'
  END
  TEMPLATE http://gis.hq.wapa.gov/ms_common/fires.html;
  HEADER http://gis.hq.wapa.gov/ms_common/fires_header.html;
  FOOTER http://gis.hq.wapa.gov/ms_common/fires_footer.html;
  TOLERANCE 10
END



___
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 layer query

2010-05-12 Thread Rahkonen Jukka
Hi,

I fear I cannot help with the problem itself but I suppose there are two 
non-standard things in the GetFeatureInfo query:

- WMS layer names must not start with a number
- layers should be included also in GetFeatureInfo (not sure about this)

-Jukka Rahkonen-

Eric Weisbender wrote:

 
 Thanks Dave,

 I have tried a direct getFeatureInfo request and it works great... 
 http://rmgsc.cr.usgs.gov/arcgis/services/nhss_haz/MapServer/WMSServer?service=WMSversion=1.1.1request=GetFeatureInfoSRS=EPSG:4326BBOX=-159.845000,20.809000,-72.815000,67.239000query_layers=1WIDTH=1HEIGHT=1X=1Y=1info_format=text/html;.
   When I query it through my MapServer I get the following error...  
 msQueryByRect(): Search returned no results. No matching record(s) found.  I 
 am using MapServer Version 5.2.2 and the WMS service is a USGS service 
 available in both WMS Version 1.1.1 and 1.3.0.  I'm wondering if there are 
 some compatibility issues and if anyone has a working example I might take a 
 look at.  Again, thanks in advance.

EW

 Fawcett, David (MPCA) david.fawc...@state.mn.us 5/10/2010 7:33 AM 
Have you tried a direct getFeatureInfo request from a browser?  

David.

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Eric Weisbender
Sent: Friday, May 07, 2010 2:19 PM
To: mapserver-users@lists.osgeo.org 
Subject: [mapserver-users] wms layer query

Hello,

I have a wms layer defined in my map file coming from a USGS service that is 
supposed to be queryable  but when I query it I get nothing in return.  It 
draws fine and the GetCapabilities request says Layer queryable=1.  I 
wondering if it's my layer definition or if you just can't do this in basic 
mapserver.  Below is my layer def and any help is beer worthy.  Thanks in 
advance.


LAYER
  NAME firetest
  METADATA
wms_srs EPSG:4326
wms_name1
wms_server_version  1.1.1
wms_format  image/png
wms_title 1
wfs_title 1
wms_metadataurl_format text/html
 gml_include_items all
 wms_include_items all
 END
  STATUS OFF
  TYPE RASTER
  #MINSCALE 3800
  CONNECTIONTYPE WMS
  CONNECTION 
http://rmgsc.cr.usgs.gov/arcgis/services/nhss_haz/MapServer/WMSServer?service=WMSversion=1.1.1request=GetMaplayers=1styles=defaluttransparent=TRUEformat=image/png;
  PROJECTION
  init=epsg:4326
  END
  CLASS
NAME fire wms test
KEYIMAGE '/data/gis/www/html/ms_common/fire.png'
  END
  TEMPLATE http://gis.hq.wapa.gov/ms_common/fires.html;
  HEADER http://gis.hq.wapa.gov/ms_common/fires_header.html;
  FOOTER http://gis.hq.wapa.gov/ms_common/fires_footer.html;
  TOLERANCE 10
END



___
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 mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Cent Os vs debian

2010-05-12 Thread pelin
en la definicion de los virtual hosts debes agregar:
en Apache 2.2

VirtualHost *:80
...
...
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
Directory /usr/lib/cgi-bin
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
/Directory
...
...
/VirtualHost

en el caso de Debian el cgi-bin se encuentra en /usr/lib/cgi-bin/mapserv

DON'T use symlinks (ln -s)

saludos!


http://blogs.hydras.com.ar/srodriguez/
http://etisig.siup.gov.ar

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


[mapserver-users] Mathematical Scaling of Floating Point Data in Mapserver Map File

2010-05-12 Thread Peter Willis


Hello,

Is it possible to apply nonlinear scaling to classify
floating point tiff rasters.

All examples that I have seen appear to assume a linear
dataset.

If I wish to scale the data by the base 10 log
of the data and then scale the Red, Green and Blue values
of the classification, can I do it in the map file?

What are the available functions that may be used
in the mapfile 'PROCESSING' and 'EXPRESSION' items?

Thanks,

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


[mapserver-users] compilation error

2010-05-12 Thread pablo lopez
Hi List, Im building mapserver 5.6.3 on a ubuntu box. The config script I'm
using is:
./configure --prefix=/usr \
--with-ogr=/usr/bin/gdal-config \
--with-gdal=/usr/bin/gdal-config \
--with-httpd=/usr/sbin/apache2 \
--with-wfsclient \
--with-fribidi \
--with-wmsclient \
--with-wfs \
--with-pdf \
--enable-debug \
--with-curl-config=/usr/bin/curl-config \
--with-proj=/usr \
--with-tiff \
--with-gd \
--with-jpeg \
--with-png=/usr/lib \
--with-freetype=/usr/lib \
--with-threads \
--with-wcs \
--with-postgis=/usr/bin/pg_config \
--with-geos=/usr/bin/geos-config \
--with-libiconv=/usr/lib \
--with-php=/usr/include/php5 \
--with-agg


 The config output is:

MapServer is now configured for

 -- Compiler Info -
  C compiler:gcc -g  -fPIC -Wall
  C++ compiler:  g++ -g  -fPIC -Wall
  Debug: -g
  Generic NINT:

 -- Renderer Settings -
  OpenGL support:
  zlib support:  -DUSE_ZLIB
  png support:
  palette rgba png support:
  jpeg support:
  iconv support: -DUSE_ICONV
  AGG support:   -DUSE_AGG
  Cairo (SVG,PDF) support:
  Ming(flash) support:
  PDFLib support:-DUSE_PDF

 -- Support Libraries -
  Proj.4 support:-DUSE_PROJ
  Libxml2 support:   -DUSE_LIBXML2
  FriBidi support:
  Curl support:  -DUSE_CURL
  FastCGI support:
  Threading support: -DUSE_THREAD
  GEOS support:  -DUSE_GEOS -DGEOS_HAS_SIMPLIFY

 -- Data Format Drivers ---
  native tiff support:   -DUSE_TIFF
  PostGIS support:   -DUSE_POSTGIS
  EPPL7 support: -DUSE_EPPL
  ArcSDE support:
  OGR support:   -DUSE_OGR
  GDAL support:  -DUSE_GDAL
  Oracle Spatial support:

 -- OGC Services --
  WMS Server:-DUSE_WMS_SVR
  WMS Client:-DUSE_WMS_LYR
  WFS Server:-DUSE_WFS_SVR
  WFS Client:-DUSE_WMS_LYR
  WCS Server:-DUSE_WCS_SVR
  SOS Server:

 -- MapScript -
  PHP MapScript: yes


Now, when i run make, it ends up with the following error:

shp2img.c:33: warning: ‘cvsid_aw’ defined but not used
g++ -g  -fPIC -Wall -DHAVE_VSNPRINTF -DNEED_STRLCAT
-DNEED_STRRSTR-DUSE_WMS_LYR -DUSE_WFS_LYR  -DUSE_LIBXML2 -DUSE_CURL
-DUSE_WCS_SVR -DUSE_WFS_SVR -DUSE_WMS_SVR-DUSE_POSTGIS -DUSE_TIFF
-DUSE_GDAL -DUSE_OGR -DUSE_GEOS -DGEOS_HAS_SIMPLIFY  -DUSE_THREAD -DUSE_PROJ
-DUSE_EPPL  -DUSE_AGG   -DUSE_PDF  -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG
-DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR
-DGD_HAS_GETBITMAPFONTS -DUSE_ICONV -DUSE_ZLIB -I/usr/include
-I/usr/include/freetype2-I/usr/include -I/usr/include/gdal
-I/usr/include/postgresql -I/usr/include-I/usr/include/libxml2
shp2img.o  -L. -lmapserver -lgd -L/usr/lib64 -lgd -ljpeg -L/usr/lib
-lfreetype -L/usr/lib -lpng -lz -lXpm -lX11 -lpdf -ltiff -ljpeg
-L/usr/lib -lfreetype -L/usr/lib -lpng -lz -lXpm -lX11  -L/usr/lib64 -lproj
-ljpeg -L/usr/lib -lpng  -L/usr/lib -lgdal1.6.0 -L/usr/lib -lgeos_c
-I/usr/include -lsqlite3 -lodbc -lodbcinst -L/usr/lib -lexpat -L/usr/lib
-lxerces-c -lpthread -ljasper -lhdf5 -lmfhdf -ldf -logdi -lgif -ljpeg -lpng
-lnetcdf -lpq -L/usr/lib -lpq -lz -lpthread -lm -lrt -ldl -lcurl
-Wl,-Bsymbolic-functions -rdynamic -L/usr/lib/mysql -lmysqlclient
-L/usr/lib -lpq -lpgport -lxslt -lxml2 -lpam -lssl -lcrypto -lkrb5 -lcom_err
-lgssapi_krb5 -lz -lreadline -lcrypt -ldl -lm   -lcurl  -L/usr/lib -lgeos_c
-lpthread -L -lc  -lz -lxml2  -lm -lstdc++-o shp2img
/usr/bin/ld: cannot find -logdi
collect2: ld returned 1 exit status
make: *** [shp2img] Error 1


I'm lost here, any help is appreciated
Thanks
Pablo
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Mathematical Scaling of Floating Point Data in Mapserver Map File

2010-05-12 Thread Frank Warmerdam

Peter Willis wrote:


Hello,

Is it possible to apply nonlinear scaling to classify
floating point tiff rasters.

All examples that I have seen appear to assume a linear
dataset.

If I wish to scale the data by the base 10 log
of the data and then scale the Red, Green and Blue values
of the classification, can I do it in the map file?

What are the available functions that may be used
in the mapfile 'PROCESSING' and 'EXPRESSION' items?


Peter,

The short answer is that you cannot, in general, do non-linear
scaling.  Depending on the dynamic range of your data, you could
use classes to do something approximating non-linear scaling but you
need to be aware that in the background there is still a linear scaling
being done before the classification is applied to the scaled buckets.
But you can request as many as 64K buckets which would still give you
pretty good control over something like four orders of magnitude.

You might use something like:

  PROCESSING SCALE=0,10
  PROCESSING SCALE_BUCKETS=64000

  CLASS
EXPRESSION ([pixel]  2.5)
COLOR 255 0 0
  END
  CLASS
EXPRESSION ([pixel]  10)
COLOR 235 20 20
  END
  CLASS
EXPRESSION ([pixel]  25)
COLOR 215 40 40
  END
  CLASS
EXPRESSION ([pixel]  100)
COLOR 195 60 60
  END
  CLASS
EXPRESSION ([pixel]  250)
COLOR 175 80 80
  END
  CLASS
EXPRESSION ([pixel]  1000)
COLOR 165 100 100
  END
  CLASS
EXPRESSION ([pixel]  2500)
COLOR 145 120 120
  END
  CLASS
EXPRESSION ([pixel]  1)
COLOR 125 140 140
  END
  CLASS
EXPRESSION ([pixel]  25000)
COLOR 105 160 160
  END
  CLASS
EXPRESSION ([pixel] = 10)
COLOR 85 180 180
  END

Note that because the values between 0 and 10 are classified
into only 64000 buckets you don't really have very good precision
at the bottom end of the range.  So even though we specify
[pixel]  2.5, each bucket is about 1.5625 wide so the first two
buckets will get put into the first class, including values
between 2.5 and 3.125.  This imprecision will become insignificant
to a log scale as you move up to larger values.

Good luck,
--
---+--
I set the clouds in motion - turn up   | Frank Warmerdam, warmer...@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush| Geospatial Programmer for Rent

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


Re: [mapserver-users] Mathematical Scaling of Floating Point Data in Mapserver Map File

2010-05-12 Thread Peter Willis

Thanks Frank,

That helps somewhat.

It's going to be a bit of a bear making a 256 color lookup
that way. I guess I can script the CLASS lookup sections of
the map file(s).

Peter


Frank Warmerdam wrote:

Peter Willis wrote:


Hello,

Is it possible to apply nonlinear scaling to classify
floating point tiff rasters.

All examples that I have seen appear to assume a linear
dataset.

If I wish to scale the data by the base 10 log
of the data and then scale the Red, Green and Blue values
of the classification, can I do it in the map file?

What are the available functions that may be used
in the mapfile 'PROCESSING' and 'EXPRESSION' items?


Peter,

The short answer is that you cannot, in general, do non-linear
scaling.  Depending on the dynamic range of your data, you could
use classes to do something approximating non-linear scaling but you
need to be aware that in the background there is still a linear scaling
being done before the classification is applied to the scaled buckets.
But you can request as many as 64K buckets which would still give you
pretty good control over something like four orders of magnitude.

You might use something like:

  PROCESSING SCALE=0,10
  PROCESSING SCALE_BUCKETS=64000

  CLASS
EXPRESSION ([pixel]  2.5)
COLOR 255 0 0
  END
  CLASS
EXPRESSION ([pixel]  10)
COLOR 235 20 20
  END
  CLASS
EXPRESSION ([pixel]  25)
COLOR 215 40 40
  END
  CLASS
EXPRESSION ([pixel]  100)
COLOR 195 60 60
  END
  CLASS
EXPRESSION ([pixel]  250)
COLOR 175 80 80
  END
  CLASS
EXPRESSION ([pixel]  1000)
COLOR 165 100 100
  END
  CLASS
EXPRESSION ([pixel]  2500)
COLOR 145 120 120
  END
  CLASS
EXPRESSION ([pixel]  1)
COLOR 125 140 140
  END
  CLASS
EXPRESSION ([pixel]  25000)
COLOR 105 160 160
  END
  CLASS
EXPRESSION ([pixel] = 10)
COLOR 85 180 180
  END

Note that because the values between 0 and 10 are classified
into only 64000 buckets you don't really have very good precision
at the bottom end of the range.  So even though we specify
[pixel]  2.5, each bucket is about 1.5625 wide so the first two
buckets will get put into the first class, including values
between 2.5 and 3.125.  This imprecision will become insignificant
to a log scale as you move up to larger values.

Good luck,



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


Re: [mapserver-users] Mathematical Scaling of Floating Point Data in Mapserver Map File

2010-05-12 Thread Peter Willis

Frank Warmerdam wrote:

There isn't anything magical about 256.



256 or better raster scales sure are pretty though :)

Seriously though, the raster data is floating point log data
with relatively random spatial distribution. Short of making
two images, one log float and one anti-log float, it would be
nice to be able to scale on the fly without duplicating the
original data.

Duplication of rasters is O.K. if you have one or two, but
once you near the 30k-40k files mark the disk space becomes
a tad expensive.

Would it be out of line to suggest some scaling functions
like the generic math functions:

log
log10
sin
asin
sinh
cos
acos
cosh
tan
atan
tanh
abs
sqrt
mod

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


Re: [mapserver-users] Mathematical Scaling of Floating Point Data in Mapserver Map File

2010-05-12 Thread Frank Warmerdam

Peter Willis wrote:

Frank Warmerdam wrote:

There isn't anything magical about 256.



256 or better raster scales sure are pretty though :)

Seriously though, the raster data is floating point log data
with relatively random spatial distribution. Short of making
two images, one log float and one anti-log float, it would be
nice to be able to scale on the fly without duplicating the
original data.

Duplication of rasters is O.K. if you have one or two, but
once you near the 30k-40k files mark the disk space becomes
a tad expensive.

Would it be out of line to suggest some scaling functions
like the generic math functions:

log
log10
sin


...

Peter,

I understand your point, but I remain somewhat hesitant to build it
a lot more complexity into the floating point handling for display.

Best regards,
--
---+--
I set the clouds in motion - turn up   | Frank Warmerdam, warmer...@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush| Geospatial Programmer for Rent

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