[postgis-users] Intersection errors out with null directed edge

Paul Ramsey pramsey at refractions.net
Fri Sep 14 09:57:45 PDT 2007


Chris,

select uniqid from thetable where not st_isvalid(the_geom);

And if you're feeling lucky (punk), try to "fix" them with:

update thetable set the_geom = st_buffer(the_geom,0.0) where not 
st_isvalid(the_geom);

Paul

Chris Hermansen wrote:
> Hello again;
> 
> So with GEOS 3.0.0RC4 the problem now becomes:
> 
> TopologyException: EdgeRing::computePoints: found null Directed Edge
> 
> I believe there is in fact something wrong with the data.  However the
> TopologyException does not identify the source of the problem.
> 
> In looking through the mailing list archives, I see questions around
> this issue have come up in the past (eg September 2006).  I don't see
> anyone suggesting ideas on how to find the offending data elements.
> 
> Also, trolling through google doesn't seem to turn up anything.
> 
> Does anyone have any ideas on how to explore the data to look for
> problems such as this.
> 
> Thanks in advance!
> 
> On Thu, 2007-13-09 at 11:31 +0200, Andreas Laggner wrote:
>> Hi Chris,
>>
>> as i had this errors i installed postgis with GEOS 3.0, and such an 
>> errors never occurs again! I am not sure, but postgis 1.3.1 can be built 
>> with GEOS 2.2 too......just run the query select postgis_full_version(); 
>> and check your version of GEOS.
>>
>> cheers      Andreas
>>
>>
>> Chris Hermansen schrieb:
>>> Hi folks;
>>>
>>> I had this problem today:
>>>
>>> AssertionFailedException: EdgeRing::computePoints: found null Directed
>>> Edge
>>>
>>> I see in the archives that there are others who have suffered this, back
>>> in 2006 and then in 2005, but there don't seem to be any offerings of
>>> techniques to either repair the code or the data - and based on the
>>> error above, I'm not sure which is ultimately at fault.
>>>
>>> Does anyone have some more up-to-date thought on this?
>>>
>>> I'm running postgis-1.3.1 on Ubuntu with the packaged postgresql-8.2
>>> installed.
>>>
>>> Thanks in advance!
>>>   
>>


-- 

   Paul Ramsey
   Refractions Research
   http://www.refractions.net
   pramsey at refractions.net
   Phone: 250-383-3022
   Cell: 250-885-0632



More information about the postgis-users mailing list