MapServer icon indicating copy to clipboard operation
MapServer copied to clipboard

Make WFS Query Extents Available for Templating

Open DonaldKerr opened this issue 14 years ago • 7 comments

I posted the following message to Mapserver Users:

I am trying to use BBOX in a WFS query template where I need to get the minx, miny etc in the following format:

"258481,665862 258607,665956" i.e. a space between coordinate pairs which are separated by a comma.

In the template, [bbox] returns "258481,665862,258607,665956" with each value separated by a comma.

I have tried "[bbox.minx],[bbox.miny] [bbox.maxx],[bbox.maxy]" without success.

A reply from Andreas Eichner suggested looking at "[shpminx], [shpminy] etc." but this only applies to the individual features within [resultset]. Likewise, Steve Lime suggested "[rawext]" which has limitations as "[mapext]" which provides the extents as configured in the map file; they bear no relationship to the query extents as defined by BBOX in the querystring.

I have created this ticket as suggested by Steve Lime.

Regards,

Donald

What's required is a keyword to gives the overall extents of the whole query by providing access to the individual parts of querystring BBOX i.e. "bbox.minx" etc or

DonaldKerr avatar Jul 24 '12 17:07 DonaldKerr

Are you interested more in the original bbox, the extent of matching features or both? Probably talking about adding couple of tags...

Steve

sdlime avatar Jul 24 '12 17:07 sdlime

I'm only really interested in being able to access the individual parts of the bbox e.g. bbox.minx, bbox.miny etc. so that I can reformat them a space between coordinate pairs rather than 4 comma-separated values as it is just now. That would certainly satisfy my requirements at this stage.

Many thanks.

Regards,

Donald

DonaldKerr avatar Jul 24 '12 18:07 DonaldKerr

It guess accessing those components would require explicit splitting and populating the BBOX parameter via processExtentTag(). It seems it is currently only available as ordinary CGI request parameter. Extending the template output driver by using msGetQueryResultBounds() to populate [query_bbox] or the like might be a good idea.

aeichner avatar Jul 25 '12 06:07 aeichner

I agree. That extent is readily available just as the query bbox.

sdlime avatar Jul 25 '12 14:07 sdlime

Having looked at this again, I can get the required information and formating by adding querystring parameters to the WFS call from the client since querystring parameters all seem to be passed directly through and are available for templating. Therefore, in my case, I do not now need templating options extended.

As well as "bbox" formatted with a space between the coordinate pairs, I also needed a "linearring" where the coordinate pairs are formated thus: "ll.x,lly lt.x,lt.y rt.x,rt.y rb.x,rb.y ll.x,ll.y" i.e. a box with the last coordinates being the same as the first.

I would be happy to see this request closed if no one else has the same requirement.

Thank you all.

Regards,

Donald

DonaldKerr avatar Jul 30 '12 11:07 DonaldKerr

I'll leave open but push to 6.4 release... Steve

sdlime avatar Aug 03 '12 17:08 sdlime

Not feeling motivated in light of my other tickets... Closing.

sdlime avatar Jul 24 '13 03:07 sdlime