Opened 15 years ago
Closed 15 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
- Open a basic weblayout in the Firefox 3.5.
- Select some features (including polygon and multipolygon or line/linestring).
- The FF encounter a 500 Internal server error.
Attachments (1)
Change History (6)
comment:1 by , 15 years ago
by , 15 years ago
Attachment: | Fix SelectWithin 500 error.patch added |
---|
comment:2 by , 15 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 , 15 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:5 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
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.