|
|
|
Tyler Durden
|
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 [hidden email] http://lists.osgeo.org/mailman/listinfo/mapserver-users |
||||||||||||||||
|
Roger André
|
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 <[hidden email]> wrote: Hi all, _______________________________________________ mapserver-users mailing list [hidden email] http://lists.osgeo.org/mailman/listinfo/mapserver-users |
|
Tyler Durden
|
Hi Roger,
Definitely the problem is in the MAP file. I've removed the projection parameter, still doesn't work. Some parameters that I've not yet understand, namely: MAXSIZE and SIZE. I don't understand what I'm doing wrong. In Mapnik I just define srs="+proj=latlong +datum=WGS84" and is done. On Thu, Nov 5, 2009 at 6:22 PM, Roger André <[hidden email]> wrote: > 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 <[hidden email]> 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 >> [hidden email] >> http://lists.osgeo.org/mailman/listinfo/mapserver-users > > mapserver-users mailing list [hidden email] http://lists.osgeo.org/mailman/listinfo/mapserver-users |
||||||||||||||||
|
Tyler Durden
|
Hi Roger, again,
Actually your last email solved the issue, many thanks! Still I don't understand why I must define MAXSIZE and SIZE. On Fri, Nov 6, 2009 at 10:07 AM, Tyler Durden <[hidden email]> wrote: > Hi Roger, > Definitely the problem is in the MAP file. > I've removed the projection parameter, still doesn't work. > Some parameters that I've not yet understand, namely: MAXSIZE and SIZE. > > I don't understand what I'm doing wrong. > In Mapnik I just define srs="+proj=latlong +datum=WGS84" and is done. > > On Thu, Nov 5, 2009 at 6:22 PM, Roger André <[hidden email]> wrote: >> 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 <[hidden email]> 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 >>> [hidden email] >>> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> >> > mapserver-users mailing list [hidden email] http://lists.osgeo.org/mailman/listinfo/mapserver-users |
||||||||||||||||
| Free Embeddable Forum Powered by Nabble | Help |