raster file error, does not display

Jose Luis Gonzalez joseluismapserver at YAHOO.ES
Mon Jan 24 07:33:02 PST 2005


Hi everyone.
Lets see if someone can tell me what could be wrong.

I am working with:
MapServer version 4.4.0 OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER INPUT=EPPL7 INPUT=GDAL INPUT=SHAPEFILE

I am using java servlets.

when I use shapefiles :usa1.map it works but when I want to include a tif file it doesn't work: usa3.map, nitelti020l.tif

The instructions I use are:

for the first case that works:

...
mapObj map = new mapObj("/mypath/usa1.map");
imageObj img = map.draw();
img.save("/mypath/usa1.png", map);
...
out.println("<BR><IMG SRC=http://webbrowserpath/usa1.png>");

For the second case with raster that doesn't work:


...
mapObj map = new mapObj("/mypath/usa3.map");
imageObj img = map.draw();
img.save("/mypath/usa3.png", map);
...
out.println("<BR><IMG SRC=http://webbrowserpath/usa3.png>");


And here are the mapfiles:

usa1.map

MAP
    NAME USA1
    STATUS ON
    SIZE 800 500
    IMAGETYPE PNG
    IMAGECOLOR 240 240 240
    SHAPEPATH "/mypath"
    EXTENT -8000000 300000 5000000 1500000
    UNITS METERS
    PROJECTION
  "proj=lcc" "lat_1=32" "lat_2=44" "lat_0=38" "lon_0=-100" "x_0=0" "y_0=0" "ellps=GRS80" "datum=NAD83"
    END
    WEB
        IMAGEPATH "/mypath/"
        IMAGEURL "/mypath/"
    END

 LAYER
  NAME "US state boundaries"
  TYPE POLYGON
  STATUS ON
  DATA "statesp020"
  PROJECTION
   "proj=latlong"
   "ellps=GRS80"
   "datum=NAD83"
  END
  CLASS
   NAME "US states"
   OUTLINECOLOR 60 60 60
   COLOR 255 255 0
   SYMBOL 0
  END
 END

 LAYER
  NAME "credits"
  STATUS DEFAULT
  TRANSFORM FALSE
  TYPE ANNOTATION
  FEATURE
   POINTS
    10 480
   END
   TEXT 'Made with Mapserver.'
  END
  CLASS
   LABEL
    TYPE BITMAP
    POSITION CR
    COLOR 0 0 0
   END
  END
 END
END


usa3.map

MAP
    NAME USA3
    STATUS ON
    IMAGETYPE PNG
    SIZE 800 500
    SHAPEPATH "/mypath"
    EXTENT -6086744.000 -2784127 4278894 4485901
    UNITS METERS
    PROJECTION "proj=laea" "lat_0=45" "lon_0=-100" "ellps=GRS80" "datum=NAD83" END
  WEB
   IMAGEPATH "/mypath/"
   IMAGEURL "/mypath/"
  END
  LAYER
   NAME "Nighttime lights"
   TYPE RASTER
   STATUS ON
   DATA "/mypath/nitelti020l.tif"
  END
  LAYER
   NAME "US state boundaries"
   TYPE POLYGON
   STATUS ON
   DATA "statesp020"
   PROJECTION
    "proj=latlong"
    "ellps=GRS80"
    "datum=NAD83"
   END
   CLASS
    NAME "US states"
    OUTLINECOLOR 50 50 50
    SYMBOL 0
   END
  END
END





---------------------------------

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20050124/0e699172/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nitelti020l.tar.gz
Type: application/x-gzip-compressed
Size: 2125393 bytes
Desc: nitelti020l.tar.gz
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20050124/0e699172/attachment.bin>


More information about the MapServer-users mailing list