[Mapserver-dev] New msCloneLayerObj() function

Steve Lime steve.lime at dnr.state.mn.us
Tue Feb 18 13:15:37 EST 2003

I'm worried about moving the copying code out of mapfile.c or a least
away from other code
pertaining to a particular object type (i.e. layerObj). When making
changes it means you have
to make sure to remember to change mapfile.c and mapcopy.c, much nicer
to have all the
code together. If mapfile.c is getting bulky I might suggest busting it
into parts like:


with mapfile.c holding code for the main mapObj and the helper
functions. Just a thought.


>>> Daniel Morissette <morissette at dmsolutions.ca> 02/17/03 03:37PM >>>
Sean Gillies wrote:
> In mapscript.i, I was planning to extend layerObj with a copy()
> function which would be used like this Python example:
> map1 = mapObj(mapfile) # contains a layer
> lay1 = map1.getlayer(0)
> lay2 = layerObj(map1)
> lay2 = lay1.copy()

Makes sense.  We would have to apply the same logic in PHP MapScript.

> I'm reluctant to commit my code into mapfile.c since there's ~700
> (including functions to copy other map objects), so I was thinking
> of a new file?  mapcopy.c perhaps?  I could commit this file to CVS
> you want to take a look.

Perhaps a new mapcopy.c is what would make the most sense.  In our
we need this feature by Wednesday for something we are working on, so
the sooner you can commit the better.  Assefa will be the first one to
test this from our end as he integrates it in PHP MapScript.


 Daniel Morissette               morissette at dmsolutions.ca 
 DM Solutions Group              http://www.dmsolutions.ca/ 
Mapserver-dev mailing list
Mapserver-dev at lists.gis.umn.edu 

More information about the mapserver-dev mailing list