nothing shows up! no image or error?
Randy James
rjames57 at YAHOO.COM
Thu Jul 6 13:12:42 PDT 2006
Albert
You also need an projection defined in the map object, not just the
layer object.
Randy
--- Albert Anderson <bart_doggers at YAHOO.COM> wrote:
> Hi,
> I am still having problem with not seeing anything. Here is my
> code again for the map file.
> #This is Richland County Map Server
> NAME "Richland"
> SIZE 800 600
> IMAGECOLOR 255 255 255
> IMAGETYPE JPEG
> SHAPEPATH "/home/mapdata/"
> EXTENT -97.134375 46.044375 -96.534375 46.494375
> WEB
> TEMPLATE '/var/www/htdocs/richland.html'
> IMAGEPATH '/var/www/htdocs/tmp'
> IMAGEURL '/tmp/'
> END
> LAYER
> NAME "Richland"
> STATUS default
> TYPE polygon
> DATA "RICH_bndy"
> PROJECTION "init=epsg:26914"
> END
> CLASS
> STYLE
> COLOR 0 0 0
> END
> END
> END
> END
>
> Is my code right? Can you help me?
>
> Thanks,
> Albert
>
> "Fawcett, David" <David.Fawcett at state.mn.us> wrote:Message
> Albert,
>
> Projection in MapServer isn't handled with an external file, like
> in ArcMap. It is done in the map file. Take a look at the
> Mapfile documentation to see how to do projection.
>
>
> http://mapserver.gis.umn.edu/docs/reference/mapfile/projection/view
>
> You need to define a projection block in the MAP block of the map
> file, this is set to the projection that you want your data output
> in.
>
> You would then define a projection block in each layer, this is
> set to the projection that the original data for that layer is in.
> It is easiest to use epsg codes, look at example 2 in the link
> above.
>
> The epsg code for UTM zone 14N nad83 is 26914 and 4326 can be
> used for you lat/long data.
>
> David.
>
> -----Original Message-----
> From: Albert Anderson [mailto:bart_doggers at yahoo.com]
> Sent: Wednesday, July 05, 2006 11:58 AM
> To: Fawcett, David; MAPSERVER-USERS at lists.umn.edu
> Subject: RE: [UMN_MAPSERVER-USERS] nothing shows up! no image or
> error?
>
>
> Hi,
>
> I was using a projection file UTM Zone 14n Nad_83. Then I
> switch to an unprojective file and I saw my data show up. What
> would be the first best step for setting a projection file?
>
> Thanks
> Albert
>
> "Fawcett, David" <David.Fawcett at state.mn.us> wrote:
> You may want to take a look at your extent.
>
> Do you really intend to show a primarily empty stretch of
> the northern Atlantic Ocean (apologies to Canary
> Islanders...)?
>
> You are telling MapServer that your map area is contained
> within a box from 50 deg. west longitude to 10 deg. west
> longitude and 20 to 90 degrees north latitude. If the name of
> your mapfile relates to the data, I am guessing that Richland
> County isn't in this box.
>
> Use ogrinfo or a desktop GIS app to look at the extent of your
> data. Also, the extent needs to be in the units of the
> spatial reference system that your data is in.
>
> David.
>
> -----Original Message-----
> From: UMN MapServer Users List
> [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Albert
> Anderson
> Sent: Wednesday, July 05, 2006 10:10 AM
> To: MAPSERVER-USERS at LISTS.UMN.EDU
> Subject: [UMN_MAPSERVER-USERS] nothing shows up! no image or
> error?
>
>
> Hi,
>
> I am making my own map file. It looks all right but when I
> click the button it doesnt show an image or any kind of
> errors.
>
> Here is my map code.
> #This is Richland County Map Server
> NAME "Richland"
> SIZE 100 100
> IMAGECOLOR 255 255 255
> IMAGETYPE JPEG
> SHAPEPATH "/home/mapdata/"
> EXTENT -50.00 20.00 -10.00 90.00
> WEB
> TEMPLATE '/var/www/htdocs/richland.html'
> IMAGEPATH '/var/www/htdocs/tmp'
> IMAGEURL '/tmp/'
> END
> LAYER
> NAME "Richland"
> STATUS default
> TYPE polygon
> DATA "RICH_bndy"
> CLASS
> STYLE
> COLOR 0 0 0
> END
> END
> END
> END
>
> here is my html code
> <html>
> <head><title>Richland County MapServer</title></head>
> <body>
> <form method=post action="/cgi-bin/mapserv">
> <input type="submit" value="Click Me"
> <input type="hidden" name="map"
> value="/home/mapdata/richland.map">
> <input type="hidden" name="map_web_imagepath"
> value="/var/www/htdocs/tmp/">
>
> </form>
> <table border="1" width="400" height="400">
> <tr>
> <td align="center" valign="top">
> <IMG SRC="[img]" width="400" height="400" border="1">
> </td>
> </tr>
> </table>
> </body>
> </html>
>
> I really dont know whats could be wrong. Maybe the extent
> of it? Can anyone help me?
>
> Thanks,
> Albert
>
>
> ---------------------------------
> How low will we go? Check out Yahoo! Messengerâs low
> PC-to-Phone call rates.
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
>
>
> ---------------------------------
> Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls.
> Great rates starting at 1¢/min.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the MapServer-users
mailing list