Layers don't show up

Jacob Delfos jacob.delfos at MAUNSELL.COM
Tue Feb 15 16:57:20 PST 2005


Wokar,

you MUST set a proper path for your shapefile, because otherwise it becomes relative to the application. That is why it says:

msSHPOpenFile(): Unable to access file. (/var/www/cgi-bin/nhtm93s3) 

Because it is trying to find a shapefile called "nhtm93s3" inside your cgi-bin folder. Use an absolute path for your shapepath. And if your file is not a shapefile, I think you should convert it. I am not sure whether the OGR input supports e00 (Arc Export format). But I know for sure it definitely will not work if you try to access it as a normal shapefile.

The errors you get so far are purely those of the input files not being found (or not being shapefiles). You must solve that first.

regards,

Jacob






--------------------------------------------------------------------------------
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of w m
Sent: 16 February 2005 08:18
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] Layers don't show up


Thank You Brent, 
I did change  the SHAPEPATH
Also, Instead of using those particular files, I replaced it with many different shapefiles....it still didn't show up. Only the map shows up and the layers don't.  Even the legend doesn't show up. No clue why?


Brent Fraser <bfraser at GEOANALYTIC.COM> wrote:
  Wokar,

  Two problems:

  1. A file ending in .e00 is not a shapefile, it's an ESRI export format.    I don't think Mapserver will read those.  Search the MapServer email archive on how to convert e00 files to shapefiles.

  2. You need to set your SHAPEPATH to have a leading "/" to indicate it's an absolute path:    
          SHAPEPATH "/var/www/temp"

  Brent Fraser

    ----- Original Message ----- 
    From: w m 
    To: MAPSERVER-USERS at LISTS.UMN.EDU 
    Sent: Tuesday, February 15, 2005 12:06 PM
    Subject: [UMN_MAPSERVER-USERS] Layers don't show up


    Hi,

    I have made a map file.  My layers are still not showing up??  I have changed my SHAPEPATH, i also tried to put my data in different folders but it still didn't work.  I have named my CLASSES and they still are not showing up on the le gend. 

    http://132.205.108.60



    If I try to access my map by writing http://132.205.108.60/cgi-bin/mapserv?map=/var/www/cgi-bin/ogr.map&mode=map&layer=mylandcover 

    it gives me the following errors:

    msDrawMap(): Image handling error. Failed to draw layer named 'mylandcover'. 
    msSHPOpenFile(): Unable to access file. (/var/www/cgi-bin/nhtm93s3) 
    msSHPOpenFile(): Unable to access file. (/var/www/cgi-bin/nhtm93s3) 

    When I try this :http://132.205.108.60/cgi-bin/mapserv?map=ogr.map&mode=map&layer=myroads

    msDrawMap(): Image handling error. Failed to draw layer named 'myroads'. 
    msSHPOpenFile(): Unable to access file. (/var/www/cgi-bin/rtf100k) 
    msSHPOpenFile(): Unable to access file. (/var/www/cgi-bin/rtf100k) 

    The rtf100k and the other file both have an e00 extension. Is there a way to check if these files are corrupted??  They open up in otepad though. I'm working in linux

    I tried putting all my data to var/www/temp but when i change my shapepath to this then int the above errors it says :

    /var/www/cgi-bin/var/www/temp/rtf100k

    why is that?why does it goes automatically to cgi-bin and then  to var/www/temp/rtf100k.

    Thank You all for your help. It is greatly appreciated.

    Wokar

    NAME europe # set the map name to anything you like

    # Set the extent to match YOUR shapefile(s)

    # coordinates are Westernmost Southermost Easternmost Northernmost



    # STATUS ON

    IMAGETYPE PNG

    #IMAGECOLOR 255 255 255 # white background

    #IMAGECOLOR 25 12 60 # blue navy

    IMAGECOLOR 255 200 255 #pinkish purple











    EXTENT 407.997812 4103475.750 443135.000 4157027.250

    # here is an example for Lat/Lon.

    #EXTENT -97.5 41.619778 -82.122902 49.38562

    # can leave the font-set alone

    #FONTSET "/usr/local/etc/htdocs/mapserver/fonts/fonts.list"

    # set the size of the Image to be displayed

    SIZE 500 500

    # Set the SHAPEPATH to point where you have stored your shapefiles

    # substitute your user ID for YOUR_ID below.

    # SHAPEPATH "/home/evsc468/public_html/YOUR_ID/"

    # or point to shapefiles in some other directory

    SHAPEPATH ""

    # you will need to customize the layer definitions for YOUR layers

    # remember that the SHAPEFILES for the LAYERs should be stored in the

    # directory pointed to by SHAPEPATH above.

    # Set your template file to the name of YOUR template file

    # you can leave the image path and image URL alone

    WEB

    TEMPLATE "html/index.html"

    IMAGEPATH "var/www/temp"

    IMAGEURL "temp"

    END



    LEGEND

    KEYSIZE 12 12

    #STATUS ON

    LABEL

    TYPE BITMAP

    #TYPE TRUETYPE

    #FONT arial

    COLOR 0 0 0

    SIZE MEDIUM #10

    #ANTIALIAS TRUE

    END

    STATUS ON

    END

    # LAYER DEFINITIONS -----------------------------------------

    LAYER

    NAME "myoutline"

    DATA europa

    STATUS DEFAULT # Show the layer at all times

    TYPE POLYGON # polygon makes it clored on the inside. if TYPE 

    #line was chosen, the colour inide and outsde would be the same

    #TYPE LINE # choices for type are POLYGON, LINE and POINT

    CLASS

    COLOR 255 220 60 # use black lines...yellow color 255 220 60

    OUTLINECOLOR 255 120 60 # numbers represent brightness of Red, Green and B

    # outisde line colour is orange-255 120 60

    END

    END



    LAYER

    NAME "credits"

    STATUS DEFAULT

    TRANSFORM FALSE

    TYPE ANNOTATION

    FEATURE

    POINTS

    50 480 # changes the location of the text

    END

    TEXT 'Europe Map'

    END

    CLASS

    LABEL

    TYPE BITMAP

    POSITION CR

    COLOR 255 120 60 

    END

    END

    END





    LAYER #

    NAME "mylandcover"

    DATA nhtm93s3

    STATUS ON # show layer, but allow it to be turned off

    TYPE POLYGON # choices for type are POLYGON, LINE and POINT

    CLASSITEM "LANDCOVER"

    CLASS # water

    NAME "Water"

    EXPRESSION 'Water' # match only those where [landcover]='Water'

    COLOR 225 225 255 

    OUTLINECOLOR 0 0 0

    END

    CLASS # grassland

    NAME "Grassland"

    EXPRESSION /Planted*/ # search for landcovers starting with Planted

    COLOR 0 240 0

    OUTLINECOLOR 0 0 0

    END

    CLASS # forest

    NAME "Forest"

    EXPRESSION /Forest*/

    COLOR 200 140 0

    OUTLINECOLOR 0 0 0

    END

    # CLASS # salt marsh

    # NAME Salt Marsh

    # EXPRESSION /Salt*/

    # COLOR 0 200 140

    # OUTLINECOLOR 0 0 0

    # END

    CLASS # sand

    NAME "Sand"

    EXPRESSION /Bare*/

    COLOR 240 240 240

    OUTLINECOLOR 0 0 0

    END

    END # end of layer object



    LAYER

    NAME "myroads"

    DATA ROADSEG

    #DATA rtf100k

    STATUS ON

    TYPE line

    CLASS

    NAME Roads

    COLOR 200 0 200

    OUTLINECOLOR 0 0 0

    END # end of class

    END # end of layer object







    END # end of map file



----------------------------------------------------------------------------
    Do you Yahoo!?
    Yahoo! Search presents - Jib Jab's 'Second Term'


--------------------------------------------------------------------------------
Do you Yahoo!?
Yahoo! Search presents - Jib Jab's 'Second Term'
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20050216/354f1952/attachment.htm>


More information about the MapServer-users mailing list