Skip to content

Commit

Permalink
Remove ability to customize schema name. #65
Browse files Browse the repository at this point in the history
  • Loading branch information
rustprooflabs committed Jan 28, 2021
1 parent 5b45df1 commit 02b2296
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
6 changes: 1 addition & 5 deletions LOAD-DATA.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,9 @@ osm2pgsql --slim --drop \
## Customize PgOSM

Some behavior can be customized at run time with the use of environment variables.
Current environment variables:

* `PGOSM_SRID`
* `PGOSM_SCHEMA`

> WARNING: Customizing the schema name will cause the `.sql` scripts to break.
* `OSM_DATE` (coming soon!)

To use `SRID 4326` instead of the default `SRID 3857`, set the `PGOSM_SRID`
environment variable before running osm2pgsql.
Expand All @@ -113,7 +110,6 @@ Changes to the SRID are reflected in output printed.
2021-01-08 15:01:15 Database version: 13.1 (Ubuntu 13.1-1.pgdg20.10+1)
2021-01-08 15:01:15 Node-cache: cache=800MB, maxblocks=12800*65536, allocation method=11
Custom SRID: 4326
Default Schema: osm
...
```

10 changes: 1 addition & 9 deletions flex-config/helpers.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
-- helpers.lua provides commonly used functions
-- and sets customizable params, e.g. SRID and schema name.


local srid_env = os.getenv("PGOSM_SRID")
if srid_env then
srid = srid_env
Expand All @@ -11,14 +10,7 @@ else
print('Default SRID: ' .. srid)
end

local schema_env = os.getenv("PGOSM_SCHEMA")
if schema_env then
schema_name = schema_env
print('Custom Schema: ' .. schema_name)
else
schema_name = 'osm'
print('Default Schema: ' .. schema_name)
end
schema_name = 'osm'


-- deep_copy based on copy2: https://gist.github.com/tylerneylon/81333721109155b2d244
Expand Down

0 comments on commit 02b2296

Please sign in to comment.