[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Maposmatic-dev] Implementing bbox limitation

From: Thomas Petazzoni
Subject: [Maposmatic-dev] Implementing bbox limitation
Date: Mon, 7 Sep 2009 21:34:09 +0200


I started thinking about implementing the bbox limitation. I think the
best way is to ask PostGIS what is the size of the area, and put a
limit on the area size (and not a limit in degrees in one direction or

I'm able with st_area() to compute the area of a POLYGON(): 

select st_area(st_setsrid(st_geomfromtext('POLYGON((44.4883 -1.0901,
44.4883 -1.0637, 44.4778 -1.0901, 44.4778 -1.0637, 44.4883 -1.0901))'),

(the polygon taken as example is the famous Sanguinet bounding box).

Unfortunately the result is in 4002 units, not in square
meters/kilometers. According to, we
should transform the polygon into a SRID using the UTM projection to get
an st_area() in square meters.

However, the UTM projection splits Earth in multiple zones, and
depending on the zone, the SRID is different. And even for France,
there are multiple zones, hence multiple SRID.

What would you suggest to implement this ?

Thomas Petazzoni               
Promouvoir et défendre le Logiciel Libre
Logiciels Libres à Toulouse    

Attachment: signature.asc
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]