[geos-devel] GEOS Exceptions

strk at refractions.net strk at refractions.net
Tue Apr 19 07:29:11 EDT 2005


On Tue, Apr 19, 2005 at 11:39:19AM +0100, Artem Pavlenko wrote:
> Hi strk,
> I've coded a couple of tests:
> 
> data =  usa counties WKT 84Mb  3140 MULTIPOLYGONS (created like shp -> 
> postgis -> wkt)
> 
> 1.  GEOS  WKT  reader
>     real    0m24.642s
>     user    0m24.374s
>     sys     0m0.235s
> 
> 2. Mapnik WKT Reader
>    real    0m15.651s
>    user    0m15.215s
>    sys     0m0.223s
> 
> It is not completely fair test, but shows that boost::spirit is fit the job.

Parsing WKT includes creation of GEOS objects, which is probably
different then creating Mapnik objects.
A fair test would be implementing it in GEOS and see how it compares
with current GEOS wkt parser (CVS version).

> Also new approach requires boost::spirit headers ( no libs ) and you get 
> increase in compile time.
> But, it is more elegant then 'StringTokenizer', easier to maintain (you 
> can add more grammar later) and can be optimized even more.
> 
> What do you reckon? I can send you my test files?
> How is GEOS development process organised?

GEOS development has so far followed JTS development (slowly, very slowly).
Easy of maintainence currently goes with easy of comparison with JTS.

Since JTS is getting its own C/C++ wrappers this might change in the
future letting GEOS take its own path, but I can't tell how long would
it take and if that would be worth the trouble.

BOOST usage has been discussed for other things as well (smart pointers)
and I always tried to avoid dependency on it. Anyway, if it really gives
us a good performance improvement and we can ship required headers with
GEOS we can do it w/out big problems.

> Also, I've noticed that GEOS  using incorrect WKT grammar IMHO  e.g
> POINT(EMPTY)????
> 
> OpenGIS Simple Features Specification rev1.1 EBNF:
> 
> <Point Text> := EMPTY | (<Point>)
> 
> According to ISO/IEC 14977 'EMPTY' means literally empty as far as I 
> understand,
> and valid WKT for point geometry: POINT  or POINT (x y)
> The same applies to the rest.
> 
> Have you looked into that? Am i missing something?

PostGIS parser doesn't also understand 'POINT' but handles 'POINT EMPTY'.
... do you have knowledge of other WKT readers using that interpretation
of OGC EBNF ?

--strk;

> 
> Cheers!
> 
> Artem
> 
> 
> 
> 
> _______________________________________________
> geos-devel mailing list
> geos-devel at geos.refractions.net
> http://geos.refractions.net/mailman/listinfo/geos-devel



More information about the geos-devel mailing list