[mapserver-dev] A thought about a CGI parameter add, basicallyaswitchfor turning a default layer off.

Bob Basques Bob.Basques at ci.stpaul.mn.us
Thu Feb 3 15:19:45 EST 2011


Steve,


No harm no foul.  It was just a "thought" after all.  :c)

bobb




>>> Stephen Woodbridge <woodbri at swoodbridge.com> 02/03/11 2:08 PM >>>
OK, short answer. I am not disagreeing with the need for users to be 
able to control open public data in an environment like yours. If a 
request for a feature that broke something that you depended on, you 
would be just as adamant against that.

So to summarize, this feature request would:

1. break backwards compatibility
2. would remove an existing feature that other users depend on
3. can be accomplished with existing features when used as designed, 
albeit, with some pain to restructure things in your application.
4. could be accomplished by creating a private patch to your mapserver, 
but the pain here is to create and carry the patch forward vs. the pain 
of restructuring

Sorry, if anything I said came across as an attack, that was not my 
intention.

Best regards,
   -Steve


On 2/3/2011 9:50 AM, Bob Basques wrote:
> Ok, here goes . . . :c)
>
>
> Define a "hack" please? It sounds like any change may be considered a
> hack, and may also be dependent on who's looking at what.
>
>
> The publisher vs system admin argument has been a long standing
> conversation topic with me. I don't think the System admin should be
> getting in the way of the publishing process, but rather, they should be
> supplying the tools to make it easier to publish as well as consume the
> publised data.
>
>
> I think there are also more than a few instances where the rules can and
> do change for this argument. One is the commercial vs open environment.
> I need to mention here that I've have focused most of my development
> life on the publishing of open data. On the commercial side, the idea is
> to present a unified, and too a large degree, pre-scripted experience,
> that doesn't change significantly over time. It's about the product and
> making it the same every time a user experiences it, IE McDonaolds and
> Google, for example. So they feel comfortable. On the open side, I would
> say the reverse it true, change is good, as well as control, over
> anything and everything (if the users had their way), it's in many
> instances why the open customer took a look at things in the open
> environment in the first place. Using just these two different
> publishing/consuming scenarios one can see that things can get into
> conflict quite easily, and quickly, with regard to perceived and desired
> capabilities by the publishers as well as the consumers. Lastly I'm
> going out on a limb here and state that the Open version of
> publishing/consuming eventually settles into a commercial version over
> time, especially the longer a tool has been in place. A form follows
> function sort of thing.
>
>
> My last piece here, is to emphasize that it's all about the data, not
> what's done with it. Now this is more than likely a open data publishing
> perspective, but over the years, software and techniques have come and
> gone, the one thing that always remains, is that there is data to use
> and manipulate, preferably is good data and up to date.
>
>
> Ok, I think I'm done (getting down off soap box) . . .
>
>
> :c)
>
>
> Nice discussion BTW.
>
>
> bobb
>
>
>
>  >>> Stephen Woodbridge <woodbri at swoodbridge.com> wrote:
>
> On 2/2/2011 10:21 AM, Bob Basques wrote:
>  > Steve,
>  >
>  >
>  > Hmmm, good point on the Copyright thing, I suppose it's complicating
>  > things, but you could use a KEYWORD / function in the Mapfiles to
>  > enforce the stamping, or hide such layers from a [toggle_layer] listing.
>
> Yes it is always possible to add another hack to fix an enhancement ;)
> but it probably means the enhancement is not well thought out.
>
>  > It's sometimes easier to predict (or assume) that certain layers should
>  > be on by default. In a GeoMoose configuration, the data
>  > owners/custodians can have their own publication controls, and they will
>  > have their preferences for default layers, for particular users, this
>  > may work very well for them, but other (unpredicted) users, may
>  > want/need to display things in different combinations of layers in their
>  > view of the world.
>
> I think that the data publisher should control this not the data
> consumer. If I publish my data a certain way then it should be used that
> way. If a user needs it some other way then maybe the use case changed
> or something else and I should review the requirements with the user.
> This just makes sense, no it is not easier or quick and dirty fix, but
> ... I'm just saying! This could also be an education or planning issue
> for your data providers or a lack of requirements gathering between
> producers and consumers. Or, if using default causes problems then tell
> them not to use that. If GeoMoose requires default, then maybe you
> should consider refactoring it, if the above does not fix the problem.
>
>  > I've been a long (LONG) time user of the CGI model for MapServer, even
>  > building my own image generator before ever moving to using MapServer.
>  > The CGI methods for me just seem easier and less verbose to use, and
>  > much quicker to implement on the fly, especially when I have control of
>  > everything from front to back. Some WMS queries are optional, so not all
>  > capabilities that a CGI approach would afford are necessarily available
>  > via WMS all the time. The thread was aimed at making things more
>  > flexible overall, not just more complicated.
>
> Yeah, I agree CGI is good for quick and dirty prototyping in addition to
> building good full blown application, but now I like using OpenLayers to
> handle talking to mapserver and writing PHP ajax handlers for other
> stuff so the CGI is more than adequate for most of my needs. This may
> not be the case for all users. I'm not opposed to adding features to the
> CGI, but this one just does not seem like a good idea to me as the use
> case can be implemented by the proper use of the existing CGI interface,
> ie: set the layers to off and request the layers you want and if you get
> a default layer that you do not want, then talk to the mapfile publisher.
>
>  > Templates work very well, and look like they will work for the layer
>  > listing too (I thought about this before sending the questions). Lastly,
>  > since MapServer is in the mix, I can combine CGI with WMS calls as well.
>  > I may need to run the request through some proxy, but then I have even
>  > more control over things, A WMS+ service if you will.
>
> Yup, works great and I have used both of these tricks in other projects
> in the past.
>
>  > My parting thought on this, would be, if this is truly seen as a
>  > cumbersome or time consuming thing to add to mapserver, should some
>
> I don't think it is either of these, as I said above.
>
>  > review of current capabilities be performed to see what redundant
>  > capabilities might be removable from MapServer since they are now
>  > available via other means, like WMS, or at the very least,
>  > implement/convert them to a WMS like call.
>
> Sounds like this might be something to discuss for 7.0 as 6.0 is pretty
> much locked up for now, and any major change to the mapserver UI that
> would not be backwards compatible would need to happen at a major
> revision. If you want to lead the charge on this now it probably as good
> as anytime to start a discussion and propose changes.
>
>  > I prefer to keep both products/services in their own sand boxes, and
>  > apply the best capabilities list to each, but maybe I'm missing
>  > something at the big(ger) picture level.
>
> Sorry to rain on your parade, I hear that this is a pain point for
> geoMoose and implementing this would be a simple fix. I'm also just one
> voice so other dev's are certainly welcome to jump in here and disagree
> with me.
>
> That said, I'm pretty adamant that the publisher of a map, should have
> some control over it and should be able to limit the extent that a user
> can modify it. If there is a simple solution that does not violate those
> rights then I'm all for it.
>
> Best regards,
> -Steve W
>
>  > :c)
>  >
>  >
>  > bobb
>  >
>  >
>  >
>  >
>  > >>> Stephen Woodbridge <woodbri at swoodbridge.com> wrote:
>  >
>  > I do not think this would be a good idea because it would allow a user
>  > to turn off say a copyright layer for instance.
>  >
>  > I think it is better to plan out your application to turn things on that
>  > you want on as Steve suggests.
>  >
>  > So while I do you the CGI even in OpenLayers over the WMS, mostly
>  > because I learned it first and partly because WMS just makes it too easy
>  > for unwanted users to pull maps, I am somewhat inclined to think the WMS
>  > is the better way to go if you want all the capabilities of WMS. What is
>  > your rationale for adding a all this stuff to the CGI? Does working it
>  > through the template system meet your needs?
>  >
>  > Inquiring minds want to know :)
>  >
>  > Best regards,
>  > -Steve W
>  >
>  > On 2/1/2011 10:54 PM, Lime, Steve D (DNR) wrote:
>  > > 1) If your interface is smart enough to explicitly turn the
>  > > centerlines off why wouldn't you just set STATUS OFF in the mapfile
>  > > and explicitly turn them on? I think the REQUIRES parameter is a
>  > > better means of triggering this auto-off capability in any regard.
>  > >
>  > > 2) You might already be able to do the layer list using the
>  > > [toggle_layers] tag. It returns a space delimited list of layers that
>  > > can be toggled. It's available in any query/browse template so I
>  > > imagine you could craft a URL that runs quickly to access them that
>  > > way... Just a thought.
>  > >
>  > > Steve ________________________________________ From:
>  > > mapserver-dev-bounces at lists.osgeo.org
>  > > [mapserver-dev-bounces at lists.osgeo.org] On Behalf Of Bob Basques
>  > > [Bob.Basques at ci.stpaul.mn.us] Sent: Tuesday, February 01, 2011 2:43
>  > > PM To: MapServer Dev Mailing List Subject: [mapserver-dev] A thought
>  > > about a CGI parameter add, basically a switch for turning a default
>  > > layer off.
>  > >
>  > > All,
>  > >
>  > >
>  > > Is this doable?
>  > >
>  > >
>  > > Was wondering about a mechanism to turn a DEFAULT layer off via CGI,
>  > > something like "layers=-centerlines", where the negative sign ( - )
>  > > would be used to indicate that a default layer should NOT be drawn
>  > > for a CGI request.
>  > >
>  > >
>  > > In short terms, could adding a negative sign ( - ) to the front of a
>  > > layer name to NOT draw that layer be easily implemented in the CGI
>  > > calls?
>  > >
>  > >
>  > > WARNING: If the above is possible, the next question would be to get
>  > > a list of the layers that are available in a MAPFILE (like
>  > > GetCapabilities) for drawing. And don't say use WMS, otherwise you
>  > > should get rid of the LEGEND generation in MapServer too, since that
>  > > can be done via WMS as well. :c) I also have an inkling that
>  > > having the ability to poll the mapfile for the layers available might
>  > > be an interesting capability to add in that would allow for some
>  > > interesting user GUI elements to be built around.
>  > >
>  > >
>  > > ---------
>  > >
>  > >
>  > > Here is my use case (if needed):
>  > >
>  > >
>  > > Say I have a centerline file of a street network for a map, and then
>  > > add in a Aerial photo background, I want to turn the centerlines off,
>  > > but keep the labels as an overlay. Both the centerlines and the
>  > > labels are on by default at the mapfile.
>  > >
>  > >
>  > > Thanks
>  > >
>  > >
>  > > bobb
>  > >
>  > >
>  > >
>  > > _______________________________________________ mapserver-dev mailing
>  > > list mapserver-dev at lists.osgeo.org
>  > > http://lists.osgeo.org/mailman/listinfo/mapserver-dev
>  >
>




More information about the mapserver-dev mailing list