Opened 15 years ago

Closed 13 years ago

#3094 closed defect (fixed)

PROJ_LIB with relative paths

Reported by: sholl Owned by: dmorissette
Priority: normal Milestone: 6.0 release
Component: MapServer C Library Version: 5.4
Severity: normal Keywords: PROJ_LIB
Cc: tim.englich@…, warmerdam, dmorissette

Description

While working with a specialized EPSG-code-table we encountered the problem that the PROJ_LIB CONFIG-directive only accepts full paths to the folder containing the epsg-file.

Using relative paths are not possible.

It would be realy nice to make the PROJ_LIB-path relative, because mapfiles will be more transportable to other maschines/paths/...

Also the documentation under [1] states that MS_PROJ_LIB should be used to set the path to the epsg-file, which we never got working. Is this an osolete parameter? If so, please remove it from the mapfile-reference-documentation.

Thanks.

[1] http://mapserver.org/mapfile/map.html

Change History (11)

comment:1 by warmerdam, 15 years ago

Cc: warmerdam added
Keywords: PROJ_LIB added

I have removed MS_PROJ_LIB from the mapfile/map.txt doc as I cannot find any reference to it in the code (r9255).

I'm not terribly keen on making PROJ_LIB relative to the MAP file path, though I can see why it might be desirable.

in reply to:  1 comment:2 by sholl, 15 years ago

Replying to warmerdam:

I have removed MS_PROJ_LIB from the mapfile/map.txt doc as I cannot find any reference to it in the code (r9255).

OK, great. this will reduce confusion.

I'm not terribly keen on making PROJ_LIB relative to the MAP file path, though I can see why it might be desirable.

Is it possible support both options, absolute and relative paths?

comment:3 by warmerdam, 14 years ago

Owner: changed from sdlime to warmerdam

OK, I'm going to take a crack at this, if only to get the ticket closed.

comment:4 by warmerdam, 14 years ago

Support for map relative proj_lib config variable implemented in trunk (r10376). Note that the way this works is that the proj_lib value passed via CONFIG in the map file is first checked relative to the map file to see if it points to a directory. If so, the relative path is used, otherwise it is used directly. Obviously absolute paths are not check for the relative location.

comment:5 by bj, 13 years ago

Ping, is there any progress to get this feature it in MapServer 6.0?

We find this feature really useful.

Any comment from a dev would be helpful gain momentum here.

Best

bjoern

comment:6 by warmerdam, 13 years ago

Milestone: 6.0 release
Resolution: fixed
Status: newclosed

Bjoern,

r10376 introduced the feature intro trunk which means it will appear in Mapserver 6.0. It should be in the beta produced later today.

I'm not sure why I left this ticket open. Closing now.

comment:7 by dmorissette, 13 years ago

Cc: dmorissette added
Resolution: fixed
Status: closedreopened

FYI when I applied similar logic for MS_ERRORFILE in #2853 I realized that in addition to msSetConfigOption() we also need to apply the same logic in msApplyMapConfigOptions() which is called from a few places.

In the MS_ERRORFILE case, instead of duplicating the logic I moved it inside msSetErrorFile(). We may want to do the same for msSetPROJ_LIB().

Reopening ticket to review/test this. Too late for MS 6.0 beta1 but I'll take care of it after.

comment:8 by bj, 13 years ago

Hej, any progress towards 6.0.0-beta3?

comment:9 by dmorissette, 13 years ago

Owner: changed from warmerdam to dmorissette
Status: reopenednew

Looking into this now

comment:10 by dmorissette, 13 years ago

I think I'll wait to do this after beta3 to not risk breaking something at the last minute

comment:11 by dmorissette, 13 years ago

Resolution: fixed
Status: newclosed

Fixed in r11376 (will be in 6.0.0-beta4).

Note: See TracTickets for help on using tickets.