It's looking more like this is an OpenLayers problem in interacting with
the MapServer mapfile. I created a web template and ran it using just
MapServer, and my WMS layer of county boundaries finally came up in the
google projection! This works only if I put the raw Proj4 projection
parameters in the PROJECTION object group, as Pietro Giannini suggested:
PROJECTION
"+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0
+y_0=0 +k=1.0 +units=m +nadgri...@null +no_defs"
END
However, this doesn't work with my MapServer:
PROJECTION
"init=epsg:900913"
END
and throws the error:
"Projection library error. no options found in 'init' file "
I've put the google projection record in /usr/share/proj/epsg, but
MapServer doesn't seem to find it (although it has no trouble finding
other projections.) Is there some sort of indexing or registering I've
got to do on this file?
I'm still looking for suggestions on this, and any help would be greatly
appreciated.
- Bill Thoen
Bill Thoen wrote:
No, that didn't makemuch difference. That produces a pile of these
errors:
[Wed Mar 18 07:52:12 2009].814433 msProcessProjection(): Projection
library error. no options found in 'init' file
[Wed Mar 18 07:52:12 2009].814829 msSaveImageGDCtx(): General error
message. Unknown output image type driver: AGG/PNG.
[Wed Mar 18 07:52:12 2009].839008 msProcessProjection(): Projection
library error. no options found in 'init' file
[Wed Mar 18 07:52:12 2009].839383 msSaveImageGDCtx(): General error
message. Unknown output image type driver: AGG/PNG.
I imagine that the "unknown output" is a text error message, but I
don't know how to capture it to read it. There was nothing in the
normal /var/loghttpd/error_log.
This problem is driving me crazy. I've spent hours on it, and I still
can't get it to work. I've googled, RTFM'ed, tried all kinds of "Hail
Mary" code changes, and it still won't convert my WMS layers to fit on
the Google projection. I don't know what this 'init' file is that
MapServer is complaining about, but if it's /usr/share/proj/epsg, then
I have checked that one and the projection for google maps is there,
and AFAIK, all the parameters are correct.
So I've written two mini versions of the code and attached the source
to this message. Hopefully a fresh pair of eyes can spot the thing
that I can't. What this code in g.html / g.map is supposed to do is
just display a WMS of orange county boundaries as a layer on top of a
google layer, but all I get is pink as far as the eye can see (but the
google layer appears below the pink. The other one, g2.html / g2.map,
just displays the counties in a Lat/long projection, and that one
works (I included this one as a reality check to make sure there
wasn't something wrong with my county file. Except for the bits that
must be changed to accommodate the different projections the code is
as identical as I could make it. You can run them on my server too.
They are at http://206.168.217.244/gallery/g.html and
http://206.168.217.244/gallery/g2.html.
If anyone could give some help with this, I'd really appreciate it.
It's got to be something simple; I just can't see it.
TIA,
- Bill Thoen
Pietro Giannini wrote:
Put the epsg definition directly on .map file:
MAP
...
PROJECTION
"+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0
+x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgri...@null +no_defs"
END
...
END
bye
...................pg
Bill Thoen ha scritto:
I'm trying to get my WMS server to produce WMS layers for an
OpenLayers application I'm building that uses some Google map
layers. But I'm getting no results. DEBUG set to ON in my mapfile
produces the following errors (this is the last three lines of the
log file:
[Tue Mar 17 15:16:28 2009].567265 msProcessProjection(): Projection
library error. no options found in 'init' file
[Tue Mar 17 15:16:28 2009].578247 msProcessProjection(): Projection
library error. no options found in 'init' file
[Tue Mar 17 15:16:28 2009].603064 msProcessProjection(): Projection
library error. no options found in 'init' file
I did put the definition for the Google CRS in /usr/share/proj/defs as:
# Google's spherical mercator projection
<900913> +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0
+x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgri...@null +no_defs <>
So could someone here clue me in to what's wrong? What's the 'init'
file and what do I need to put in it? I'm on a Linux system with
mapserver set up like so:
MapServer version 5.0.3 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG
OUTPUT=WBMP OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE
SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER
SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=GEOS INPUT=EPPL7
INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE
Below is my mapfile if you want to see it.
TIA,
- Bill Thoen
---
MAP
CONFIG MS_ERRORFILE "/var/www/html/tmp/ms_errors.txt"
DEBUG ON
# EXTENT -102.39 36.81 -94.44 40.13
EXTENT -20037508.34 -20037508.34 20037508.34 20037508.34
IMAGECOLOR 255 255 255
SHAPEPATH /var/www/vfm/
FONTSET /var/www/maps/fonts/fonts.txt
SYMBOLSET /var/www/maps/symbols/symbols.txt
OUTPUTFORMAT
NAME 'AGG'
DRIVER "AGG/PNG"
MIMETYPE "image/png"
IMAGEMODE RGB
EXTENSION "png"
END
WEB
IMAGEPATH "/var/www/html/tmp/"
IMAGEURL "/tmp/"
METADATA
"wms_title" "VFM Data Layers"
"wms_onlineresource"
"http://xxx.xxx.xxx.xxx/cgi-bin/mapserv?map=/var/www/html/vfm/ms.map&"
"wms_srs" "EPSG:4326 EPSG:900913"
END
END
PROJECTION
"init=epsg:900913"
END
UNITS METERS
LAYER
NAME "states"
METADATA
"wms_title" "US State boundaries"
"wms_srs" "EPSG:32614 EPSG:4326 EPSG:900913"
END
TYPE POLYGON
STATUS ON
DATA ../maps/data/states
CLASS
NAME "US States"
STYLE
OUTLINECOLOR 0 0 0
WIDTH 2
END
END
PROJECTION
"init=epsg:32614"
END
END
LAYER
NAME "counties"
METADATA
"wms_title" "County Boundaries"
"wms_srs" "EPSG:4269 EPSG:4326 EPSG:900913"
END
TYPE POLYGON
STATUS ON
DATA ../maps/data/County_tiger_2007_region
CLASS
NAME "County Boundaries"
STYLE
OUTLINECOLOR 128 128 128
COLOR 255 255 192
WIDTH 1
END
END
PROJECTION
"init=epsg:4269"
END
END
END
_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users
------------------------------------------------------------------------
_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users
_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users