Opened 14 years ago

Closed 14 years ago

#1193 closed defect (fixed)

Select Within cause a 500 error in the browser

Reported by: hubu Owned by: hubu
Priority: medium Milestone: 2.2
Component: General Version: 2.1.0
Severity: trivial Keywords: Select-Within
Cc: External ID: 1246728

Description

  1. Open a basic weblayout in the Firefox 3.5.
  2. Select some features (including polygon and multipolygon or line/linestring).
  3. The FF encounter a 500 Internal server error.

Attachments (1)

Fix SelectWithin 500 error.patch (6.2 KB ) - added by hubu 14 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 by chrisclaydon, 14 years ago

Patch review: This solution seems a little restrictive, unless the server-side code is unable to support queries on properly created multi-geometries. And it seems strange that the original code would have been written explicitly to handle MultiPolygon, CurvePolygon and MultiCurvePolygon types if this were not the case.

Would it be possible to check the type on each feature, and create a multipolygon as before if each and every one is a polygon, create a multi-geometry if they are a mix of supported types, and either skip unsupported types such as linestrings, or break out and return null if they are encountered.

comment:2 by hubu, 14 years ago

Thanks Chris! I have updated the patch according to your comments.

In this patch, I check the type for each feature. And create a multipolygon if there are only polygon. If there are unsupported types, continue and go to the next one. For mixed supported types, create a multi-geometry.

BTW, the MG Server, the render service doesn't support QueryFeatures for the multi-geometry. So If we create a multi-polygoemetry, QueryFeatures will return null, and everything in the map will be cleared.

comment:3 by chrisclaydon, 14 years ago

The patch now looks ok to me. I'm still a little worried about the lack of support for multi-geometries. If the features include a poly-polygon, does the select within function fail? Curve-polygon and multi-curve polygon seem like they'd be much less common. Do you have any datasets that include them?

I think you can probably submit the patch as-is. But we may need to address related defects, if they come up, in the server code.

comment:4 by brucedechant, 14 years ago

Fix submitted to trunk - r4452

comment:5 by brucedechant, 14 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.