[fusion-trac] #393: Exception in FDO component when using feature information (Digitize Polygon)

Fusion trac_fusion at osgeo.org
Tue Apr 20 06:08:04 EDT 2010


#393: Exception in FDO component when using feature information (Digitize
Polygon)
---------------------+------------------------------------------------------
 Reporter:  liuar    |         Owner:  madair 
     Type:  defect   |        Status:  new    
 Priority:  P2       |     Milestone:  Future 
Component:  Widgets  |       Version:  1.1.1  
 Severity:  Major    |    Resolution:         
 Keywords:           |   External_id:  1313209
    State:  New      |       Browser:  All    
       Os:  All      |  
---------------------+------------------------------------------------------
Comment (by liuar):

 This defect occus on oracle and sql spatial providers.[[BR]]
 [[BR]]
 The reason of the defect is in featureinfomain.php,
 fuction OnPolyonDigitized(polygon)[[BR]]

 in this function, the digitized geometry will be set as geometry fiter but
 the geometry text which describes the polygon is not a valid polygon,
 because the polygon is not closed.[[BR]]

 {{{
         function OnPolyonDigitized(polygon) {
             var points = [];
             for (var i = 0; i < polygon.Count; i++) {
                 points.push(polygon.Point(i).X+' '+polygon.Point(i).Y);
             }
             var geomText = 'POLYGON(('+points.join(',')+'))';

             SetSpatialFilter(geomText);
         }
 }}}
 [[BR]]

 to fix this defect we just need to make the geometry text close[[BR]]


 {{{
        function OnPolyonDigitized(polygon) {
             var points = [];
             for (var i = 0; i < polygon.Count; i++) {
                 points.push(polygon.Point(i).X+' '+polygon.Point(i).Y);
             }
             var geomText = 'POLYGON(('+points.join(',')+ ','+
 polygon.Point(0).X +' '+ polygon.Point(0).Y +'))';

             SetSpatialFilter(geomText);
         }

 }}}

-- 
Ticket URL: <http://trac.osgeo.org/fusion/ticket/393#comment:1>
Fusion <http://trac.osgeo.org/fusion>
Fusion is a web-mapping application development framework for MapServer and MapGuide OS.


More information about the fusion-trac mailing list