Hi David,

Thanks for your answer, I've learnt a lot with it and googling around.
I am now sure that the problem is with the projection of the data, but
I don't know how to configure it in the layer.

If I do the WMS query that I want, I get:
msWMSLoadGetParams(): WMS Server error. Invalid SRS given: SRS must be
valid for all requested layers.

If I do the query you suggested me, I get a blank image.
http://150.214.142.46:6969/cgi-bin/mapserv?MAP=/srv/maps/test.map&mode=map

Here is the output of gdalinfo on the tiff:
[EMAIL PROTECTED]:/srv/maps$ gdalinfo data/frankestein16/frankestein_0_0.tif
Driver: GTiff/GeoTIFF
Size is 6100, 6100
Coordinate System is:
PROJCS["unnamed",
    GEOGCS["unnamed",
        DATUM["unknown",
            SPHEROID["unretrievable - using WGS84",6378137,298.257223563]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433],
        AUTHORITY["EPSG","0"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",-3],
    PARAMETER["scale_factor",0.9995999932289124],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]]]
Origin = (149532.733261565037537,4145546.514501546975225)
Pixel Size = (4.000000000000000,-4.000000000000000)
Metadata:
  AREA_OR_POINT=Area
  TIFFTAG_XRESOLUTION=100
  TIFFTAG_YRESOLUTION=100
