Re: [mapserver-users] MODE=legendicon GROUP Layers

2012-09-08 Thread Andrew Cowie

Certainly our mapfiles stay fairly static once we've set them up. Thanks for 
the suggestion, will have a look at trying it out.

Cheers

Andrew

From: Basques, Bob (CI-StPaul) 
bob.basq...@ci.stpaul.mn.usmailto:bob.basq...@ci.stpaul.mn.us
Date: Friday, 7 September 2012 17:06
To: Andrew Cowie 
cow...@landcareresearch.co.nzmailto:cow...@landcareresearch.co.nz, 
mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org 
mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org
Subject: RE: MODE=legendicon  GROUP Layers

All,

I’ve gotten around this in the past by using dummy layers specifically for 
Legend Creation.  You have complete control over the legend this way and can 
mix and match data sources however is required without needing to actually map 
the data out.  It is more work overall, but if your MapFiles don’t change 
often, it’s usually a one time setup thing.

I have a few map layers that have 7 or 8 different thresholds for display set 
MIN/MAXSCALEDENOMs and they all get a dummy layer that displays the same thing 
for all thresholds.

Bobb



From: 
mapserver-users-boun...@lists.osgeo.orgmailto:mapserver-users-boun...@lists.osgeo.org
 [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Andrew Cowie
Sent: Friday, September 07, 2012 10:46 AM
To: mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org
Subject: [mapserver-users] MODE=legendicon  GROUP Layers

Hello list

Wondering if anyone can help…

We have been utilising the legendicon mode to create a custom legend in our 
application, however some recent work to try and speed up our WMS has reworked 
our mapfiles slightly, making use of GROUP LAYERs to group almost identical 
LAYERs together, the only difference in the LAYERs being MAX  MINSCALEDENOM 
and the DATA request string to our PostGIS database – hitting a generalised 
version of the geometry at smaller scales.

LAYER
NAME 'lri_luc_main_gen_500k'
GROUP 'lri_luc_main'
DATA 'the_geom_gen_500k FROM data.lri USING UNIQUE gid 
USING srid=2193'
INCLUDE 'includes/lri_luc_main_layer.inc'
MINSCALEDENOM 251001
END
LAYER
NAME 'lri_luc_main_full'
GROUP 'lri_luc_main'
DATA 'the_geom FROM data.lri USING UNIQUE gid USING 
srid=2193'
INCLUDE 'includes/lri_luc_main_layer.inc'
MAXSCALEDENOM 251000
MINSCALEDENOM 15000
END

The request for the legend icon is of the form:

http://servername/cgi-bin/mapserv.fcgi?FORMAT=image/gifMAP=lri.mapMODE=legendiconICON=lri_luc_main,1http://%3cservername%3e/cgi-bin/mapserv.fcgi?FORMAT=image/gifMAP=lri.mapMODE=legendiconICON=lri_luc_main,1

This worked fine before we started using GROUPs, however now we now encounter 
the error:

mapserv(): Web application error. Icon layer=lri_luc_main not found in map file.

Does the legendicon mode work with GROUP layers?
If not, is there a way round this?

Or alternatively, perhaps there is a better way to request a generalised 
version of the geometry that doesn't involve GROUP LAYERs?

Any help or suggestions much appreciated.

Many thanks

Andrew


Please consider the environment before printing this email
Warning: This electronic message together with any attachments is confidential. 
If you receive it in error: (i) you must not read, use, disclose, copy or 
retain it; (ii) please contact the sender immediately by reply email and then 
delete the emails.
The views expressed in this email may not be those of Landcare Research New 
Zealand Limited. http://www.landcareresearch.co.nz


Please consider the environment before printing this email
Warning: This electronic message together with any attachments is confidential. 
If you receive it in error: (i) you must not read, use, disclose, copy or 
retain it; (ii) please contact the sender immediately by reply email and then 
delete the emails.
The views expressed in this email may not be those of Landcare Research New 
Zealand Limited. http://www.landcareresearch.co.nz
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] MODE=legendicon GROUP Layers

