I'm developing a GIS solution using Postgis database and geoserver as web map server. The solution to develop will analyzes the defects (as a polygon) and process parameters values (as a linestring) on the surface of steel sheets.

The number of the collected process parameters is about 100.

Considering the process parameters, which is the best way to store them considering that I have to apply some filter on row data before the analysis stage?

  1. Their values as they are (number) building at run time the linestring for the layer applying functions ST_makeline(ST_makepoint(...)). In this way I can filter raw data before build the points and linestring.

  2. Their values as a points over the length of the coil point(0, parVal) point(1, parVal) and then calling the ST_Makeline function. In this way I can filter points using ST_X in where clause before applying the ST_makeline() function.

  3. Store directly linestring. In this way I can delete some points from the already build line string. (Is this possible?)

Of course there is difference in the execution time of the query among the three solution.

1 Answer 1


Postgresql supports functional indicies, so there is a way to combine 1&3 without that much performance sacrified


  • Hi Atlefren! In which way I can use functional indicies? The query to apply in the case to build the linestring starting from the raw data is the following: "select ST_makeline(st_makepoint(posX, param)) from table where id = 111111". I cannot create an index that uses aggregation functions like makepoint and makeline. Thanks
    – nko
    May 17, 2013 at 14:45
  • Any suggestion?
    – nko
    May 20, 2013 at 7:41
  • 1
    Oh, then I am not sure, i guess that if functional indicies does not support aggregate functions then this option is out. Sorry for the noise..
    – atlefren
    May 21, 2013 at 9:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.