-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tables for platform members and ref
- Loading branch information
1 parent
6d52304
commit c944e25
Showing
3 changed files
with
64 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
require 'utils' | ||
|
||
local extract_conditions = { | ||
{ | ||
['railway'] = { | ||
'platform_edge' | ||
} | ||
} | ||
} | ||
|
||
-- Create table that contains members of platforms | ||
local platforms_members_table = osm2pgsql.define_table({ | ||
name = "platforms_members", | ||
ids = { | ||
type = 'any', | ||
id_column = 'osm_id', | ||
type_column = 'osm_type' | ||
}, | ||
columns = { | ||
{ column = 'tags', type = 'jsonb', not_null = true }, | ||
{ column = 'geom', type = 'geometry', not_null = true, projection = 4326 } | ||
} | ||
}) | ||
|
||
|
||
function extract_platforms_members(object, osm_type) | ||
return extract_by_conditions_to_table(object, osm_type, extract_conditions, platforms_members_table) | ||
end |