Opened 15 years ago
Closed 15 years ago
#2875 closed enhancement (invalid)
add savetolayer function available through mapscript
Reported by: | assefa | Owned by: | assefa |
---|---|---|---|
Priority: | normal | Milestone: | 5.4 release |
Component: | MapServer C Library | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: | sdlime |
Description
Add a convenience function SaveToLayer using the existing writetolayer function (Same logic as SaveMap). This function would be available through mapscript layer object.
This would allow to save individual layers into files and ease the manipulation of map files that use for example includes to include layers.
Steve, do you see any problem/issue if I add it?
Change History (5)
comment:1 by , 15 years ago
Owner: | changed from | to
---|
comment:3 by , 15 years ago
Assefa: What parameters does the new method take? Personally I'd like to move to supporting an "asString" method for everything and then let the user decide what to do with the string- save it to a file or a database. Logic would be something like:
$layerString = $layer->asString(); # do something with $layerString
I'm not familiar with the writetolayer function.
Steve
comment:4 by , 15 years ago
function would be msSaveLayer(layerObj *layer, char *filename) access through mapscript with layer->save(filename). I misspelled the function, I meant writeLayer function in mapfile.c
I though of the asstring too and actually I thought we had it. I agree it would be a lot more effective to have all mapserver objects available as strings, but would involves more time to implement for me at this point (I guess all the writeXXX function would need to work somehow with the asString functions for each object)
Do you think it is too much of a stretch to add the SaveLayer as decribed?
Thx.
comment:5 by , 15 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
Steve,
I will close this bug as invalid. I think the asString is a lot more appropriate. I took another route to finish my project and save/get the layers as strings.
Thanks for your feed back.
any objections for this to be added?