RFC 14 out for comment...

Steve Lime Steve.Lime at DNR.STATE.MN.US
Mon Apr 10 21:19:46 EDT 2006


Steve: When I originally wrote a solution I added the relativeto parameter to a featureListNodeObj (or something like that) which is used in a linked-list. Presently it only has 1 member (besides pointers), a shapeObj. Adding the relativeto parameter means we would have to:

  - change the feature list API to pass the relativeto parameter
  - change the 'add' layer method to also take that parameter (could set a default)

or

  - expose the feature list in the layer object to mapscript

I don't like either alternative. Using the shapeObj would hide all of this. Adding the parameter to the shapeObj doesn't seem too big a deal since it already carries classIndex and annotation text, so it's more than a collection of points already. 

In perl MapScript you'd do:

  $shape = new mapscript::shapeObj(-1);

  ... fill the shapeObj ...

  $shape->{relativeto} = $mapscript::MS_LL; # if necessary
  $layer->add($shape);

The other benefit to this approach is that since the shapeObj carries the relativeto value then simply drawing it would work (i.e. $shape->draw(...)).

As for testing, Sean's Python tests already test this a bit by making sure copies are complete. The need to modify mapcopy.c is not mentioned in the RFC. I'll fix that. The output of such a modification could be added to Franks more qualitative tests too.

Steve 

>>> Stephen Woodbridge <woodbri at swoodbridge.com> 04/10/06 6:34 PM >>>
Hi Steve,

Thanks for the RFC. A couple of questions:

Can up update it and add what would change from a mapscript perspective?

I'm not sure I understand what the alternative approaches would be or 
what the feature/benefits/issues of them might be. Then again, I'm not 
sure I need to know :) but it would likely generate more discussion to 
compare and contrast them.

Does this need to be added to the test plans? This is small enough that 
it might not, but regardless, you might want to note that you thought 
about it in the RFC for completeness.

Given what I have read, and the fact that it presumably does what was 
requested in the bug ...  +1 from a non voter.

-Steve W

Steve Lime wrote:
> Hi all: I posted a new RFC for supporting relative coordinates (primarily for inline features)
> to the mapserver website. Comments would be appreciated. The actual computations
> are trivial to make this work. The issues are more implementation related- hanging a
> new parameter off a shapeObj vs something else and so on...
> 
> I have coded up one solution and the end result is very useful.
> 
> Steve
> 



More information about the mapserver-dev mailing list