Open tbonfort opened 12 years ago
Author: sdlime Date: 2004/09/03 - 19:04
Block of code added to msGetClass was:
// INLINE features do not work with expressions, allow the classindex
// value set prior to calling this function to carry through.
if(layer->connectiontype == MS_INLINE) {
if(scale > 0) { // verify scale here
if((layer->class[i].maxscale > 0) && (scale > layer->class[i].maxscale))
return -1; // can skip this feature
if((layer->class[i].minscale > 0) && (scale <= layer->class[i].minscale))
return -1; // can skip this feature
}
return shape->classindex;
}
I think it makes sense to do this here. The alternative is to update
msDrawVectorLayer layer NOT to call msGetClass for INLINE layers.
Steve
Author: sgillies@frii.com Date: 2004/09/03 - 19:30
Steve, my InlineFeatureTestCase.testAddPointFeature segfaults after this
commit.
class InlineFeatureTestCase(MapTestCase):
"""tests for issue http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=562"""
def testAddPointFeature(self):
"""adding a point to an inline feature works correctly"""
inline_layer = self.map.getLayerByName('INLINE')
p = mapscript.pointObj(0.2, 51.5)
l = mapscript.lineObj()
self.addPointToLine(l, p)
shape = mapscript.shapeObj(inline_layer.type)
self.addLineToShape(shape, l)
inline_layer.addFeature(shape)
msimg = self.map.draw()
filename = 'testAddPointFeature.png'
msimg.save(filename)
Author: sgillies@frii.com Date: 2004/09/03 - 19:58
steve, problem is that when you reference layer->class[i], i is uninitialized.
Author: sgillies@frii.com Date: 2004/09/04 - 18:23
Marking as critical. Inline layers are broken, can be verified using
shp2img from the mapserver build directory
[sean@lenny mapserver]$ ./shp2img -m tests/test.map -o tests/test.png
Segmentation fault
Author: sdlime Date: 2004/09/04 - 19:56
Oops, stupid on my part. I can't compile on this end (I'm in Brasil) and typo
slipped through. Try it now.
Steve
Author: sgillies@frii.com Date: 2004/09/04 - 20:22
Confirmed.
Reporter: sdlime Date: 2004/09/02 - 23:05