2012-09-08 Thread Andrew Cowie
Thanks for the info Steve, that makes sense - when Groups are used to link
related layers things get too ambiguous. We'll look at our options with
this one.

Cheers

Andrew



On 07/09/2012 17:22, Lime, Steve D (DNR) steve.l...@state.mn.us wrote:

Legend icon only works with layers. Groups are just too ambiguous to
uniquely identify the class to be rendered. Groups don't have to be
organized by scale ranges. Often they link related layers, for example  a
bunch of road feature types. I think It would be possible to add support
to see if a group name can resolve to a single layer based on scale but
that doesn't exist in the code at this point.

Steve

From: mapserver-users-boun...@lists.osgeo.org
[mapserver-users-boun...@lists.osgeo.org] on behalf of Andrew Cowie
[cow...@landcareresearch.co.nz]
Sent: Friday, September 07, 2012 10:46 AM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] MODE=legendicon  GROUP Layers

Hello list

Wondering if anyone can helpŠ

We have been utilising the legendicon mode to create a custom legend in
our application, however some recent work to try and speed up our WMS has
reworked our mapfiles slightly, making use of GROUP LAYERs to group
almost identical LAYERs together, the only difference in the LAYERs being
MAX  MINSCALEDENOM and the DATA request string to our PostGIS database ­
hitting a generalised version of the geometry at smaller scales.

LAYER
NAME 'lri_luc_main_gen_500k'
GROUP 'lri_luc_main'
DATA 'the_geom_gen_500k FROM data.lri USING UNIQUE
gid USING srid=2193'
INCLUDE 'includes/lri_luc_main_layer.inc'
MINSCALEDENOM 251001
END
LAYER
NAME 'lri_luc_main_full'
GROUP 'lri_luc_main'
DATA 'the_geom FROM data.lri USING UNIQUE gid USING
srid=2193'
INCLUDE 'includes/lri_luc_main_layer.inc'
MAXSCALEDENOM 251000
MINSCALEDENOM 15000
END

The request for the legend icon is of the form:

http://servername/cgi-bin/mapserv.fcgi?FORMAT=image/gifMAP=lri.mapMODE
=legendiconICON=lri_luc_main,1

This worked fine before we started using GROUPs, however now we now
encounter the error:

mapserv(): Web application error. Icon layer=lri_luc_main not found in
map file.

Does the legendicon mode work with GROUP layers?
If not, is there a way round this?

Or alternatively, perhaps there is a better way to request a generalised
version of the geometry that doesn't involve GROUP LAYERs?

Any help or suggestions much appreciated.

Many thanks

Andrew


Please consider the environment before printing this email
Warning: This electronic message together with any attachments is
confidential. If you receive it in error: (i) you must not read, use,
disclose, copy or retain it; (ii) please contact the sender immediately
by reply email and then delete the emails.
The views expressed in this email may not be those of Landcare Research
New Zealand Limited. http://www.landcareresearch.co.nz



Please consider the environment before printing this email
Warning:  This electronic message together with any attachments is 
confidential. If you receive it in error: (i) you must not read, use, disclose, 
copy or retain it; (ii) please contact the sender immediately by reply email 
and then delete the emails.
The views expressed in this email may not be those of Landcare Research New 
Zealand Limited. http://www.landcareresearch.co.nz
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] MODE=legendicon GROUP Layers

2012-09-07 Thread Andrew Cowie
Hello list

Wondering if anyone can help…

We have been utilising the legendicon mode to create a custom legend in our 
application, however some recent work to try and speed up our WMS has reworked 
our mapfiles slightly, making use of GROUP LAYERs to group almost identical 
LAYERs together, the only difference in the LAYERs being MAX  MINSCALEDENOM 
and the DATA request string to our PostGIS database – hitting a generalised 
version of the geometry at smaller scales.

