[mapserver-users] MapServer + Tilecache

Roger André randre at gmail.com
Thu Nov 5 10:22:47 PST 2009


Hi Tyler,

I wonder if the "projection" line in your tilecache.cfg might be causing
problems?  From what you show below, it looks like your "vias" data is in
EPSG:4326 natively, and that you then force MapServer to reproject it to a
custom mercator - which you say works fine.

I think the "projection" and "srs" lines are conflicting with each other in
your tilecache.cfg.
In my setup, I have my data's native projection defined in the mapfile like
you do, as 'PROJECTION "init=epsg:4326" END'.  But in my tilecache.cfg, I
only specify what output projection I want, in this case EPSG:900913.

[v2_20m_global]
type=MapServerLayer
mapfile=/var/www/mapfiles/v2_20m_global/v2_20m_global.map
metaTile=true
metaSize=2,2
metaBuffer=0,500
layers=imagery
spherical_mercator=true
srs=EPSG:900913

My suggestion would be to remove the "projection line entirely and see if
you get tiles generated in EPSG:4326 correctly.  If that works, try
specifying a different EPSG code.  If you get reprojected tiles that way,
you can try fiddling with the "projection" parameter in the tilecache.cfg,
or add a new projection line to your /share/proj/epsg file with your custom
parameters and point to its code in the tilecache.cfg "srs" line.

Best of luck,

Roger
--


On Wed, Nov 4, 2009 at 10:52 AM, Tyler Durden <tylersticky at gmail.com> wrote:

> Hi all,
> I'm new to MapServer, until now I've used Mapnik to generate my tiles.
> But I want to try MapServer and I can't figure out what I'm doing
> wrong.
> If I run via WEB interface it renders fine, but with Tilecache the
> tiles appears blank.
> Any idea what I'm doing wrong?
>
> Thanks in advance.
>
> MAP
>  NAME "test"
>  EXTENT         -961006 5034756 -955378 5036634
>
>  IMAGECOLOR 255 255 0
>  IMAGETYPE JPEG
>  SIZE 256 256
>  STATUS ON
>  UNITS METERS
>  MAXSIZE 5000
>
>  SHAPEPATH      "/home/tyler/Projects/Python/mapserver/tilecache/vias/"
>
>  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"
>        "nadgrids=@null"
>        "wktext"
>        "no_defs"
>  END
>
>  LAYER
>        NAME vias
>        TYPE LINE
>        DATA vias
>        STATUS default
>        OFFSITE 0 0 0
>        PROJECTION
>          "init=epsg:4326"
>        END
>        CLASS
>          NAME "Countries"
>          OUTLINECOLOR 0 0 0
>        END
>    TRANSFORM true
> END
>
> tilecache.cfg:
>
> [cache]
> type=Disk
> base=/home/tyler/Projects/Python/mapserver/tilecache/cache
>
> [base]
> type=MapServerLayer
> layers=vias
> mapfile=/home/tyelr/Projects/Python/mapserver/tilecache/vias.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 +nadgrids=@null +no_defs +over
> bbox=-20037508,-20037508,20037508,20037508
> maxResolution=2000
> srs=EPSG:4326
> levels=12
> extension=jpeg
> size=256,256
> metaTile=yes
> metaBuffer=512
> metaSize=5,5
> debug=on
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20091105/9b719c40/attachment.htm>


More information about the MapServer-users mailing list