Corner Coordinates:
Upper Left  (  149532.733, 4145546.515) (  6d57'30.23"W, 37d23'25.64"N)
Lower Left  (  149532.733, 4121146.515) (  6d56'48.86"W, 37d10'15.74"N)
Upper Right (  173932.733, 4145546.515) (  6d41'0.05"W, 37d23'57.68"N)
Lower Right (  173932.733, 4121146.515) (  6d40'21.54"W, 37d10'47.53"N)
Center      (  161732.733, 4133346.515) (  6d48'55.17"W, 37d17'6.94"N)
Band 1 Block=6100x1 Type=Byte, ColorInterp=Red
Band 2 Block=6100x1 Type=Byte, ColorInterp=Green

And my mapfile:

MAP
        NAME DGIS
        STATUS ON
        SIZE 800 475
        DEBUG on

        EXTENT 149532.733262 4061858.514502 246384.733262
4145546.514502 #-180 -90 180 90
        UNITS meters
        SHAPEPATH "data"
        IMAGETYPE PNG
        OUTPUTFORMAT
                NAME png
                DRIVER "GD/PNG"
                MIMETYPE "image/png"
                IMAGEMODE RGB
                EXTENSION "png"
        END
        CONFIG "PROJ_LIB" "/srv/maps/proj"

        PROJECTION
                "init=epsg:4326"
        END

        LAYER
                NAME "frankestein"
                DEBUG on
                STATUS DEFAULT
                TILEINDEX "frankestein16/frankestein.shp"
                TILEITEM "Location"
                TYPE RASTER
        END


        LAYER
                NAME "donana_junta_geo"
                TYPE RASTER
                STATUS ON
                DATA frankestein16/frankestein_0_0.tif
        END
    END
END

I'm a totally newbie at mapserver and geographical data area, so
please forgive me if I said something wrong.
Hope you could help me, and thanks in advance.


On Feb 12, 2008 4:25 PM, Fawcett, David <[EMAIL PROTECTED]> wrote:
> Christian,
>
> You didn't include the layer definition for the layer that you want to serve 
> as a WMS, so I can't tell if you have a projection block that is reprojecting 
> your data to 4326 from the spatial reference system that it is in.
>
> When I look at the ogrinfo output, it looks like your data is in UTM, or some 
> SRS that uses meters or feet as the units.  In your map file, you have set 
> the units to meters, but the extent looks like you are trying to use decimal 
> degrees.  You are also stating that your output SRS is 4326 or geographic.
>
> I would suggest getting a simple mode=map request working before you try to 
> get a WMS request working.
>
> Try commenting out all of the projection information, use the extent values 
> from ogrinfo in your MAP EXTENT.  (149532.733262 4061858.514502 246384.733262 
> 4145546.514502)  Set the layer STATUS to DEFAULT.
>
> Your URL should look something like:
>
> http://192.168.1.16:6969/cgi-bin/mapserv?&MAP=/srv/maps/DGIS.map&mode=map
>
> I am not sure if you have additional problems, but definitely have a problem 
> with projections and the extent values in your map file.  After you get this 
> stripped down version working, you will need to know what spatial reference 
> system your data is in, so you can define a projection block in your layer.  
> This defines the input/native projection for that data, the projection block 
> at the top of the map file defines the output projection for the entire map.
>
> If this still gives you problems, you could simplify it even further by 
> creating a layer with one of your geotiffs as the data.  This eliminates 
> issues related to the tile index.
>
> David.
>
>
> -----Original Message-----
> From: UMN MapServer Users List [mailto:[EMAIL PROTECTED] On Behalf Of 
> Christian López Espínola
> Sent: Tuesday, February 12, 2008 9:10 AM
> To: MAPSERVER-USERS@LISTS.UMN.EDU
> Subject: Re: [UMN_MAPSERVER-USERS] Layer that returns white tiles
>
>
> Hi again,
>
> Thanks to both of you.
> I think it is a problem with projections, but I don't know how I should fix 
> it... Anyway I'm not sure that this is the problem, so I give more info about 
> my issue.
>
> Ogrinfo says:
> [EMAIL PROTECTED]:/srv/maps$ ogrinfo -al data/frankestein16/frankestein.shp
> INFO: Open of `data/frankestein16/frankestein.shp'
>       using driver `ESRI Shapefile' successful.
>
> Layer name: frankestein
> Geometry: Polygon
> Feature Count: 32
> Extent: (149532.733262, 4061858.514502) - (246384.733262, 4145546.514502) 
> Layer SRS WKT:
> (unknown)
> location: String (255.0)
> OGRFeature(frankestein):0
>   location (String) = frankestein_0_0.tif
>   POLYGON ((149532.733261565037537 
> 4145546.514501546975225,173932.733261565037537
> 4145546.514501546975225,173932.733261565037537
> 4121146.514501546975225,149532.733261565037537
> 4121146.514501546975225,149532.733261565037537
> 4145546.514501546975225))
>
>
> My map file (w/o the other layers):
>
> MAP
>         NAME DGIS
>         STATUS ON
>         SIZE 800 475
>         EXTENT -180 -90 180 90
>         UNITS METERS
>         SHAPEPATH "data"
>         IMAGETYPE PNG
>         OUTPUTFORMAT
>                 NAME png
>                 DRIVER "GD/PNG"
>                 MIMETYPE "image/png"
>                 IMAGEMODE RGB
>                 EXTENSION "png"
>         END
>         CONFIG "PROJ_LIB" "/srv/maps/proj"
>         WEB
>                 METADATA
>                         "wms_title" "Sistema de Información Geográfica de 
> Donana (DGIS)"
>                         "wms_onlineresource" 
> "http://localhost/cgi-bin/mapserv?map=DGIS.map&";
>                 END
>         END
>         PROJECTION
>                 "init=epsg:4326"
>         END
> [...] the layers.... [...]
> END
>
> And the WMS request I'm doing...
>
> http://192.168.1.16:6969/cgi-bin/mapserv?LAYERS=frankestein&MAP=/srv/maps/DGIS.map&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A4326&BBOX=-6.6796875,36.9140625,-6.50390625,37.08984375&WIDTH=256&HEIGHT=256
>
> The DEBUG ON at the layer level logs in the error.log of apache2:
>
> [Tue Feb 12 15:01:40 2008].994602 msDrawRasterLayerLow(frankestein): 
> entering. [Tue Feb 12 15:01:40 2008].994816 msDrawMap(): Layer 5 
> (frankestein), 0.000s [Tue Feb 12 15:01:41 2008].543673 
> msDrawRasterLayerLow(frankestein): entering. [Tue Feb 12 15:01:41 
> 2008].543878 msDrawMap(): Layer 5 (frankestein), 0.000s
>
>
> Could anyone point me to solve my problem?
>
> Thanks in advance.
>
> On Feb 12, 2008 2:17 PM, Frank Warmerdam <[EMAIL PROTECTED]> wrote:
> > Christian López Espínola wrote:
> > > Hi all,
> > >
> > > I have created a shape with gdaltindex, and added it to my map, as
> > > follows:
> > >
> > >         LAYER
> > >                 NAME "frankestein"
> > >                 STATUS ON
> > >                 TILEINDEX "frankestein16/frankestein.shp"
> > >                 TILEITEM "Location"
> > >                 TYPE RASTER
> > >         END
> > >
> > > But when I do a WMS request, it returns white tiles.
> > > The *bizarre* problem is that in other server I have the same
> > > mapfile, with the same geotiffs/shapefile, and it works. Maybe did I
> > > forgot to install any piece of software?
> >
> > Christian,
> >
> > You might want to try turning on layer level debugging and checking
> > the output.
> >
> > But likely you used absolute paths when building your tileindex and
> > those absolute paths don't exist on the problem server.  You can check
> > the attributes in the tileindex using "ogrinfo -al" on it.
> >
> > Best regards,
> > --
> > ---------------------------------------+------------------------------
> > ---------------------------------------+--------
> > I set the clouds in motion - turn up   | Frank Warmerdam, [EMAIL PROTECTED]
> > light and sound - activate the windows | http://pobox.com/~warmerdam
> > and watch the world go round - Rush    | President OSGeo, http://osgeo.org
> >
> >
>
> --
> Regards,
>
> Christian López Espínola
>



-- 
Regards,

Christian López Espínola

Reply via email to