Ticket #40 (closed defect: invalid)

Opened 17 months ago

Last modified 16 months ago

sql request to Postgis generated by a GetFeature request returns an error

Reported by: nsavard Owned by:
Priority: blocker Version: SVN
Keywords: wfs,getfeature,precision Cc: adube, assefa
Triage Stage: Unreviewed State of Approval: Unnecessary
Attached Patches: None Complexity: Unknown
Compatibility: Unknown Specification: Unnecessary

Description

The sql request to Postgis built by Tinyows after a Get Feature? request is received, generates the following error: "ERROR: Precision out of range 1..15". The query uses the st_asgml(gml version, geometry name, precision) function. The wfs_retrieve_sql_request_select() function in wfs_get_feature.c set the precision to o->meter_precision which is set in turn to zero in ows_init() function.

select st_asgml(2,polygonproperty,0) from polygons;

Solution: Set the precision to 1.

Change History

Changed 16 months ago by nsavard

  • status changed from new to closed
  • resolution set to invalid

Answered by Yewondwossen and Olivier:

Check the thread here which mention this issue: http://lists.maptools.org/pipermail/tinyows-dev/2009-April/000103.html

if you are using 1.3.x version, you could do the following patch until we upgrade to 1.4:

--- wfs_get_feature.c   (revision 132)
+++ wfs_get_feature.c   (working copy)
@@ -478,7 +478,8 @@
                 else
                     buffer_add_int(select, o->degree_precision);

-                buffer_add_str(select, ", 1) AS \"");
+                //buffer_add_str(select, ", 1) AS \"");
+                buffer_add_str(select, ") AS \"");
                 buffer_copy(select, an->key);
                 buffer_add_str(select, "\" ");
             } 
Note: See TracTickets for help on using tickets.