[postgis-users] How to load Invalid Geometries PostGIS

Stephen Woodbridge woodbri at swoodbridge.com
Sun May 20 10:29:06 PDT 2007


Nicolas Ribot wrote:
> On 5/18/07, Orlando Giovanny Solarte Delgado <orsolarte at gmail.com> wrote:
>>
>> Hi list.
>>
>> I am developing geodatabase with PostGIS 1.2. I am tryin load shapefile
>> using shp2psql method from postgis. However, when I load shapefile
>> using sql. It say: "NOTICE:  Ring Self-intersection", "violates check
>> constraint "geometry_valid_check".
>>
>> Before to load shapefile, I test using chek_geomatry tool from 
>> ArcTools from
>> ArcGIS 9.2, it say: "Valid geometries", but postgis say  "violates check
>> constraint "geometry_valid_check".
>>
>> So. How I can repair may shapefile before load postgis??. There is 
>> some tool
>> different Check and repair Geometrias from ArcGIS?
>>
>> Thanks.
>>
> 
> try using Jump (http://www.vividsolutions.com/jump/) or OpenJump
> (http://openjump.org/) to load the shapefile and check it.
> You will be able to visualize invalid geometries and repair them

You can remove the isvalid() constraint and load them, or create a 
temporary table without the isvalid() constraint. Then try running 
buffer(the_geom, 0.0) and recheck them.

-Steve W



More information about the postgis-users mailing list