Ticket #2376 (closed enhancement: fixed)

Opened 6 years ago

Last modified 5 years ago

Allow shpext tag to take arguments to expand, format and project shape extents

Reported by: sdlime Owned by: jmckenna
Priority: normal Milestone: 5.2 release
Component: Documentation - MapServer Version: unspecified
Severity: normal Keywords:
Cc:

Description

The shpext tag current currently outputs the bbox for a given query feature as a space delimited string. It is desirable to give users more control over the presentation of that string. We need to support a few simple attributes such as:

  • expand: given in map units (pre-projection) or as a percentage (this is not a true buffer operation)
  • format: define coordinate and point seperators (similar to shpxy tag)
  • projection: see [shpxy ...] tag
  • escaping: see [shpxy ...] tag

This is basically identical support to what exists to the shpxy tag. An unattributed [shpext] tag would work just as it does now.

Steve

Change History

Changed 6 years ago by sdlime

  • status changed from new to assigned
  • milestone set to 5.2 release

Changed 6 years ago by sdlime

  • type changed from defect to enhancement

Changed 5 years ago by sdlime

  • component changed from MapServer CGI to MapServer Documentation

Committed a version of this in r7625 that allows for:

  • formating (default is "minx miny maxx maxy")
  • number precision control
  • extent/bounds expansion
  • escaping

Still todo's are projection and support for percentage expansion. I'll file separate bugs for those in the next release. Support is available for the following tags:

  • mapext, rawext, refext, mapext_latlon and shpext

Eventually we can deprecate a number of tags including all the [..._esc] extent tags and all those used to expose individual parts of an extent (e.g. [shpext_minx]).

Examples:

[shpext precision=0 format="$minx,$miny,$maxx,$maxy"]

would output:

123456,123456,567890,567890

and:

[shpext precision=0 format="$minx,$miny,$maxx,$maxy" expand=1000]

would output:

122456,122456,568890,568890

Moving to a documentation enhancement now.

Steve

Changed 5 years ago by jmckenna

  • owner changed from sdlime to jmckenna
  • status changed from assigned to new

Changed 5 years ago by jmckenna

  • status changed from new to assigned

Changed 5 years ago by jmckenna

  • status changed from assigned to closed
  • resolution set to fixed

- updated the Template File Reference doc for mapext, rawext, refext, mapext_latlon and shpext changes.

Note: See TracTickets for help on using tickets.