Quantcast
Channel: PostGIS polygon edge analysis (orientation, edge length) - Geographic Information Systems Stack Exchange
Viewing all articles
Browse latest Browse all 2

PostGIS polygon edge analysis (orientation, edge length)

$
0
0

I am rather new to the world of GIS and especially PostGIS, so please excuse me if the answer seems evident...

I would like to do analysis on a number of buildings. One thing I am interested in is their facade surfaces along with the respective orientation. As illustrated in the picture below, I would like to have the length and (normal) orientation of all edges in a series of polygons. In the example I highlighted only one surface.

enter image description here

A result table could look like this:

building_id | edge_id | orientation | edge_length-------------------------------------------------      1     |    1    |     315     |    10.0      1     |    2    |      45     |     7.0      1     |   ...   |     ...     |     ...

However, I am not sure if it is a smart way to store the result for further processing (e.g. calculate distance from edge to next building, etc.). So my question is twofold:

  1. Is there an efficient PostGIS function that can analyze a polygon's edges? In case there is no native PostGIS function I would alternatively be interested in an Python-based approach.
  2. What would be a smart way to store the result in a PostGIS table, since the polygons may have different numbers of edges?

Viewing all articles
Browse latest Browse all 2

Trending Articles