[mapserver-users] Reloading MapCache configuration file on changes?

2011-12-05 Thread John Taranu
Thomas,

 

Is there a better way force MapCache to reload its configuration script than
restarting apache?  I'm working on an application that will use two
load-balanced web servers running MapCache, all pointing to a single central
tile repository and a single central .xml configuration file.  The
configuration file will occasionally be edited, either with deletions or
additional tilesets.  Both web servers need to reload the updated
configuration .xml.  

 

Is it possible to set up MapCache to check if the config file was recently
updated and, if so, reload the config .xml?  It looks like this is currently
enabled under FastCGI, but not under Apache.

 

John

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


Re: [mapserver-users] Specify resolution (or pixel size) in WMS requests

2011-12-05 Thread thomas bonfort
cgi controls should do the trick?

http://../?SERVICE=WMS&&MAP.RESOLUTION=144&MAP.DEFRESOLUTION=96

--
thomas

On Mon, Dec 5, 2011 at 17:43, Peter Hopfgartner
 wrote:
> Basically, I am looking for a way to something analogous to DEFRESOLUTION in
> a WMS request. The standard says, that a pixel is 0.28 mm x 0.28 mm
> (25.4/0.28 ~= 90.71 DPI). I could not found a way to change this in the WMS
> 1.3.0 standard.
> Is there a MapServer vendor parameter, similar to the one in GeoServer,
> http://docs.geoserver.org/latest/en/user/services/wms/vendor.html#format-options
> ?
>
> Peter
>
> --
> Peter Hopfgartner R3 GIS http://www.r3-gis.com
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Specify resolution (or pixel size) in WMS requests

2011-12-05 Thread Peter Hopfgartner
Basically, I am looking for a way to something analogous to 
DEFRESOLUTION in a WMS request. The standard says, that a pixel is 0.28 
mm x 0.28 mm (25.4/0.28 ~= 90.71 DPI). I could not found a way to change 
this in the WMS 1.3.0 standard.
Is there a MapServer vendor parameter, similar to the one in GeoServer, 
http://docs.geoserver.org/latest/en/user/services/wms/vendor.html#format-options 
?


Peter

--
Peter Hopfgartner R3 GIS http://www.r3-gis.com
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Mapcache question.

2011-12-05 Thread forums
Ahh, ok that explains it.
Thanks for the information.

Jerl

On Mon, Dec 5, 2011 at 1:05 AM, thomas bonfort wrote:

> only the wms and wmts services support dimensions (there is no spec
> defining this support for the others).
>
> you can either adapt your gmaps/js code to build a wmts url, or hack
> into the mapcache code to add dimension support to the tms / gmaps
> service.
>
> --
> thomas
>
> On Sun, Dec 4, 2011 at 22:23, forums  wrote:
> > I almost have it, I just can't seem to get the targetdate dimension to
> > populate.
> >
> > /mapcache/gmaps/country@WGS84/1/1/0.png works fine if I don't have the
> > layers that require the targetdate parameter.  I get a "parameter pattern
> > failed validation" error returned from Mapserver when I have the
> necessary
> > layers defined in the mapcache config file.
> >
> > The obvious thing for me to try was:
> > /mapcache/gmaps/country@WGS84/1/1/0.png?targetdate=201112042105
> >
> > But that failed.  Is there a way to get the targetdate to fill in? I've
> > moved it around a bit, but still can't get it to fill in.
> >
> > Thanks again!!
> >
> > Jerl
> >
> >
> > On Sun, Dec 4, 2011 at 2:59 PM, forums  wrote:
> >>
> >> Thanks Stephen and Thomas.
> >>
> >> I think I'll be good with the dimension and the disk cache.
> >>  Unfortunately, the apache we have doesn't have memcache built into it
> (too
> >> much hassle to upgrade it right now) and the version of SQLite is too
> >> old...also a hassle to upgrade.
> >>
> >> I was able to get it to load the proper map when just using the entire
> >> bounding box, the whole world.  Now to make it work with the the
> tilemode
> >> for google...which looks like that should be straight forward??
> >>
> >>
> >> Thanks guys!!
> >>
> >> Jerl
> >>
> >>
> >> On Sun, Dec 4, 2011 at 2:00 PM, thomas bonfort <
> thomas.bonf...@gmail.com>
> >> wrote:
> >>>
> >>> Jerl,
> >>> mapcache itself does not do any pruning of the caches it has created,
> >>> but you can get the same effect by using a cache backend that supports
> >>> expiration (i.e. memcache).
> >>> Mapcache can fit your need, provided:
> >>> - you configure your tileset with a "targetdate" - you use
> >>> a memcache backend to store the created tiles, and set an 
> >>> value in mapcache to 5 hours
> >>> If the memory requirement for storing 5 hours worth of tiles is too
> >>> important for a memcache server instance, you can have a look at
> >>> membase which will also store less frequently used data to disk. The
> >>> membase protocol is compatible with memcache, so you can use either
> >>> memcache or membase with the same mapcache configuration.
> >>>
> >>> Of course, by running a script every hour to delete expired tiles as
> >>> you are doing now, you can then use the classic disk based cache
> >>> backend.
> >>> regards,
> >>> thomas
> >>> On Sun, Dec 4, 2011 at 20:13, forums  wrote:
> >>> > Hi:
> >>> >
> >>> > I hope this is the proper place to ask questions about Mapcache since
> >>> > it's
> >>> > been moved into the trunk of Mapserver.
> >>> >
> >>> > I'm wondering if Mapcache can help with a particular setup, and if so
> >>> > maybe
> >>> > some advice or direction on where to start?
> >>> >
> >>> > Here's the setup.  Every 5 minutes a new set of GeoTiffs are created
> in
> >>> > a
> >>> > new directory.  I create a tileindex for the GeoTiffs and use those
> in
> >>> > the
> >>> > map layer.  Every hour, anything more than 5hours old gets deleted.
> >>> > I have a single mapfile setup.
> >>> >
> >>> > The general layer is setup like:
> >>> >
> >>> > LAYER
> >>> > NAME 'IMG1'
> >>> > METADATA
> >>> > 'wms_title'   'IMG 1'
> >>> > 'wms_srs' 'EPSG:4326'
> >>> > 'wms_extent'  'MINX MINY MAXX MAXY'
> >>> > 'default_targetdate' ''
> >>> > 'targetdate_validation_pattern' '^[0-9]{12}$'
> >>> > END
> >>> > STATUS ON
> >>> > TILEINDEX '/PATH/TO/IMG/DIR/%targetdate%/TILEINDEX.shp'
> >>> > TILEITEM 'Location'
> >>> > TYPE RASTER
> >>> > END
> >>> >
> >>> >
> >>> > I'm currently loading these images as overlays for Googlemaps. using
> >>> > the
> >>> > mode=tile&tilemode=gmaps...&targetdate=2011...etc.
> >>> > Problem is it's too slow. I end up loading hundreds of images, as I
> >>> > basically create an animation using sequential times.
> >>> >
> >>> > I'd like to be able to have a single mapcache config file, that will
> >>> > pass
> >>> > the date through to pull the proper shapefile, and have the result
> >>> > cached so
> >>> > next time it's loading off the disk.  MOST of the images end up being
> >>> > blank/transparent tiles.
> >>> >
> >>> > Is Mapcache a good choice for this?
> >>> > The front end for this is just a simple GoogleMaps viewport, but ends
> >>> > up
> >>> > loading multiple timeslots for display.  It generates the request URL
> >>> > (not
> >>> > currently in WMS fashion but could be).
> >>> >
> >>> > Thanks 

Re: [mapserver-users] MapServer crash with WFS GetFeature request using multiple typenames

2011-12-05 Thread Rahkonen Jukka
Hi,

First, I have been thinking that there is perhaps not so often special 
advantage in using Contains. It will find features which are containing the 
whole reference geometry and that makes sense if point is used as the reference 
and features to find are polygons. With lines and polygons as reference the 
result is perhaps not the desired one, because intersecting features are not 
selected. It depends on the use case.

I believe the next Contains example is valid. You can test it yourself by doing 
copy-paste and sending it with Poster towards http://188.64.1.61/cgi-bin/tinyows

http://www.opengis.net/ogc"; 
xmlns:gml="http://www.opengis.net/gml"; xmlns:wfs="http://www.opengis.net/wfs"; 
service="WFS" version="1.1.0" maxFeatures="1000" outputFormat="text/xml; 
subtype=gml/3.1.1">http://latuviitta.fi/"; 
srsName="urn:ogc:def:crs:EPSG::3067" 
typeName="lv:pks_pienalue">lv:namelv:ogc_fidlv:the_geomlv:the_geom
385338.63323124044 6680121.5237366


Changing Contains to Intersects gives the same result. I do not have Mapserver 
WFS at the moment to test with.

-Jukka Rahkonen-

Dejan Gambin wrote:

> Hi Jukka
> 
> Accroding to your suggestions, I am trying to use 
> ogc:Contains instead of ogc:BBOX in my OL request, but it 
> fails with "Invalid or Unsupported FILTER in GetFeature" 
> error. So, using something like this:
> 
> protocol: OpenLayers.Protocol.WFS({
> version: "1.1.0",
> url:  "http://www.coin.hr/cgi-bin/mywfs6?SERVICE=WFS";,
> srsName:"EPSG:900913",
> //featureNS: "http://www.openplans.org/topp";,
> featureNS: "http://www.coin.hr";,
> geometryName: "msGeometry",
> featurePrefix: "ms"
> }),
> box: false,
> hover: false,
> //multipleKey: "shiftKey",
> toggleKey: "ctrlKey",
> single: false,
> 
> generates the following mapserver SUCCESSFUL request:
> 
> http://www.opengis.net/wfs"; 
> service="WFS" version="1.1.0" 
> xsi:schemaLocation="http://www.opengis.net/wfs 
> http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";> ry typeName="ms:katastar_vodnjan_poligon" 
> srsName="EPSG:900913" 
> xmlns:ms="http://www.coin.hr";> xmlns:ogc="http://www.opengis.net/ogc";> Name>msGeometry xmlns:gml="http://www.opengis.net/gml"; 
> srsName="EPSG:900913">1534339.5955039 
> 5613892.04442081534345.5671
> 467 
> 5613898.0160636 gc:Filter>
> 
> Using the same OL request but with "filterType: 
> OpenLayers.Filter.Spatial.CONTAINS,", I get the following:
> 
> http://www.opengis.net/wfs"; 
> service="WFS" version="1.1.0" 
> xsi:schemaLocation="http://www.opengis.net/wfs 
> http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";> ry typeName="ms:katastar_vodnjan_poligon" 
> srsName="EPSG:900913" 
> xmlns:ms="http://www.coin.hr";> xmlns:ogc="http://www.opengis.net/ogc";> ertyName>msGeometry xmlns:gml="http://www.opengis.net/gml"; 
> srsName="EPSG:900913">1534345.2685645 
> 5613850.2429211534348.25438
> 6 
> 5613853.2287424 >
> 
> and this is giving me the above error
> 
> Obviously I am doing something wrong :-)
> 
> Any help? I have MapServer 6.0.1, built from source
> 
> dejan
> 
> On 14. stu. 2011., at 14:51, Rahkonen Jukka wrote:
> 
> > Hi,
> > 
> > Feel free to test with my TinyOWS server at 
> http://188.64.1.61/cgi-bin/tinyows. I would not encourage you 
> to use BBOX filter for finding features.  According to the 
> standard BBOX is a synonyme for Intersects but for example 
> Geoserver is using it in a bit different way. It is comparing 
> if feature bounding boxes are intersecting with reference 
> bounding box if BBOX is used. This suits perfectly for 
> filling a screen with features because feature bounding boxes 
> can be found fast from the spatial index of a database. 
> However, with lines and polygons this search is sometimes 
> finding extra features. Intersects is doing a real comparison 
> of geometries which is accurate but slower.  If you click on 
> a map why don't you use ogc:Contains for finding polygons or 
> ogc;DWithin filter for finding all kind of features with a buffer?
> > 
> > My TinyOWS has a bug with ogc:BBOX so if you test it, use 
> Intersects, Contains, or DWithin instead.
> > 
> > Naturally WFS should behave in a similar way independently 
> of the data source behind the server. 
> > 
> > -Jukka Rahkonen-
> > 
> >> -Alkuperäinen viesti-
> >> Lähettäjä: Dejan Gambin [mailto:dejan.gam...@coin.hr] 
> >> Lähetetty: 14. marraskuuta 2011 15:33
> >> Vastaanottaja: Rahkonen Jukka
> >> Kopio: 'mapserver-users@lists.osgeo.org'
> >> Aihe: Re: [mapserver-users] MapServer crash with WFS 
> >> GetFeature request using multiple typenames
> >> 
> >> Hello Jukka
> >> 
> >> Thanks for the information. I am trying to make a spatial 
> >> search by clicking on the point on the map. This search 
> >> should send the requests f

Re: [mapserver-users] MapServer crash with WFS GetFeature request using multiple typenames

2011-12-05 Thread Dejan Gambin
Hi Jukka

Accroding to your suggestions, I am trying to use ogc:Contains instead of 
ogc:BBOX in my OL request, but it fails with "Invalid or Unsupported FILTER in 
GetFeature" error. So, using something like this:

