[Gdal-dev] GEOS precision model?

Ari Jolma ari.jolma at tkk.fi
Tue Jun 26 16:24:11 EDT 2007


Howard Butler kirjoitti:
> Ari,
>
> I've had similar problems, and I think there's been other GEOS users 
> with the same.  The options are quite limited however:
> -- Make sure you are using the robust operations (see the C++ header 
> files for details on what needs to be called) in the latest release 
> candidate.  I don't think OGR uses these by default right now.
> -- Tweak your precision models until you find something that works 
> consistently and good enough.
> -- Use a computational geometry library that does real math like CGAL 
> or LEDA (I ended up taking this option).
> -- Inject QD into GEOS to bump the precision up

In fact I'd be more keen on taking it down, since these points are 
really the same (they are really points in the real world for heaven's 
sake!), one's X is 3780012.001 and the other's 3780011.999 etc. for some 
reason. I think it's pointless to try to extract the minuscule polygons 
at least in this case. Maybe the simplest approach would be to first 
pre-process the input files to some specific precision (7 digits in my 
case I believe) - or even implement the rounding filter into the main app.

Thanks for the suggestions.

Ari


> and at a likely cost in performance 
> <http://crd.lbl.gov/~dhbailey/mpdist/>.  I don't know how challenging 
> this would be, but I suspect others would be interested in it.
>
> Howard
>
> On Jun 26, 2007, at 11:18 AM, Ari Jolma wrote:
>
>> I'm doing some rather heavy duty geocomputation with OGR (via Perl 
>> module Geo::OGR of course), mainly intersections. I run into a 
>> problem, where GEOS throws a topology exception since the vertices of 
>> the two geometries are very close to each other (6 digits same, then 
>> differences).
>>
>> I'm no GEOS guru, but it seems there is a possibility to improve the 
>> robustness of overlay operations with precision models(?). I think 
>> they could be useful for me now.
>>
>> Is there a way to take advantage of what GEOS offers (and what does 
>> it really offer, if I could have a quick lesson...) via OGR? And if 
>> not, would it be difficult to hack it in?
>>
>> Regards,
>>
>> Ari
>>
>> _______________________________________________
>> Gdal-dev mailing list
>> Gdal-dev at lists.maptools.org
>> http://lists.maptools.org/mailman/listinfo/gdal-dev
>


-- 
Prof. Ari Jolma
Geoinformaatio- ja paikannustekniikka / Geoinformation and positioning
Teknillinen Korkeakoulu / Helsinki University of Technology
tel: +358 9 451 3886 address: POBox 1200, 02015 TKK, Finland
Email: ari.jolma at tkk.fi URL: http://www.tkk.fi/~jolma





More information about the Gdal-dev mailing list