What's Wrong With This Picture?
Pagurek, Debbie
PAGUREKD at AGR.GC.CA
Fri Aug 13 06:15:50 PDT 2004
I have a feeling that you might have another problem, because your
Projection is:
PROJECTION
"init=epsg:4326"
END
which is a Geographic Projection (latitude and longitude), but the
EXTENT you've indicated looks like it's in meters or something other
than Decimal Degrees.
In addition to what Ed said, you probably need to find out what the
projection your data is in. Then you need to find the corresponding
epsg code. After you've done that, it is possible to reproject the data
on the fly using other epsg codes.
Debbie
-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of Ed McNierney
Sent: Thursday, August 12, 2004 7:09 PM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] What's Wrong With This Picture?
Barbara -
It looks like you did pretty well!
Your EXTENT line in the map file should be MINX MINY MAXX MAXY - you've
got the two Y values reversed, which means you're asking for nothing
(and getting it <g>). Try just swapping those two numbers.
- Ed
Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA 01863
Phone: +1 978 251-4242 Fax: +1 978 251-1396
-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of Barbara Zack
Sent: Thursday, August 12, 2004 5:29 PM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: [UMN_MAPSERVER-USERS] What's Wrong With This Picture?
My apologies for bothering the list with this, but I'm running out of
time. I'm primarily a programmer with almost no GIS background. Being
the only available entity, I was asked to get MapServer up and running
as a WMS server. Obviously I have no business doing this, but here I am.
I managed to get a Linux server (Debian sarge) up and running, GDAL
compiled with mrsid support, MapServer compiled, and the demo working.
The map file part is beyond my comprehension. The one I put together,
only half of which I actually understands, produces an XML capabilities
document with no warning messages. However, GetMap gives me a blank png
as output. Below are the results of mapserv -v and gdalinfo in case
that's important. Following that is my first attempt at a map file, for
your amusement. I don't understand about half of what I have in there.
Any pointers would be so greatly appreciated.
Thanks!
Barbara Z
./mapserv -v
MapServer version 4.2.2 OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP SUPPORTS=PROJ
SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WFS_SERVER INPUT=EPPL7
INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE
========================================
gdalinfo /var/www/aviano/aviano.sid
Driver: MrSID/Multi-resolution Seamless Image Database (MrSID) Size is
89286, 111281 Coordinate System is `'
Origin = (311999.989722,5105471.083134)
Pixel Size = (0.06720000,0.06720000)
Metadata:
IMAGE__COLOR_SCHEME=0
IMAGE__DATA_TYPE=0
IMAGE__INPUT_FILE_SIZE=0.000000
IMAGE__WIDTH=89286
IMAGE__HEIGHT=111281
IMAGE__XY_ORIGIN=312000.023322,5105471.116734
IMAGE__X_RESOLUTION=0.067200
IMAGE__Y_RESOLUTION=0.067200
Corner Coordinates:
Upper Left ( 311999.990, 5105471.083)
Lower Left ( 311999.990, 5112949.166)
Upper Right ( 318000.009, 5105471.083)
Lower Right ( 318000.009, 5112949.166)
Center ( 314999.999, 5109210.125)
Band 1 Block=89286x64 Type=Byte, ColorInterp=Red Band 2 Block=89286x64
Type=Byte, ColorInterp=Green Band 3 Block=89286x64 Type=Byte,
ColorInterp=Blue ===========================================
MAP
EXTENT 311999.990 5112949.166 318000.009 5105471.083
IMAGETYPE png
SIZE 783 976
PROJECTION
"init=epsg:4326"
END
OUTPUTFORMAT
NAME png
DRIVER "GD/PNG"
MIMETYPE "image/png"
IMAGEMODE PC256
EXTENSION "png"
END
WEB
METADATA
"wms_title" "Aviano Map"
"wms_onlineresource"
"http://sid/cgi-bin/mapserv?map=/var/www/aviano/aviano.map&"
"wms_srs" "EPSG:4326"
END
END
LAYER
NAME "Aviano1"
DATA "/var/www/aviano/aviano.sid"
TYPE raster
STATUS on
METADATA
"wms_title" "Aviano Raster"
"wms_onlineresource"
"http://sid/cgi-bin/mapserv?map=/var/www/aviano/aviano.map&"
END
CLASSITEM "[pixel]"
CLASS
EXPRESSION ([pixel] < 64)
COLOR 0 0 0
END
CLASS
EXPRESSION ([pixel] >= 64 AND [pixel] < 128)
COLOR 255 0 0
END
CLASS
EXPRESSION ([pixel] >= 128 AND [pixel] < 196)
COLOR 0 255 0
END
CLASS
EXPRESSION ([pixel] >= 196 AND [pixel] < 256)
COLOR 0 0 255
END
END
END
More information about the MapServer-users
mailing list