LAYER
NAME 'lri_luc_main_gen_500k'
GROUP 'lri_luc_main'
DATA 'the_geom_gen_500k FROM data.lri USING UNIQUE gid 
USING srid=2193'
INCLUDE 'includes/lri_luc_main_layer.inc'
MINSCALEDENOM 251001
END
LAYER
NAME 'lri_luc_main_full'
GROUP 'lri_luc_main'
DATA 'the_geom FROM data.lri USING UNIQUE gid USING 
srid=2193'
INCLUDE 'includes/lri_luc_main_layer.inc'
MAXSCALEDENOM 251000
MINSCALEDENOM 15000
END

The request for the legend icon is of the form:

http://servername/cgi-bin/mapserv.fcgi?FORMAT=image/gifMAP=lri.mapMODE=legendiconICON=lri_luc_main,1

This worked fine before we started using GROUPs, however now we now encounter 
the error:

mapserv(): Web application error. Icon layer=lri_luc_main not found in map file.

Does the legendicon mode work with GROUP layers?
If not, is there a way round this?

Or alternatively, perhaps there is a better way to request a generalised 
version of the geometry that doesn't involve GROUP LAYERs?

Any help or suggestions much appreciated.

Many thanks

Andrew


Please consider the environment before printing this email
Warning: This electronic message together with any attachments is confidential. 
If you receive it in error: (i) you must not read, use, disclose, copy or 
retain it; (ii) please contact the sender immediately by reply email and then 
delete the emails.
The views expressed in this email may not be those of Landcare Research New 
Zealand Limited. http://www.landcareresearch.co.nz
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] MapCache - A way to reduce BerkeleyDB Cache size ?

2012-05-30 Thread Andrew Cowie
Hi Thomas

So size looks really good. Recreated one of our caches which has minimal 'blank 
tiles', and av. tile size is reasonably heavy ~ 24K

File Based: 65G
Previous BDB (empty-tiles branch)   142G
BDB (empty-tiles branch) with PAGESIZE 1*1024   62G

However I have run into an issue with apache. Getting seg fault messages in 
apache error log, e.g.
[notice] child pid  exit signal Segmentation fault (11)

Which requires restart of apache to make things work again. Was trying to work 
out the steps required to reproduce, restarting apache each time and I ran into 
a different error, I think the one you have mentioned before, relating to 
multiple restarts of apache

unable to allocate memory for mutex; resize mutex region
[Thu May 31 17:13:32 2012] [error] [client IP] failed to aquire connection to 
bdb backend: bdb cache failure 1 for db-open: Cannot allocate memory, referer: 
http:/server/bdb_test.html

Running a db_recover on it fixes this, as you mentioned.

I need to head home now, but happy to debug tomorrow, if you run me through the 
steps.

Cheers

Andrew



-Original Message-
From: thomas bonfort [mailto:thomas.bonf...@gmail.com]
Sent: Tuesday, 29 May 2012 11:07 p.m.
To: Ludovic Gnemmi; Andrew Cowie
Cc: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] MapCache - A way to reduce BerkeleyDB Cache size 
?

Salut Ludovic, hi Andrew,

I've investigated a bit more on the disk space issue with berkeley db backends, 
and here are some of my findings. To summarize, the space occupancy/efficiency  
is closely tied to the size of the images stored in the cache, and the 
configured pagesize of the bdb backend.

For a cache that contains many empty tiles, i.e. that are just a few hundred to 
a couple thousand bytes, here are the space occupancies (the disk cache uses 4k 
blocks). This is for reference only, usual caches will not resemble this one. 
Also note that the disk cache was not configured to symlink blank tiles, and 
that the bdb cache backend has some code in it to reduce the tile data stored 
on empty tiles.

disk: 197M
bdb pagesize=64k: 106M
bdb pagesize=4k: 96M
bdb pagesize=1k: 73M
sqlite: 103M
mbtiles (sqlite with blank tile detection): 62M

So these numbers actually aren't so bad for bdb in all configurations, but in 
this case the 4k filesytem blocksize is really inefficient.

These are the occupancies for another tileset, where the tiles are much heavier 
(tiles around 40-45k). There are also quite a few empty tiles.

disk:153M
bdb pagesize=64k: 209M
bdb pagesize=4k: 148M
bdb pagesize=1k: 144M
sqlite: 140M
mbtiles (sqlite with blank tile detection): 137M


