RE: Help creating "corridors"
"Regina Obe" <[email protected]>
| Newsgroups | gmane.comp.gis.postgis |
|---|---|
| Message-ID | <[email protected]> |
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 <[email protected]> Sent: Thursday, February 6, 2025 3:50 AM To: Luca Bertoncello <[email protected]> Cc: [email protected] 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 <[email protected] <mailto:[email protected]> > 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 ([email protected] <mailto:[email protected]> )