[postgis-devel] st_isvalid() does not return warning message

Blake Crosby me at blakecrosby.com
Sat Sep 12 06:43:20 PDT 2009


Hello,

I'm trying to figure out why some of my geometries are not valid.

Take the following geo:

POLYGON((-111.066666666667 56.0666666666667,-110.3
56.5,-107.916666666667 56.5,-106.833333333333
56.1166666666667,-106.833333333333 54.2833333333333,-107
54.2,-108.616666666667 54.2,-108.616666666664
54.1999999999825,-108.600299787004 54.2475512622716,-108.58790183346
54.29551368139,-108.579516153242 54.3437730783836,-108.575176879509
54.392214173427,-108.574908719816 54.4407208506564,-108.578726762226
54.4891764287016,-108.586636300775 54.5374639364321,-108.598632681986
54.5854663933806,-108.614701174154 54.6330670942644,-108.634816861126
54.6801498969695,-108.658944562284 54.7265995133165,-108.683333333331
54.766666666652,-108.683333333333 54.7666666666667,-108.433333333333
54.9333333333333,-108.433333333333 55.3333333333333,-108.433333333333
56.0666666666667,-111.066666666667 56.0666666666667))

st_issimple() returns true, while st_isvalid() returns false. The
st_isvalid() documentation states that the PGSQL Warning message will
let me know why its invalid, but it does not:

flightplan=> select st_isvalid(geometry) from airspace where id='238';
  st_isvalid
------------
  f

Any way I can figure out why this geometry isn't valid? Postgis version 1.3:

flightplan=> select postgis_version();
             postgis_version
---------------------------------------
  1.3 USE_GEOS=1 USE_PROJ=1 USE_STATS=1




More information about the postgis-devel mailing list