Help creating "corridors"
Regina Obe
lr at pcorp.us
Thu Feb 6 10:37:36 PST 2025
I don’t think OpenStreetMap data is going to help you with constructing flight corridors. As I recall these are 3 dimensional areal paths.
You ultimately need 3 dimensional data – data that has altitude restrictions, and the city point in openstreetmap is pretty useless as I think that might just give you the centroid of a city which does not necessarily align with a corridor path. OpenStreetMap is more focused on visible things on the ground.
I was thinking sources like https://openflights.org or https://opensky-network.org/ might have it but not seeing corridor data there
But if you do have reliable points, to Simon’s point, here is a pseudo coded example
CREATE TABLE corridor_points(name, sort_order, geom geometry(Point, 4326) )
INSERT INTO corridor_points(name, sort_order, geom)
SELECT name, sort_order, ST_Point(longitude, latitude, 4326)
FROM your_table_source;
SELECT name, ST_AsGeoJSON( ST_MakeLine(geom ORDER BY sort_order) ) AS geo_json
FROM corridor_points
GROUP BY name;
To create a true corridor you probably should buffer the line string too and add an altitude something like below which would expand the linestring to 500 meter area and then maybe you add a upper altitude / lower altitude as separate columns for restrictions, but I think even the altitude restrictions change across the corridor so even this might not be enough to assume it’s constant across the corridor
SELECT name, ST_AsGeoJSON( ST_Buffer(ST_MakeLine(geom ORDER BY sort_order)::geography, 500) ) AS geo_json
FROM corridor_points
GROUP BY name;
From: SPDBA <simon at spdba.com.au>
Sent: Thursday, February 6, 2025 3:50 AM
To: Luca Bertoncello <lucabert at lucabert.de>
Cc: postgis-users at lists.osgeo.org
Subject: Re: Help creating "corridors"
Not familiar with these tables.
Someone will answer with an actual solution, but it looks like you need to query the base osm_point to return a set of points in the order of your flight lines. Start with that, then aggregate the resulting points using the reference I sent.
Simon
39 Cliff View Drive, Allens Rivulet, 7150, Tasmania, Australia
(P) 03 62 396 397
(M) 0418 396 391
(W) www.spdba.com.au <http://www.spdba.com.au>
On 6 Feb 2025, at 19:37, Luca Bertoncello <lucabert at lucabert.de <mailto:lucabert at lucabert.de> > wrote:
Am 06.02.2025 09:16, schrieb SPDBA:
Can you show us the structure of a table containing the codes and the
latitude longitude columns? There are ways to take an ordered list of
points in a table and generate linestrings as I assume this is what
you want to do.
I'll use planet_osm_point and planet_osm_polygon from OpenStreetMaps.
See
https://wiki.openstreetmap.org/wiki/OpenStreetBrowser/Database_Structure
For the airfield I think, I'll just search for the city in the both
tables. It must not be soooo precise...
Thanks
Luca Bertoncello
(lucabert at lucabert.de <mailto:lucabert at lucabert.de> )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20250206/70af6237/attachment.htm>
More information about the postgis-users
mailing list