I had initally stayed away from using small pagesizes in the bdb backend 
because of some stability issues, but in the current tests I have not run into 
any issues. From these tests, I think the natural way forward is to change the 
default pagesize, and maybe make it configurable in mapcache.xml as an advanced 
configuration option.
If you are able to confirm my findings on your instances, that would be great. 
To set the pagesize you'll have to recompile/reinstall, after having changed 
lib/cache_bdb.c by replacing

#define PAGESIZE 64*1024
by
#define PAGESIZE 1*1024

near line 50.

regards,
thomas



On Wed, May 23, 2012 at 3:55 PM, Ludovic Gnemmi lgne...@rgd73-74.fr wrote:
 Hi list,
 I would like to experiment Berkeley DB cache type but i'm surprised of
 the resulting db size compared to sqlite cache type. Here is my
 results for about 13000 tiles:

 Total tiles size  = 44 Mb
 Sqlite = 48 Mb
 Berkeley DB = 61 Mb
 Disk = 66 Mb (with 4kb filesystem block size)

 I thought i could reduce storage capacity with Berkeley DB cache type
 as with Sqlite but it seems there is not much difference with disk cache type.
 Is there a way to reduce Berkeley DB cache size ?

 Thanks for your help

 Ludovic

 --
 View this message in context:
 http://osgeo-org.1560.n6.nabble.com/MapCache-A-way-to-reduce-BerkeleyD
 B-Cache-size-tp4976403.html Sent from the Mapserver - User mailing
 list archive at Nabble.com.
 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users

Please consider the environment before printing this email
Warning:  This electronic message together with any attachments is 
confidential. If you receive it in error: (i) you must not read, use, disclose, 
copy or retain it; (ii) please contact the sender immediately by reply email 
and then delete the emails.
The views expressed in this email may not be those of Landcare Research New 
Zealand Limited. http://www.landcareresearch.co.nz
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


RE: [mapserver-users] Mapcache Seed / libpng error?

2012-02-16 Thread Andrew Cowie
Ticket created:

http://trac.osgeo.org/mapserver/ticket/4192


-Original Message-
From: thomas bonfort [mailto:thomas.bonf...@gmail.com]
Sent: Wednesday, 15 February 2012 10:43 p.m.
To: Andrew Cowie
Cc: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] Mapcache Seed / libpng error?

Is the error always reproducible ?
From the logs it seems that the png data received by mapcache from the
wms server is corrupt. More investigation would be needed to determine
if the network or the wms server is at fault for this.

regards,

--
thomas

