Opened 13 years ago

Last modified 13 years ago

#3626 new enhancement

enable runtime substitution in outputformat options

Reported by: msmitherdc Owned by: dmorissette
Priority: normal Milestone:
Component: OGR Support Version: svn-trunk (development)
Severity: normal Keywords: ogr wfs
Cc: mko, sdlime, warmerdam, aboudreault

Description (last modified by dmorissette)

Mainly interested in changing exporting FILENAME at runtime, eg

OUTPUTFORMAT
  NAME "SHAPEZIP"
  DRIVER "OGR/ESRI Shapefile"
  FORMATOPTION "STORAGE=memory"
  FORMATOPTION "FORM=zip"
  FORMATOPTION "FILENAME=%filename%"
END

Change History (7)

comment:1 by msmitherdc, 13 years ago

Owner: changed from FrankW to dmorissette

comment:2 by mko, 13 years ago

Cc: mko added

comment:3 by dmorissette, 13 years ago

Cc: sdlime warmerdam aboudreault added
Description: modified (diff)

Steve, Frank, what do you think of this addition? Should we do it only for FORMATOPTION or should we allow it for all outputformat params?

comment:4 by warmerdam, 13 years ago

I think it would also be very useful to offer this for the DRIVER line. While at it, perhaps also the rest of the options?

comment:5 by aboudreault, 13 years ago

There is a patch in #3652 that looks ok, if there are only a few options. We would have to determine all the options that can be substituted. Otherwise, we'd need to think about another approach.

comment:6 by aboudreault, 13 years ago

About my last comment, I had environment variables to modify existing options in mind, not substitute a variable in the mapfile. The patch mentionned is not appropriate (or incomplete) for this case.

in reply to:  5 comment:7 by mko, 13 years ago

Replying to aboudreault:

There is a patch in #3652 that looks ok, if there are only a few options. We would have to determine all the options that can be substituted. Otherwise, we'd need to think about another approach.

In #3652 I plan to use url substitution syntax so one can do the same as url substitutions but with environment variables.

Note: See TracTickets for help on using tickets.