I have a road network table. When I check st_isValid(the_geom)='f', I am getting an error:

NOTICE: IllegalArgumentException: point array must contain 0 or >1 elements


When I open this table in QGIS, I can view and edit the data. However, its attribute table is blank, while in PostGIS, the table has data.

What is the problem?

  • 1
    Did you try st_makeValid(the_geom)? This function probably will help you. (postgis 2.0 function) – Sergio Sep 12 '14 at 9:39
  • no I have postgis 1.0 – Sreesha Sep 12 '14 at 13:14

If you don't have postgis 2.0 you can do this: -use qgis "check geometry validity function" find the error and correct it manually OR -import your layer in grass using qgis plugin. Grass import tool uses v.clean for cleaning an rebuilding topology, so your layer will be correct automatically. After that you have to load your new grass layer in qgis and re-export it in postgis.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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