Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 83 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# PgOSM Flex Community Code of Conduct

## Why have a Code of Conduct?

Online communities include people from many different backgrounds. The PgOSM Flex contributors are committed to providing a friendly, safe and welcoming environment for all, regardless of age, disability, gender, nationality, ethnicity, religion, sexuality, or similar personal characteristic.

The first goal of the Code of Conduct is to specify a baseline standard of behavior so that people with different social values and communication styles can talk about PgOSM Flex effectively, productively, and respectfully.

The second goal is to provide a mechanism for resolving conflicts in the community when they arise.

The third goal of the Code of Conduct is to make our community welcoming to people from different backgrounds. Diversity is critical to the project; for PgOSM Flex to be successful, it needs contributors and users from all backgrounds.

With that said, a healthy community must allow for disagreement and debate. The Code of Conduct is not a mechanism for people to silence others with whom they disagree.

## Where does the Code of Conduct apply?

If you participate in or contribute to the PgOSM Flex ecosystem in any way, you are encouraged to follow the Code of Conduct while doing so.

Explicit enforcement of the Code of Conduct applies to the PgOSM Flex GitHub project and code reviews.

## Values

These are the values to which people in the PgOSM Flex should aspire.

- Be friendly and welcoming
- Be patient
- Remember that people have varying communication styles and that not everyone is using their native language. (Meaning and tone can be lost in translation.)
- Be thoughtful
- Productive communication requires effort. Think about how your words will be interpreted.
- Remember that sometimes it is best to refrain entirely from commenting.
- Be respectful
- In particular, respect differences of opinion.
- Be charitable
- Interpret the arguments of others in good faith, do not seek to disagree.
- When we do disagree, try to understand why.
- Avoid destructive behavior:
- Derailing: stay on topic; if you want to talk about something else, start a new conversation.
- Unconstructive criticism: don't merely decry the current state of affairs; offer—or at least solicit—suggestions as to how things may be improved.
- Snarking (pithy, unproductive, sniping comments)
- Discussing potentially offensive or sensitive issues unless directly technically relevant; this all too often leads to unnecessary conflict.
- Microaggressions: brief and commonplace verbal, behavioral and environmental indignities that communicate hostile, derogatory or negative slights and insults to a person or group.

People are complicated. You should expect to be misunderstood and to misunderstand others; when this inevitably occurs, resist the urge to be defensive or assign blame. Try not to take offense where no offense was intended. Give people the benefit of the doubt. Even if the intent was to provoke, do not rise to it. It is the responsibility of *all parties* to de-escalate conflict when it arises.

## Unwelcome behavior

These actions are explicitly forbidden in PgOSM Flex spaces:

- Insulting, demeaning, hateful, or threatening remarks.
- Discrimination based on age, disability, gender, nationality, ethnicity, religion, sexuality, or similar personal characteristic.
- Bullying or systematic harassment.
- Revealing private information about other participants without explicit permission ("doxxing").
- Unwelcome sexual advances.
- Incitement to any of these.

## Moderation

The PgOSM Flex spaces are not free speech venues; they are for discussion about PgOSM Flex.

When using the PgOSM Flex spaces you should act in the spirit of the values. If you conduct yourself in a way that is explicitly forbidden by the CoC, you will be warned and asked to stop. If you do not stop, you will be removed from our community spaces temporarily. Repeated, willful breaches of the CoC will result in a permanent ban.

## Reporting issues

The PgOSM Flex maintainers are responsible for handling conduct-related issues. Their goal is to de-escalate conflicts and try to resolve issues to the satisfaction of all parties.

If you encounter a conduct-related issue, you should report it to the maintainers by sending them [all an email](mailto:support@rustprooflabs.com). In the event that you wish to make a complaint against a maintainer, you may instead contact the other maintainers.

**Note that the goal of the Code of Conduct and the maintainers is to resolve conflicts in the most harmonious way possible.** We hope that in most cases issues may be resolved through polite discussion and mutual agreement. Bans and other forceful measures are to be employed only as a last resort.

Changes to the Code of Conduct should be proposed as pull requests.

## Summary