On Wed, Feb 15, 2012 at 04:45, Andrew Cowie
cow...@landcareresearch.co.nz wrote:
 Hello List,



 We’ve been using mapcache_seed ( mapcache SVN checkout 13002 ) to build our
 caches mostly successfully so far, but recently have come up against an
 error which has only cropped up with a certain layer which includes our text
  labels



 www-data@server$ ./mapcache_seed -c /opt/mapserver/mapcache/oe_mapcache.xml
 -t 2012-02-02_text_cache_nztm  -g portalgridnztm1 -z 7,8

 found old lockfile /tmp/_gc_lock9-175-1233-slope_cache_nztm.lck, deleting it

 found old lockfile /tmp/_gc_lock7-7-9-2012-02-02_text_cache_nztm.lck,
 deleting it

 found old lockfile /tmp/_gc_lock9-136-179-terr_auth_cache_nztm.lck, deleting
 it

 found old lockfile /tmp/_gc_lock9-138-86-wards_cache_nztm.lck, deleting it

 seeding tile 65 25 7libpng error: IDAT: CRC error

 failed to setjmp(png_jmpbuf(png_ptr))

 failed to load image data from metatile

 failed to setjmp(png_jmpbuf(png_ptr))

 failed to load image data from metatile

 seeding tile 130 50 8

 www-data@server$



 or...



 www-data@server$ ./mapcache_seed -c /opt/mapserver/mapcache/oe_mapcache.xml
 -t 2012-02-02_text_cache_nztm  -g portalgridnztm1 -z 6,7

 found old lockfile /tmp/_gc_lock9-137-51-terr_auth_cache_nztm.lck, deleting
 it

 found old lockfile /tmp/_gc_lock9-182-1201-slope_cache_nztm.lck, deleting it

 found old lockfile /tmp/_gc_lock9-138-197-wards_cache_nztm.lck, deleting it

 seeding tile 25 15 6libpng warning: Ignoring bad adaptive filter type

 libpng warning: Ignoring bad adaptive filter type

 libpng warning: Ignoring bad adaptive filter type

 libpng warning: Ignoring bad adaptive filter type

 libpng warning: Ignoring bad adaptive filter type

 libpng warning: Ignoring bad adaptive filter type

 libpng warning: Ignoring bad adaptive filter type

 libpng warning: Ignoring bad adaptive filter type

 libpng warning: Ignoring bad adaptive filter type

 libpng warning: Ignoring bad adaptive filter type

 libpng warning: Ignoring bad adaptive filter type

 libpng warning: Ignoring bad adaptive filter type

 libpng warning: Ignoring bad adaptive filter type

 libpng warning: Ignoring bad adaptive filter type

 libpng warning: Ignoring bad adaptive filter type

 libpng warning: Ignoring bad adaptive filter type

 libpng warning: Ignoring bad adaptive filter type

 libpng warning: Ignoring bad adaptive filter type

 libpng warning: Ignoring bad adaptive filter type

 libpng warning: Ignoring bad adaptive filter type

 libpng warning: Ignoring bad adaptive filter type

 libpng warning: Ignoring bad adaptive filter type

 libpng warning: Ignoring bad adaptive filter type

 libpng warning: Ignoring bad adaptive filter type

 libpng warning: Ignoring bad adaptive filter type

 libpng error: IDAT: CRC error

 failed to setjmp(png_jmpbuf(png_ptr))

 failed to load image data from metatile

 seeding tile 50 35 7failed to setjmp(png_jmpbuf(png_ptr))

 failed to load image data from metatile

 www-data@server$





 The next step will be to checkout the latest SVN version. But we are
 currently mid-build with some other layers, so are waiting for them to
 finish before we do that. But thought  we’d fire it out to the list to see
 if anyone has any ideas as to what might be causing this?





 Below is the mapcache config:



source name=src_text_update type=wms

   http

  urlhttp://server/cgi-bin/mapserv601?/url

   /http

   getmap

  params

 FORMATimage/png/FORMAT

 LAYERStext/LAYERS

 MAP/opt/mapserver/mapfiles/m6scenz_topo_new.map/MAP

 TRANSPARENTtrue/TRANSPARENT

  /params

   /getmap

/source



tileset name=2012-02-02_text_cache_nztm

   sourcesrc_text_update/source

   cachedisk/cache

   formatPNG/format

   gridportalgridnztm1/grid

   metatile5 5/metatile

   metabuffer10/metabuffer

/tileset





 labelcache_map_edge_buffer-10is set in mapserver
 WEB METADATA





 Cheers





 Andrew










 
 Please consider the environment before printing this email
 Warning: This electronic message together with any attachments is
 confidential. If you receive it in error: (i) you must not read, use,
 disclose, copy or retain it; (ii) please contact the sender immediately by
 reply email and then delete the emails.
 The views expressed

[mapserver-users] Cascading Mapserver - WMS client - GetLegendGraphic ?

2011-05-19 Thread Andrew Cowie
Hello list,

We have a cascading WMS using Mapserver as a client to request maps from 
another Mapserver. We have it working well, however we are wondering whether it 
is possible to do a GetLegendGraphic request to this top level Mapserver and 
have it in turn pass on that request to the underlying mapserver, which would 
then return the legend graphic.

