maposmatic-dev
[Top][All Lists]
Advanced

[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

Hello,

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
another).

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))'),
4002));
       st_area        
----------------------
 4.68375338513738e-17

(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
http://www.nabble.com/Postgis-Area-size-problem-td15988337.html, 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
-- 
Thomas Petazzoni                         http://thomas.enix.org
Promouvoir et défendre le Logiciel Libre http://www.april.org
Logiciels Libres à Toulouse              http://www.toulibre.org

Attachment: signature.asc
Description: PGP signature


reply via email to

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