Re: [mapserver-users] Cascading Mapserver - WMS client - GetLegendGraphic ?
Can someone please confirm that cascading getLegendGraphic is not supported ? Thanks. Pierre On Fri, May 20, 2011 at 6:34 AM, Andrew Cowie cow...@landcareresearch.co.nz wrote: 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_version 1.1.1 wms_format image/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_format image/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... J 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 -- Pierre GIRAUD http://www.camptocamp.com ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Cascading Mapserver - WMS client - GetLegendGraphic ?
cascading getLegendGraphic is not supported I already opened a ticket...yesterday! for this enhancement Ticket URL: http://trac.osgeo.org/mapserver/ticket/3923 Steve Pierre GIRAUD blueca...@gmail.com@lists.osgeo.org Envoyé par : mapserver-users-boun...@lists.osgeo.org 2011-06-17 09:33 A Andrew Cowie cow...@landcareresearch.co.nz cc mapserver-users@lists.osgeo.org mapserver-users@lists.osgeo.org Objet Re: [mapserver-users] Cascading Mapserver - WMS client - GetLegendGraphic ? Can someone please confirm that cascading getLegendGraphic is not supported ? Thanks. Pierre On Fri, May 20, 2011 at 6:34 AM, Andrew Cowie cow...@landcareresearch.co.nz wrote: 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... J 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 -- Pierre GIRAUD http://www.camptocamp.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] Re: Mapserver 6.0 MINSCALEDENOM/MAXSCALEDENOM and different EPSG codes?
Bug reported..Thanks Chris Hodgson.. http://trac.osgeo.org/mapserver/ticket/3883 http://trac.osgeo.org/mapserver/ticket/3883 -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Mapserver-6-0-MINSCALEDENOM-MAXSCALEDENOM-and-different-EPSG-codes-tp6480805p6487265.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
[mapserver-users] Postgis simplify function and mapserver
Hi list, I wish to change a query parameter in my postgis layer depending of the scale of the map I want, let's see: DATA the_geom FROM (SELECT finfres.gid as gid, ST_Transform(simplify(ambits.the_geom,5),23031) as the_geom ... So I would like to know if it's possible to pass the second parameter of simplify function depending of the map scale, without any value on the querystring (using %%). Thanks a lot for any help. -- *Lluís Peinado* ***Geodata Sistemas,SL.* luis.pein...@geodata.es T. 933 035 367 (ext. 21) F. 933 080 071 ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Asking for guidelines about a project
The database schema depends on what you want to do with the data (display current position? A track of historical positions?), and how much data you expect (how may objects will be tracked? how often will they report?). A simple schema would have one table (e.g. vehicles), with one row per tracked object Table: Vehicles ID:Name: Position: Status: UpdateTime: 1 My Carpoint(51,-115) active2011-06-16 10:23:54+02 2 Another Car point(52,-116) inactive 2010-05-15 11:13:12+02 With this schema, when a new position arrives for My Car, an update statement is issued to change the row's Position and UpdateTime (and possibly Status). The table is treated as a PostGIS point layer by mapserver. In my implementations, the position data was updated every 30 to 60 minutes (they were ships and construction vehicles), so there was no need to ask mapserver to regenerate a graphic every second; an updated map was shown whenever a user did a pan or zoom. You may be able to configure OpenLayers to do a CGI request to mapserver every few seconds, but I've never done that. Best Regards, Brent Fraser On 6/16/2011 11:52 PM, Saka Royban wrote: Thanks a lot brent I checked provided link and i;m gonna give it a try. About ur helpful advices, i'm confused about how to save data in PostGIS? with what schema? I mean i have to keep track of each paced point by moving objects. Should i record each point as a record, so it means one table per moving object ? Also for displaying these varaiant data, there should some sort of plan. I don't think i'm able to say to MapServer CGI at each second connect to PostGIS and read the new data, then i have to use MapScript. Am i right? (Can this process be done via OpenLayers?) Best Regards *From:* Brent Fraser bfra...@geoanalytic.com *To:* Saka Royban sakaroy...@yahoo.com *Cc:* MapServer mapserver-users@lists.osgeo.org *Sent:* Tue, June 14, 2011 7:14:08 PM *Subject:* Re: [mapserver-users] Asking for guidelines about a project Saka, I've had good success using PostGIS for data storage in implementing tracking systems. While you'll need to create your own code for updating the positions in the database, mapserver can read points from PostGIS and can render the points into a map image for use with the OpenLayers client. There are other solutions too, like OpenGTS (http://opengts.sourceforge.net/index.html) Best Regards, Brent Fraser On 6/14/2011 12:08 AM, Saka Royban wrote: Hi all. Strictly Speaking, i have a project that i should display some moving objects on a map via browser. Generally, i don't know how to start? i mean how should i save these time-based objects in DB and how to retrieve and display them via Mapserver? where should i use client side scripting like OpneLayers? Any help woudbe greatly appreciated. Thanks in advance ___ 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 mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] Scalebar Object in PHP Mapscript
Yes the units are set. What do you mean by ?the map is well scaled but the scalebar is not ?? I mean the image printed is the same size as the map in my application. But it seems that the scalebar is not appropriate $oMap-setProjection is set to 900913 in php mapscript, The WMS called is in Projection EPSG:32198, but 900913 is in the list of available projections Is it possible that php mapscript returns the map image in 900913, but a scalebar in 32198? Any other ideas Thank you for your help, Steve Lime, Steve D (DNR) steve.l...@state.mn.us 2011-06-16 18:31 A steve.tout...@inspq.qc.ca steve.tout...@inspq.qc.ca, mapserver-users@lists.osgeo.org mapserver-users@lists.osgeo.org cc Objet RE: [mapserver-users] Scalebar Object in PHP Mapscript What do you mean by ?the map is well scaled but the scalebar is not ?? Other common params would be SIZE, STYLE and INTERVALS. Does the map have units set? Steve From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of steve.tout...@inspq.qc.ca Sent: Thursday, June 16, 2011 12:29 PM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] Scalebar Object in PHP Mapscript Hi, I create a scalebar like this $oMap-scalebar-set(units, MS_METERS); $oMap-scalebar-outlinecolor-setRGB(0,0,0); $oMap-scalebar-set(status, MS_EMBED); And create an image of the map with the scalebar embedded On the image, the map is well scaled but the scalebar is not. Is the code above good? Is there some more parameters I should set? thanks Steve ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Asking for guidelines about a project
Thanks for ur answer and also Josh's answer. In fact, i should be able to display path of vehicles (usually more than 1 vehicle in display area) and also be able to save points passed by vehicles and time of passing (for some queries). Cause of that, i thought maybe i need one table per vehicle. Do u think any more idea? Best Regards From: Brent Fraser bfra...@geoanalytic.com To: Saka Royban sakaroy...@yahoo.com Cc: MapServer mapserver-users@lists.osgeo.org Sent: Fri, June 17, 2011 7:49:20 PM Subject: Re: [mapserver-users] Asking for guidelines about a project The database schema depends on what you want to do with the data (display current position? A track of historical positions?), and how much data you expect (how may objects will be tracked? how often will they report?). A simple schema would have one table (e.g. vehicles), with one row per tracked object Table: Vehicles ID:Name: Position: Status: UpdateTime: 1 My Carpoint(51,-115) active2011-06-16 10:23:54+02 2 Another Car point(52,-116) inactive 2010-05-15 11:13:12+02 With this schema, when a new position arrives for My Car, an update statement is issued to change the row's Position and UpdateTime (and possibly Status). The table is treated as a PostGIS point layer by mapserver. In my implementations, the position data was updated every 30 to 60 minutes (they were ships and construction vehicles), so there was no need to ask mapserver to regenerate a graphic every second; an updated map was shown whenever a user did a pan or zoom. You may be able to configure OpenLayers to do a CGI request to mapserver every few seconds, but I've never done that. Best Regards, Brent Fraser On 6/16/2011 11:52 PM, Saka Royban wrote: Thanks a lot brent I checked provided link and i;m gonna give it a try. About ur helpful advices, i'm confused about how to save data in PostGIS? with what schema? I mean i have to keep track of each paced point by moving objects. Should i record each point as a record, so it means one table per moving object ? Also for displaying these varaiant data, there should some sort of plan. I don't think i'm able to say to MapServer CGI at each second connect to PostGIS and read the new data, then i have to use MapScript. Am i right? (Can this process be done via OpenLayers?) Best Regards From: Brent Fraser bfra...@geoanalytic.com To: Saka Royban sakaroy...@yahoo.com Cc: MapServer mapserver-users@lists.osgeo.org Sent: Tue, June 14, 2011 7:14:08 PM Subject: Re: [mapserver-users] Asking for guidelines about a project Saka, I've had good success using PostGIS for data storage in implementing tracking systems. While you'll need to create your own code for updating the positions in the database, mapserver can read points from PostGIS and can render the points into a map image for use with the OpenLayers client. There are other solutions too, like OpenGTS (http://opengts.sourceforge.net/index.html) Best Regards, Brent Fraser On 6/14/2011 12:08 AM, Saka Royban wrote: Hi all. Strictly Speaking, i have a project that i should display some moving objects on a map via browser. Generally, i don't know how to start? i mean how should i save these time-based objects in DB and how to retrieve and display them via Mapserver? where should i use client side scripting like OpneLayers? Any help woudbe greatly appreciated. Thanks in advance ___ 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 mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Scalebar Object in PHP Mapscript
On 11-06-17 12:18 PM, steve.tout...@inspq.qc.ca wrote: $oMap-setProjection is set to 900913 in php mapscript, The WMS called is in Projection EPSG:32198, but 900913 is in the list of available projections Did you set the units at the map level? Setting the projection is not enough. i.e. $oMap-set(units, MS_METERS); -- Daniel Morissette http://www.mapgears.com/ Provider of Professional MapServer Support since 2000 ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE [Polluriel potentiel] Re: [mapserver-users] Scalebar Object in PHP Mapscript
Here is my definition $oMap-scalebar-set(units, MS_METERS); $oMap-scalebar-outlinecolor-setRGB(0,0,0); $oMap-scalebar-set(status, MS_EMBED); Daniel Morissette dmorisse...@mapgears.com@lists.osgeo.org Envoyé par : mapserver-users-boun...@lists.osgeo.org 2011-06-17 12:58 A mapserver-users@lists.osgeo.org cc Objet [Polluriel potentiel] Re: [mapserver-users] Scalebar Object in PHP Mapscript On 11-06-17 12:18 PM, steve.tout...@inspq.qc.ca wrote: $oMap-setProjection is set to 900913 in php mapscript, The WMS called is in Projection EPSG:32198, but 900913 is in the list of available projections Did you set the units at the map level? Setting the projection is not enough. i.e. $oMap-set(units, MS_METERS); -- Daniel Morissette http://www.mapgears.com/ Provider of Professional MapServer Support since 2000 ___ 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
Re: [mapserver-users] Asking for guidelines about a project
Well, it's up to you how to model the objects (that's the great thing about relational databases). Typically, I've added a table of Historical Positions with basically the same structure as the vehicle table (but in that case the unique key is not the vehicle ID, but instead just a system assigned key like OID). As for the points passed by, I would not save that information in a table, instead consider it the result of a spatial query (say in a PostGIS view) at display time. A system like this usually takes a large of amount of time for requirements, investigation, design, and prototyping. And of course, construction, testing, documentation, and training. If you want something more packaged you can just download and install, you may want to do some searching on the web. Best Regards, Brent Fraser On 6/17/2011 10:56 AM, Saka Royban wrote: Thanks for ur answer and also Josh's answer. In fact, i should be able to display path of vehicles (usually more than 1 vehicle in display area) and also be able to save points passed by vehicles and time of passing (for some queries). Cause of that, i thought maybe i need one table per vehicle. Do u think any more idea? Best Regards *From:* Brent Fraser bfra...@geoanalytic.com *To:* Saka Royban sakaroy...@yahoo.com *Cc:* MapServer mapserver-users@lists.osgeo.org *Sent:* Fri, June 17, 2011 7:49:20 PM *Subject:* Re: [mapserver-users] Asking for guidelines about a project The database schema depends on what you want to do with the data (display current position? A track of historical positions?), and how much data you expect (how may objects will be tracked? how often will they report?). A simple schema would have one table (e.g. vehicles), with one row per tracked object Table: Vehicles ID:Name: Position: Status: UpdateTime: 1 My Carpoint(51,-115) active2011-06-16 10:23:54+02 2 Another Car point(52,-116) inactive 2010-05-15 11:13:12+02 With this schema, when a new position arrives for My Car, an update statement is issued to change the row's Position and UpdateTime (and possibly Status). The table is treated as a PostGIS point layer by mapserver. In my implementations, the position data was updated every 30 to 60 minutes (they were ships and construction vehicles), so there was no need to ask mapserver to regenerate a graphic every second; an updated map was shown whenever a user did a pan or zoom. You may be able to configure OpenLayers to do a CGI request to mapserver every few seconds, but I've never done that. Best Regards, Brent Fraser On 6/16/2011 11:52 PM, Saka Royban wrote: Thanks a lot brent I checked provided link and i;m gonna give it a try. About ur helpful advices, i'm confused about how to save data in PostGIS? with what schema? I mean i have to keep track of each paced point by moving objects. Should i record each point as a record, so it means one table per moving object ? Also for displaying these varaiant data, there should some sort of plan. I don't think i'm able to say to MapServer CGI at each second connect to PostGIS and read the new data, then i have to use MapScript. Am i right? (Can this process be done via OpenLayers?) Best Regards *From:* Brent Fraser bfra...@geoanalytic.com *To:* Saka Royban sakaroy...@yahoo.com *Cc:* MapServer mapserver-users@lists.osgeo.org *Sent:* Tue, June 14, 2011 7:14:08 PM *Subject:* Re: [mapserver-users] Asking for guidelines about a project Saka, I've had good success using PostGIS for data storage in implementing tracking systems. While you'll need to create your own code for updating the positions in the database, mapserver can read points from PostGIS and can render the points into a map image for use with the OpenLayers client. There are other solutions too, like OpenGTS (http://opengts.sourceforge.net/index.html) Best Regards, Brent Fraser On 6/14/2011 12:08 AM, Saka Royban wrote: Hi all. Strictly Speaking, i have a project that i should display some moving objects on a map via browser. Generally, i don't know how to start? i mean how should i save these time-based objects in DB and how to retrieve and display them via Mapserver? where should i use client side scripting like OpneLayers? Any help woudbe greatly appreciated. Thanks in advance ___ 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 mailing list mapserver-users@lists.osgeo.org
RE: [mapserver-users] Scalebar Object in PHP Mapscript
I have this set as well $oMap-set(units, MS_METERS); But I still have the problem Steve Lime, Steve D (DNR) steve.l...@state.mn.us 2011-06-16 18:31 A steve.tout...@inspq.qc.ca steve.tout...@inspq.qc.ca, mapserver-users@lists.osgeo.org mapserver-users@lists.osgeo.org cc Objet RE: [mapserver-users] Scalebar Object in PHP Mapscript What do you mean by ?the map is well scaled but the scalebar is not ?? Other common params would be SIZE, STYLE and INTERVALS. Does the map have units set? Steve From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of steve.tout...@inspq.qc.ca Sent: Thursday, June 16, 2011 12:29 PM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] Scalebar Object in PHP Mapscript Hi, I create a scalebar like this $oMap-scalebar-set(units, MS_METERS); $oMap-scalebar-outlinecolor-setRGB(0,0,0); $oMap-scalebar-set(status, MS_EMBED); And create an image of the map with the scalebar embedded On the image, the map is well scaled but the scalebar is not. Is the code above good? Is there some more parameters I should set? thanks Steve ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users