I tried to process the following query with PgAdmin III, but it doesn't work and the hint provided doesn't make sense to me :

UPDATE grille_segments_finale SET shipping_cost = 1000000 WHERE st_intersects(grille_segments_finale.geom::LineString, countries.geom::MultiPolygon) is true ;

And I get: ERREUR: le type « linestring » n'existe pas LINE 6: WHERE st_intersects(grille_segments_finale.geom::LineString,... ^

********** Erreur **********

ERREUR: le type « linestring » n'existe pas État SQL :42704 Caractère : 191

Could you help me please? The geometry "LineString" is the right geometry type of my table ("grille_segments_finale") so I can't really find out where I am wrong...

  • 1
    I can't explain why, but leave out out the casts and it probably works: (grille_segments_finale.geom, countries.geom)
    – user30184
    Commented Apr 22, 2016 at 15:56
  • It didn"t work either, so I decided to use the "Spacial query" tool with QGIS to find which parts of "grille_segments_finale" intersect parts of "countries".
    – user37103
    Commented Apr 24, 2016 at 19:02
  • Edit : I think it didn't worked because I asked to find, for each part of "grille_segments_finale", if it was intersecting one specific part of "countries" (for each part of "countries"). But what I want is to know is, for each part of "grille_segments_finale", if it intersects one part of "countries". So maybe it's because of that. The process is running on QGIS and should be over tomorrow so I don't know if I will try to find a new method and to implement it on postgreSQL...
    – user37103
    Commented Apr 24, 2016 at 19:14
  • What do you mean by "It didn't work either"? Did you still get the same error?
    – user30184
    Commented Apr 24, 2016 at 19:48


Your Answer

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

Browse other questions tagged or ask your own question.