Search Results

Search found 1 results on 1 pages for 'swatit'.

Page 1/1 | 1 

  • IBM Informix Spatial datablade LIneFromText function

    - by swatit
    Hi Everybody, I am using IBM-Informix for my school project as part of "Informix on-campus" ativity conduted by IBM. I am using spatial datablade to store spatial data. My spatial data table looks like, CREATE TABLE xmlTest (row_id integer NOT NULL,pre integer, post integer,parent integer,tagname varchar(40,1),point ST_POINT); Then I inserted the spatial data into the table. Now I am trying to select the 'Points' lying under given 'polygon', where the co-ordinates of the polygon are dynamic i.e co-ordinates will be decided in the 'select' query. My query is like SELECT v2.* FROM xmlTest v1,xmlTest v2 WHERE ST_Contains(ST_Polygon(ST_LineFromText('linestring (0 0, 22000 0,22000 22000,0 22000,0 0)',5)),ST_Point(v1.pre,v1.post,5)) AND v1.tagname like 'n1' AND ST_Contains(ST_Polygon(ST_LineFromText('linestring (0 0,v1.pre 0,v1.pre v1.post,0 v1.post,0 0 )',5)),ST_Point(v2.pre,v2.post,5)) AND v2.tagname like 'n2' however it is giving me error as "(USE31) - Too few points for geometry type in ST_LineFromText.", in the second linefromtext function. I checked the number of parameters for linestring function, but could not find the source of error. I think,linestring function's parameters should be fixed values and not the variable like in this query. Is it right? Then what is the alternate way, where I can specify my polygon co-ordinates dynamically? or is there any mistake in my query? I hope my question is clear. I appreciate your help!

    Read the article

1