protocol: OpenLayers.Protocol.WFS({
version: "1.1.0",
url:  "http://www.coin.hr/cgi-bin/mywfs6?SERVICE=WFS";,
srsName:"EPSG:900913",
//featureNS: "http://www.openplans.org/topp";,
featureNS: "http://www.coin.hr";,
geometryName: "msGeometry",
featurePrefix: "ms"
}),
box: false,
hover: false,
//multipleKey: "shiftKey",
toggleKey: "ctrlKey",
single: false,

generates the following mapserver SUCCESSFUL request:

http://www.opengis.net/wfs"; service="WFS" 
version="1.1.0" xsi:schemaLocation="http://www.opengis.net/wfs 
http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>http://www.coin.hr";>http://www.opengis.net/ogc";>msGeometryhttp://www.opengis.net/gml"; 
srsName="EPSG:900913">1534339.5955039 
5613892.04442081534345.5671467 
5613898.0160636

Using the same OL request but with "filterType: 
OpenLayers.Filter.Spatial.CONTAINS,", I get the following:

http://www.opengis.net/wfs"; service="WFS" 
version="1.1.0" xsi:schemaLocation="http://www.opengis.net/wfs 
http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>http://www.coin.hr";>http://www.opengis.net/ogc";>msGeometryhttp://www.opengis.net/gml"; 
srsName="EPSG:900913">1534345.2685645 
5613850.2429211534348.254386 
5613853.2287424

and this is giving me the above error

Obviously I am doing something wrong :-)

Any help? I have MapServer 6.0.1, built from source

dejan

On 14. stu. 2011., at 14:51, Rahkonen Jukka wrote:

> Hi,
> 
> Feel free to test with my TinyOWS server at 
> http://188.64.1.61/cgi-bin/tinyows. I would not encourage you to use BBOX 
> filter for finding features.  According to the standard BBOX is a synonyme 
> for Intersects but for example Geoserver is using it in a bit different way. 
> It is comparing if feature bounding boxes are intersecting with reference 
> bounding box if BBOX is used. This suits perfectly for filling a screen with 
> features because feature bounding boxes can be found fast from the spatial 
> index of a database. However, with lines and polygons this search is 
> sometimes finding extra features. Intersects is doing a real comparison of 
> geometries which is accurate but slower.  If you click on a map why don't you 
> use ogc:Contains for finding polygons or ogc;DWithin filter for finding all 
> kind of features with a buffer?
> 
> My TinyOWS has a bug with ogc:BBOX so if you test it, use Intersects, 
> Contains, or DWithin instead.
> 
> Naturally WFS should behave in a similar way independently of the data source 
> behind the server. 
> 
> -Jukka Rahkonen-
> 
>> -Alkuperäinen viesti-
>> Lähettäjä: Dejan Gambin [mailto:dejan.gam...@coin.hr] 
>> Lähetetty: 14. marraskuuta 2011 15:33
>> Vastaanottaja: Rahkonen Jukka
>> Kopio: 'mapserver-users@lists.osgeo.org'
>> Aihe: Re: [mapserver-users] MapServer crash with WFS 
>> GetFeature request using multiple typenames
>> 
>> Hello Jukka
>> 
>> Thanks for the information. I am trying to make a spatial 
>> search by clicking on the point on the map. This search 
>> should send the requests for every active layer and return 
>> the results for some bbox around this point. I have first 
>> tried with WMS GetFeatureInfo but also stucked with gml not 
>> being recognized by OpenLayers. So I decided to try with WFS. 
>> It works OK when data is in PostGIS and also works for one 
>> shape file but not for all I need.
>> 
>> Of course, it can be done by sending multiple requests, one 
>> for each active layer, but I thought this should work for 
>> several layers too.
>> 
>> 
>> On 14. stu. 2011., at 14:20, Rahkonen Jukka wrote:
>> 
>>> Hi,
>>> 
>>> It is not so very common to make GetFeature requests for a 
>> list of FeatureTypes, especially with filters. Therefore 
>> servers are for sure not well tested with such requests. Do 
>> you have some special need for getting just one GML package 
>> out or WFS or can you imagine to do one request per feature type?
>>> 
>>> By the way, are you aware of that if you query typeNames 
>> "A" and "B" with maxfeatures=10, the resultset will be cut at 
>> the 10th feature. If the server finds 10 or more candidates 
>> from typeName "A" you will not get any features at all from 
>> typeName "B".
>>> 
>>> -Jukka Rahkonen-
>>> 
>>> Dejan Gambin wrote:
>>> 
>>> 
 
 Anyway, seems like this ogrinfo error has nothing to do with 
 mapserver crash. So the problem persists :-(
 
 dejan
 On 14. stu. 2011., at 11:49, Dejan Gambin wrote:
 
> Additional info:
> 
> Everything works OK when data is in postgis. The problem is