Here's a snippet of our 'top level' Mapserver mapfile, which sits on our public 
server:
...
   LEGEND
  STATUS OFF
  KEYSIZE 30 15
  KEYSPACING 10 10
  LABEL
 COLOR 0 0 0
 FONT 'arialbd'
 TYPE truetype
 SIZE 10
  END
   END
   LAYER
  NAME 'coastpoly'
  TYPE RASTER
  CONNECTIONTYPE WMS
  CONNECTION http://ourprivateserver/wms?;
  PROCESSING CLOSE_CONNECTION=DEFER

  METADATA
 wms_name  coastpoly
 wms_title Topographic Coastline 
Polygons
 wms_server_version1.1.1
 wms_formatimage/png
 wms_srs   EPSG:2193 EPSG:27200 
EPSG:4326
  END
   END
...

And a snippet from our underlying Mapserver:
...
   LEGEND
  STATUS OFF
  KEYSIZE 30 15
  KEYSPACING 10 10
  LABEL
 COLOR 0 0 0
 FONT 'arialbd'
 TYPE truetype
 SIZE 10
  END
   END
   LAYER
  NAME 'coastpoly'
  TYPE POLYGON
  STATUS OFF
  CONNECTIONTYPE postgis
  CONNECTION dbname='ourdb' host='ourprivateserver' port=5432 
user='user' password=pass
  PROCESSING CLOSE_CONNECTION=DEFER
  DATA 'the_geom FROM data.coastlinepoly USING UNIQUE gid USING 
srid=2193'
  PROJECTION
 proj=tmerc lat_0=0 lon_0=173 k=0.9996 
x_0=160 y_0=1000 ellps=GRS80 towgs84=0,0,0,0,0,0,0 units=m
  END
  EXTENT 983515.7211 4728776.8709 2117458.3527 6223676.2306
  METADATA
 wms_name  coastpoly
 wms_title Topographic Coastline 
Polygons
 wms_version   1.1.1
 wms_formatimage/png
 wms_srs   EPSG:2193 EPSG:27200 
EPSG:4326
 wms_abstract  Abstract
  END
  CLASS
 NAME 'Coast Polygon'
 STYLE
COLOR 225 223 197
 END
  END
   END
...

I think we may be missing something obvious here, so any ideas greatly 
appreciated... :)

Andrew



Please consider the environment before printing this email
Warning: This electronic message together with any attachments is confidential. 
If you receive it in error: (i) you must not read, use, disclose, copy or 
retain it; (ii) please contact the sender immediately by reply email and then 
delete the emails.
The views expressed in this email may not be those of Landcare Research New 
Zealand Limited. http://www.landcareresearch.co.nz
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


RE: [mapserver-users] Mapserver as a WMS Client - problems working with a 'remote' Tilecache service

2011-05-10 Thread Andrew Cowie
Hi Jukka,

Many thanks for the suggestion however we've decided to take another route - 
which basically entails publishing a OGC standards compliant Mapserver WMS 
alongside a WMTS enabled Tilecache service.

Cheers

Andrew

-Original Message-
From: Rahkonen Jukka [mailto:jukka.rahko...@mmmtike.fi]
Sent: Friday, 6 May 2011 4:10 p.m.
To: Andrew Cowie; mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] Mapserver as a WMS Client - problems working 
with a 'remote' Tilecache service

Hi,

I have never tried myself but I would guess that you need to prepare a xml file 
for defining a gdal-wms datasource and refer to that xml file in your mapfile. 
Read http://gdal.org/frmt_wms.html

-Jukka Rahkonen-

Andrew Cowie wrote:


 Hello List,

 We are currently setting up a cascading WMS using Mapserver as a client to 
 request maps from another Mapserver and from a Tilecache. We have read that 
 Mapserver can be configured to do this but we are running into problems when 
 using Mapserver as a client to Tlecache. Specifically, how do we publish 
 metadata in the MapSever Client capabilities document about the correct 
 resolutions / bounding box of a Tilecache service.

 More details...

 Here's a snippet of our 'top level' Mapserver mapfile, which will sit on our 
 public server:


   LAYER
  NAME 'lcr_basemap_cache_wgs84'
  TYPE RASTER
  CONNECTIONTYPE WMS
  CONNECTION http://ourserver/tilecache/wms-c/tilecache.py?;
  PROCESSING CLOSE_CONNECTION=DEFER

  METADATA
 wms_name  lcr_basemap_cache_wgs84
 wms_title Baselayer - Cached
 wms_server_version1.1.1
 wms_formatimage/png
 wms_srs   EPSG:4326
 wms_extent165 -48 179.5 -33
 wms_abstract  Cached via Tilcache
  END
   END

