What's Wrong With This Picture?
Pagurek, Debbie
PAGUREKD at AGR.GC.CA
Fri Aug 13 13:19:44 PDT 2004
Hi Barbara,
A question:
What URL are you using to try to show your map?
You might be missing a couple of things at the top of your mapfile, such
as UNITS
And in your WEB section, you might need IMAGEPATH and IMAGEURL.
In your layer definition, you could try to put the epsg part of
"wms_srs" "epsg:32633" in capital letters. Seems strange, but I seem to
recall reading something about that.
I will send you a couple of mapfiles that you can compare yours to.
Keep trying - I think you're getting closer to succeeding!
Debbie
-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of Barbara Zack
Sent: Friday, August 13, 2004 3:02 PM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] What's Wrong With This Picture?
Thanks to Paul, Ed, and Debbie I seem to be on the right track, but
still no picture. Ed was correct about the location, so EPSG:32633 is
what I needed. I also flipped the min and max y. I wondered if the size
(941 MB) could be a problem, but I can view the file using LizardTech's
browser plugin. Following is the corrected map file. Can anyone see
something else wrong with it?
Barbara
======================================
MAP
EXTENT 311999.90 5105471.083 318000.009 5112949.166
IMAGETYPE png
SIZE 932 576
PROJECTION
"init=epsg:32633"
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:32633"
END
END
LAYER
NAME "Aviano1"
DATA "/var/www/aviano/aviano.sid"
STATUS on
TYPE raster
METADATA
"wms_title" "Aviano Raster"
"wms_srs" "epsg:32633"
"wms_onlineresource"
"http://sid/cgi-bin/mapserv?map=/var/www/aviano/aviano.map&"
END
END
END
=========================================
Ed McNierney wrote:
>---------------------- Information from the mail header
-----------------------
>Sender: UMN MapServer Users List <MAPSERVER-USERS at LISTS.UMN.EDU>
>Poster: Ed McNierney <ed at TOPOZONE.COM>
>Subject: Re: What's Wrong With This Picture?
>-----------------------------------------------------------------------
--------
>
>Debbie -
>
>Thanks! Yes, that's definitely a problem, too.
>
>Barbara, getting a black image means that everything is basically
>working fine, but you are requesting a map using parameters that result
>in none of your source data being used. What Debbie and I both noticed
>were two separate problems that both will cause you to ask for a map of
>someplace far away from your data.
>
>Your coordinates resemble UTM coordinates for Aviano, Italy, which is
in
>UTM Zone 33. I can't tell what datum you're using, but WGS84 is a safe
>guess. The EPSG code for UTM Zone 33N / WGS84 is 32633, so changing
>"init=3Depsg:4326" to "init=3Depsg:32633" will probably help.
>
> - Ed
>
>Ed McNierney
>President and Chief Mapmaker
>TopoZone.com / Maps a la carte, Inc.
>73 Princeton Street, Suite 305
>North Chelmsford, MA 01863
>ed at topozone.com
>(978) 251-4242=20
>
>-----Original Message-----
>From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]
On
>Behalf Of Pagurek, Debbie
>Sent: Friday, August 13, 2004 9:16 AM
>To: MAPSERVER-USERS at LISTS.UMN.EDU
>Subject: Re: [UMN_MAPSERVER-USERS] What's Wrong With This Picture?
>
>I have a feeling that you might have another problem, because your
>Projection is:
> PROJECTION
> "init=3Depsg: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=20
>
>-----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=3DPNG OUTPUT=3DJPEG OUTPUT=3DWBMP =
>SUPPORTS=3DPROJ
>SUPPORTS=3DFREETYPE SUPPORTS=3DWMS_SERVER SUPPORTS=3DWFS_SERVER =
>INPUT=3DEPPL7
>INPUT=3DOGR INPUT=3DGDAL INPUT=3DSHAPEFILE
>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3
D=3D=
>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>gdalinfo /var/www/aviano/aviano.sid
>
>Driver: MrSID/Multi-resolution Seamless Image Database (MrSID) Size is
>89286, 111281 Coordinate System is `'
>Origin =3D (311999.989722,5105471.083134)
>Pixel Size =3D (0.06720000,0.06720000)
>Metadata:
> IMAGE__COLOR_SCHEME=3D0
> IMAGE__DATA_TYPE=3D0
> IMAGE__INPUT_FILE_SIZE=3D0.000000
> IMAGE__WIDTH=3D89286
> IMAGE__HEIGHT=3D111281
> IMAGE__XY_ORIGIN=3D312000.023322,5105471.116734
> IMAGE__X_RESOLUTION=3D0.067200
> IMAGE__Y_RESOLUTION=3D0.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=3D89286x64 Type=3DByte, ColorInterp=3DRed Band 2 =
>Block=3D89286x64
>Type=3DByte, ColorInterp=3DGreen Band 3 Block=3D89286x64 Type=3DByte,
>ColorInterp=3DBlue =
>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3
D=3D=
>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>MAP
> EXTENT 311999.990 5112949.166 318000.009 5105471.083
> IMAGETYPE png
> SIZE 783 976
> PROJECTION
> "init=3Depsg: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=3D/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=3D/var/www/aviano/aviano.map&"
> END
> CLASSITEM "[pixel]"
> CLASS
> EXPRESSION ([pixel] < 64)
> COLOR 0 0 0
> END
> CLASS
> EXPRESSION ([pixel] >=3D 64 AND [pixel] < 128)
> COLOR 255 0 0
> END
> CLASS
> EXPRESSION ([pixel] >=3D 128 AND [pixel] < 196)
> COLOR 0 255 0
> END
> CLASS
> EXPRESSION ([pixel] >=3D 196 AND [pixel] < 256)
> COLOR 0 0 255
> END
> END
>END
>
>
>
More information about the MapServer-users
mailing list