raster file error, does not display

Jose Luis Gonzalez joseluismapserver at YAHOO.ES
Tue Jan 25 04:35:44 EST 2005


Sorry about the 2M file I didn't know it was so bad to send it.
Could someone respond to my question anyway, thankyou

Jose Luis

Abe Gillespie <agillesp at vt.edu> wrote:
Ha, you sent a 2Meg file to the list! Begin the chastising! :)

On Jan 24, 2005, at 10:33 AM, Jose Luis Gonzalez wrote:

> 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("
");
>
> 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("
");
>
>
> 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/20050125/5f947579/attachment.html


More information about the mapserver-users mailing list