[geos-devel] troubles understanding GEOS

Markus Schaber schabi at logix-tt.com
Wed Nov 29 04:18:22 EST 2006


Hi, Tobias,

Tobias Nothdurft wrote:

>> Databases provide you with a higher layer of abstraction. With PostGIS,
>> you can e. G. load all your linestrings in a table, create an
>> geometrical index on it, and then easily and efficiently fetch all
>> linestrings in a specific area with a query like:
>>
>> SELECT * FROM mytable WHERE the_geom && 'BOX(1 2,3 4)'::box2d;
> 
> That sounds nice. 
> 
> So I can use a SQL commando like the above instead of using a quadtree?

When you use PostGIS, yes.

You've got the power and drawbacks of a full relational database.

The query above simply fetches all geometries whose bounding box
overlaps with the given region. More complex queries and operations are
possible.

PostGIS includes a GIST-based R-Tree implementation, so you can add a
spatial index to your data table which speeds up the query, especially
when only a small fraction of the data is actually matching your condition.

HTH,
Markus
-- 
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf.     | Software Development GIS

Fight against software patents in Europe! www.ffii.org
www.nosoftwarepatents.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://lists.osgeo.org/pipermail/geos-devel/attachments/20061129/c7c6fef6/signature.bin


More information about the geos-devel mailing list