This pulls a layer from our Tilecache (a snippet from our tilecache config 
file):

[lcr_basemap_cache_wgs84]
type=WMSLayer
layers=coastpoly,veg,urban_grp,contours,water,coast_feats,height_pnts,tracks,rail,all_roads,railway_station,text
srs=EPSG:4326
bbox=165,-48,179.5,-33
resolutions=0.025398253504337,0.012699126752168,0.006349563376084,0.003174781688042,0.001587390844021,0.000793695422011,0.000317478168804,0.000158739084402,0.79369542201,0.31747816880,0.15873908440,0.06349563376,0.03174781688
url=http://ourserver/cgi-bin/mapserv?map=/path/to/ourmapfile.maptransparent=true;
extent_type=loose
metaBuffer=10
metasize=6,6
metaTile=true

(As you can see, Tilecache is pointing to another Mapserver which generates the 
maps.)

We have had some success in connecting to the Tilecache via the Mapserver 
Client using an Openlayers client to view the 'top level' WMS layers ** BUT ** 
this only works because we configured Openlayers to use the correct resolutions 
/ bounding box etc. What we are really trying to achieve with this is a public 
WMS for which other people/clients can use, e.g. Openlayers / QGIS, by just 
reading the Capabilities document provided by the MapServer client.

So far, we have yet to find a way to advertise (via the capabilities document) 
these underlying Tilecache resolutions as metadata in the cascading level 
Mapserver. Is this possible?

If it is not possible, does anybody have recommendations as to how to go about 
this in a standards compliant way?

Many thanks,

Andy



Please consider the environment before printing this email
Warning: This electronic message together with any attachments is confidential. 
If you receive it in error: (i) you must not read, use, disclose, copy or 
retain it; (ii) please contact the sender immediately by reply email and then 
delete the emails.
The views expressed in this email may not be those of Landcare Research New 
Zealand Limited. http://www.landcareresearch.co.nz


Please consider the environment before printing this email
Warning:  This electronic message together with any attachments is 
confidential. If you receive it in error: (i) you must not read, use, disclose, 
copy or retain it; (ii) please contact the sender immediately by reply email 
and then delete the emails.
The views expressed in this email may not be those of Landcare Research New 
Zealand Limited. http://www.landcareresearch.co.nz
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] OUTPUTFORMAT PDF rendering issue

2010-12-17 Thread Andrew Cowie
Hello Folks,

I was wondering whether someone may be able to help me. I'm currently trying
to set up a WMS to create a topographic base map of New Zealand using
Mapserver. So far, things are going ok, but have run into an issue when
trying to get things into a format for high quality hardcopy printing
(vector PDF).
The issue arises with 'spikey' rendering of polygons when using Mapserver to
output to PDF. When outputting as an image (PNG), the maps are drawn
correctly, but when choosing PDF, the output looks sort of generalised and
inaccurate. The data I'm testing with is a polygon version of the coastline
of NZ, at a 1:5 scale - stored in a PostGIS database.

I have played around with the mapfile settings of RESOLUTION in combination
with SIZE - when using the default RESOLUTION of 72, the output is spikey,
as described, but as I increase this number - the output gets progressively
better. When I increase this to a very large number (16000) (with a SIZE of
9600 9600) - the output I get looks to be closer to the original dataset,
devoid of spikes.

I may be missing something obvious, so apologies if I am, but is this the
correct way of getting a high quality output to PDF?
I have tried this with the latest version of Mapserver - 5.6.5 and also with
the latest SVN version built with support for using the CAIRO rendering
library.
Mapserver is built on Ubuntu 10.

Any help would be much appreciated.

Many thanks

Andy
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users