- Treat everyone with respect and kindness.
- Be thoughtful in how you communicate.
- Don’t be destructive or inflammatory.
- If you encounter an issue, please mail the maintainers.

## Acknowledgements

This document is based on the [OpenStreetMap Carto Code of Conduct](https://github.com/gravitystorm/openstreetmap-carto/blob/master/CODE_OF_CONDUCT.md), which in turn has parts derived from the Code of Conduct documents of the Go Community, Django, FreeBSD, and Rust projects.

This document is licensed under the Creative Commons Attribution 3.0 License.
14 changes: 7 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM postgis/postgis:14-3.2
FROM postgis/postgis:15-master

LABEL maintainer="PgOSM Flex - https://github.com/rustprooflabs/pgosm-flex"

Expand All @@ -10,15 +10,15 @@ RUN apt-get update \
git make cmake g++ \
libboost-dev libboost-system-dev \
libboost-filesystem-dev libexpat1-dev zlib1g-dev \
libbz2-dev libpq-dev libproj-dev lua5.2 liblua5.2-dev \
libbz2-dev libpq-dev libproj-dev lua5.4 liblua5.4-dev \
python3 python3-distutils \
postgresql-server-dev-14 \
postgresql-server-dev-15 \
curl unzip \
&& rm -rf /var/lib/apt/lists/*

RUN wget https://luarocks.org/releases/luarocks-3.8.0.tar.gz \
&& tar zxpf luarocks-3.8.0.tar.gz \
&& cd luarocks-3.8.0 \
RUN wget https://luarocks.org/releases/luarocks-3.9.1.tar.gz \
&& tar zxpf luarocks-3.9.1.tar.gz \
&& cd luarocks-3.9.1 \
&& ./configure && make && make install

RUN curl -o /tmp/get-pip.py https://bootstrap.pypa.io/get-pip.py \
Expand All @@ -33,7 +33,7 @@ WORKDIR /tmp
RUN git clone --depth 1 --branch $OSM2PGSQL_BRANCH https://github.com/openstreetmap/osm2pgsql.git \
&& mkdir osm2pgsql/build \
&& cd osm2pgsql/build \
&& cmake .. \
&& cmake .. -D USE_PROJ_LIB=6 \
&& make -j$(nproc) \
&& make install \
&& apt remove -y \
Expand Down
52 changes: 26 additions & 26 deletions flex-config/style/amenity.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ tables.amenity_point = osm2pgsql.define_table({
schema = schema_name,
ids = { type = 'node', id_column = 'osm_id' },
columns = {
{ column = 'osm_type', type = 'text', not_null = true },
{ column = 'osm_subtype', type = 'text' },
{ column = 'name', type = 'text' },
{ column = 'osm_type', type = 'text', not_null = true },
{ column = 'osm_subtype', type = 'text' },
{ column = 'name', type = 'text' },
{ column = 'housenumber', type = 'text'},
{ column = 'street', type = 'text' },
{ column = 'city', type = 'text' },
{ column = 'street', type = 'text' },
{ column = 'city', type = 'text' },
{ column = 'state', type = 'text'},
{ column = 'postcode', type = 'text'},
{ column = 'address', type = 'text', not_null = true},
{ column = 'wheelchair', type = 'text'},
{ column = 'wheelchair_desc', type = 'text'},
{ column = 'geom', type = 'point' , projection = srid},
{ column = 'geom', type = 'point', projection = srid, not_null = true},
}
})

Expand All @@ -27,18 +27,18 @@ tables.amenity_line = osm2pgsql.define_table({
schema = schema_name,
ids = { type = 'way', id_column = 'osm_id' },
columns = {
{ column = 'osm_type', type = 'text', not_null = true },
{ column = 'osm_subtype', type = 'text' },
{ column = 'name', type = 'text' },
{ column = 'osm_type', type = 'text', not_null = true },
{ column = 'osm_subtype', type = 'text' },
{ column = 'name', type = 'text' },
{ column = 'housenumber', type = 'text'},
{ column = 'street', type = 'text' },
{ column = 'city', type = 'text' },
{ column = 'street', type = 'text' },
{ column = 'city', type = 'text' },
{ column = 'state', type = 'text'},
{ column = 'postcode', type = 'text'},
{ column = 'address', type = 'text', not_null = true},
{ column = 'wheelchair', type = 'text'},
{ column = 'wheelchair_desc', type = 'text'},
{ column = 'geom', type = 'linestring' , projection = srid},
{ column = 'geom', type = 'linestring', projection = srid, not_null = true},
}
})

Expand All @@ -48,18 +48,18 @@ tables.amenity_polygon = osm2pgsql.define_table({
schema = schema_name,
ids = { type = 'area', id_column = 'osm_id' },
columns = {
{ column = 'osm_type', type = 'text', not_null = true },
{ column = 'osm_subtype', type = 'text' },
{ column = 'name', type = 'text' },
{ column = 'osm_type', type = 'text', not_null = true },
{ column = 'osm_subtype', type = 'text' },
{ column = 'name', type = 'text' },
{ column = 'housenumber', type = 'text'},
{ column = 'street', type = 'text' },
{ column = 'city', type = 'text' },
{ column = 'street', type = 'text' },
{ column = 'city', type = 'text' },
{ column = 'state', type = 'text'},
{ column = 'postcode', type = 'text'},
{ column = 'address', type = 'text', not_null = true},
{ column = 'wheelchair', type = 'text'},
{ column = 'wheelchair_desc', type = 'text'},
{ column = 'geom', type = 'multipolygon' , projection = srid},
{ column = 'geom', type = 'multipolygon', projection = srid, not_null = true},
}
})

Expand Down Expand Up @@ -124,7 +124,7 @@ function amenity_process_node(object)
local wheelchair = object.tags.wheelchair
local wheelchair_desc = get_wheelchair_desc(object.tags)

tables.amenity_point:add_row({
tables.amenity_point:insert({
osm_type = osm_types['osm_type'],
osm_subtype = osm_types['osm_subtype'],
name = name,
Expand All @@ -136,7 +136,7 @@ function amenity_process_node(object)
address = address,
wheelchair = wheelchair,
wheelchair_desc = wheelchair_desc,
geom = { create = 'point' }
geom = object:as_point()
})

end
Expand Down Expand Up @@ -165,7 +165,7 @@ function amenity_process_way(object)
local wheelchair_desc = get_wheelchair_desc(object.tags)

if object.is_closed then
tables.amenity_polygon:add_row({
tables.amenity_polygon:insert({
osm_type = osm_types['osm_type'],
osm_subtype = osm_types['osm_subtype'],
name = name,
Expand All @@ -177,10 +177,10 @@ function amenity_process_way(object)
address = address,
wheelchair = wheelchair,
wheelchair_desc = wheelchair_desc,
geom = { create = 'area' }
geom = object:as_polygon()
})
else
tables.amenity_line:add_row({
tables.amenity_line:insert({
osm_type = osm_types['osm_type'],
osm_subtype = osm_types['osm_subtype'],
name = name,
Expand All @@ -192,7 +192,7 @@ function amenity_process_way(object)
address = address,
wheelchair = wheelchair,
wheelchair_desc = wheelchair_desc,
geom = { create = 'line' }
geom = object:as_linestring()
})
end

Expand All @@ -215,7 +215,7 @@ function amenity_process_relation(object)
local wheelchair = object.tags.wheelchair
local wheelchair_desc = get_wheelchair_desc(object.tags)

tables.amenity_polygon:add_row({
tables.amenity_polygon:insert({
osm_type = osm_types['osm_type'],
osm_subtype = osm_types['osm_subtype'],
name = name,
Expand All @@ -227,7 +227,7 @@ function amenity_process_relation(object)
address = address,
wheelchair = wheelchair,
wheelchair_desc = wheelchair_desc,
geom = { create = 'area' }
geom = object:as_multipolygon()
})

end
Expand Down
42 changes: 21 additions & 21 deletions flex-config/style/building.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ tables.building_point = osm2pgsql.define_table({
schema = schema_name,
ids = { type = 'node', id_column = 'osm_id' },
columns = {
{ column = 'osm_type', type = 'text' , not_null = true},
{ column = 'osm_subtype', type = 'text'},
{ column = 'name', type = 'text' },
{ column = 'levels', type = 'int'},
{ column = 'osm_type', type = 'text' , not_null = true},
{ column = 'osm_subtype', type = 'text'},
{ column = 'name', type = 'text' },
{ column = 'levels', type = 'int'},
{ column = 'height', sql_type = 'numeric'},
{ column = 'housenumber', type = 'text'},
{ column = 'street', type = 'text' },
{ column = 'city', type = 'text' },
{ column = 'street', type = 'text' },
{ column = 'city', type = 'text' },
{ column = 'state', type = 'text'},
{ column = 'postcode', type = 'text'},
{ column = 'address', type = 'text', not_null = true},
{ column = 'wheelchair', type = 'text'},
{ column = 'wheelchair_desc', type = 'text'},
{ column = 'operator', type = 'text'},
{ column = 'geom', type = 'point', projection = srid},
{ column = 'geom', type = 'point', projection = srid, not_null = true},
}
})

Expand All @@ -32,21 +32,21 @@ tables.building_polygon = osm2pgsql.define_table({
schema = schema_name,
ids = { type = 'way', id_column = 'osm_id' },
columns = {
{ column = 'osm_type', type = 'text' , not_null = true},
{ column = 'osm_subtype', type = 'text'},
{ column = 'name', type = 'text' },
{ column = 'levels', type = 'int'},
{ column = 'height', sql_type = 'numeric'},
{ column = 'osm_type', type = 'text', not_null = true},
{ column = 'osm_subtype', type = 'text'},
{ column = 'name', type = 'text' },
{ column = 'levels', type = 'int'},
{ column = 'height', sql_type = 'numeric'},
{ column = 'housenumber', type = 'text'},
{ column = 'street', type = 'text' },
{ column = 'city', type = 'text' },
{ column = 'street', type = 'text' },
{ column = 'city', type = 'text' },
{ column = 'state', type = 'text'},
{ column = 'postcode', type = 'text'},
{ column = 'address', type = 'text', not_null = true},
{ column = 'wheelchair', type = 'text'},
{ column = 'wheelchair_desc', type = 'text'},
{ column = 'operator', type = 'text'},
{ column = 'geom', type = 'multipolygon', projection = srid},
{ column = 'geom', type = 'multipolygon', projection = srid, not_null = true},
}
})

Expand Down Expand Up @@ -148,7 +148,7 @@ function building_process_node(object)
local height = parse_to_meters(object.tags['height'])
local operator = object.tags.operator

tables.building_point:add_row({
tables.building_point:insert({
osm_type = osm_types.osm_type,
osm_subtype = osm_types.osm_subtype,
name = name,
Expand All @@ -163,7 +163,7 @@ function building_process_node(object)
levels = levels,
height = height,
operator = operator,
geom = { create = 'point' }
geom = object:as_point()
})


Expand Down Expand Up @@ -197,7 +197,7 @@ function building_process_way(object)
local height = parse_to_meters(object.tags['height'])
local operator = object.tags.operator

tables.building_polygon:add_row({
tables.building_polygon:insert({
osm_type = osm_types.osm_type,
osm_subtype = osm_types.osm_subtype,
name = name,
Expand All @@ -212,7 +212,7 @@ function building_process_way(object)
levels = levels,
height = height,
operator = operator,
geom = { create = 'area' }
geom = object:as_polygon()
})


Expand Down Expand Up @@ -245,7 +245,7 @@ function building_process_relation(object)
local operator = object.tags.operator

if object.tags.type == 'multipolygon' or object.tags.type == 'boundary' then
tables.building_polygon:add_row({
tables.building_polygon:insert({
osm_type = osm_types.osm_type,
osm_subtype = osm_types.osm_subtype,
name = name,
Expand All @@ -260,7 +260,7 @@ function building_process_relation(object)
levels = levels,
height = height,
operator = operator,
geom = { create = 'area' }
geom = object:as_multipolygon()
})
end
end
Expand Down
Loading