Opened 10 years ago

Closed 9 years ago

#2312 closed defect (fixed)

WMS request fails for Drawing Source Layer

Reported by: fare Owned by:
Priority: medium Milestone:
Component: WMS Interface Version: 2.5.0
Severity: major Keywords: wms, fail, bbox
Cc: External ID:


WMS request will fail with following code if request BBOX is outside BBOX that is defined for layer.

- MgFeatureServiceHandler.ProcessOperation() line 83 file
- MgOpGetClassDefinition.Execute() line 153 file
- MgServerDescribeSchema.GetClassDefinition() line 1039 file

This is happening if source layer is Drawing Layer.

For example if layer has bbox that is defined as <Bounds west="6452734.8225" east="6457584.8225" south="4876898.3721" north="4882648.3721" SRS="EPSG:31276" />

the following request will fail (bbox is outside)


Attachments (1)

2312.patch (12.9 KB ) - added by jng 10 years ago.
Proposed patch

Download all attachments as: .zip

Change History (3)

comment:1 by fare, 10 years ago

The problem is in WMSMapUtil.cpp file of HTTPHandler. From line 181 there is comment regarding optimization code. The optimization start with checking that bbox of layer is inside request bbox.


but problem occur if request bbox is shifted or larger that bbox of layer. Code goes to create sptial query filter on data.

But there is no check if it's dealing with Drawing Source layer!!!. Request fails on following line

Ptr<MgClassDefinition> classDef = featureService->GetClassDefinition(fsId,schemaName,className);

since there is no schema or class name for drawing layer.

This section of code needs revisit.

For work around I'm checking mgLayer->GetFeatureClassName() and if it's empty and just continue rendering.(as I understood Drawing Layer doesn't have this set)

if(wmsLayerExtent->Contains(extents) || mgLayer->GetFeatureClassName().empty())

I'm not sure what is proper way to patch this up?

by jng, 10 years ago

Attachment: 2312.patch added

Proposed patch

comment:2 by jng, 9 years ago

Resolution: fixed
Status: newclosed

Fixed trunk (r7752), 2.5 (r7753) and 2.4 (r7754)

Note: See TracTickets for help on using tickets.