Raster layer problem (JPG/JPW)
Frederik Ramm
frederik at REMOTE.ORG
Thu Apr 12 09:35:34 PDT 2007
Hi,
I asked this question on the mapserver-de list but had no replies,
so I 'm escalating to the next level ;-)
I'm sure it must be something simple I am overlooking but I cannot
find it. I am trying to have mapserver create a raster layer from
JPG/JPW files, and export that as WMS.
As found in the readme documents, I created an index file:
gdaltindex test.shp *.jpg
Looking at the resulting test.shp, everything looks ok, I see a lot of
nice little rectangles.
My JPW files are in Gauss-Krueger coordinates and I want the WMS
server to speak EPSG:4226, so I built the map file as follows:
NAME DEMO
WEB
METADATA
"wms_title" "WMS Demo Server"
"wms_onlineresource" "http://localhost/mapserver/mapserv?map=demo.map&"
"wms_srs" "EPSG:4326"
END
END
PROJECTION
"init=epsg:31468"
END
LAYER
PROJECTION
"init=epsg:31468"
END
METADATA
"wms_title" "WMS Demo Server"
"wms_onlineresource" "http://localhost/mapserver/mapserv?map=demo.map&"
"wms_srs" "EPSG:4326"
END
NAME "DEMO"
TILEINDEX "test.shp"
TILEITEM "location"
TYPE RASTER
STATUS ON
END
Now if I do a "GetCapabilities" call to the WMS server, I get this
(among other stuff):
<Layer>
<Name>DEMO</Name>
<Title>WMS Demo Server</Title>
<SRS>EPSG:4326</SRS>
<LatLonBoundingBox minx="-25.412" miny="-7.1722e-06" maxx="-25.412" maxy="-7.1722e-06" />
<BoundingBox SRS="EPSG:31468"
minx="-1" miny="-1" maxx="-1" maxy="-1" />
<Layer queryable="0" opaque="0" cascaded="0">
<Name>DEMO</Name>
<Title>WMS Demo Server</Title>
<SRS>EPSG:4326</SRS>
</Layer>
</Layer>
For some reason it decides that my original data are all at "-1,-1"
in GK projection, and thranslates that to the funny lat/lon values you
see. If I change EPSG:31468 to something else, then the -1,-1 stays
the same but the lat/lon values change.
There seems to be a problem with my tile index file; I ran strace on
the apache process and found that after reading the map file,
mapserver doesn't even *try* to read my test.shp:
open("demo.map", O_RDONLY) = 3
[...]
open("/usr/share/proj/proj_def.dat", O_RDONLY) = 4
read(4, "# Projection library defaults fi"..., 4096) = 261
[...]
open("/usr/share/proj/epsg", O_RDONLY) = 4
[...]
open("/usr/lib/gdalplugins", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = -1 ENOENT (No such file or directory)
[...]
write(1, "Content-type: application/vnd.og"..., 4096) = 4096
So it can't even be a problem with the location or format of the
test.shp as otherwise I would have to see at least an attempt to open
the file. Is my layer specification wrong? There are no warnings when
I run the GetCapabilities...
What's this line about the GDAL plugins, anything missing there?
Mapserver ist compiled with DEBUG=MSDEBUG but a "DEBUG ON" in the map
file doesn't increase verbosity. I have a Debian system with gdal-bin
and libgdal1 installed.
Does anybody have a clue what's wrong here?
Bye
Frederik
--
Frederik Ramm ## eMail frederik at remote.org ## N49°00.09' E008°23.33'
More information about the MapServer-users
mailing list