Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial pass at rendering golf=* features #4212

Closed
wants to merge 62 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
db0a119
Travis: build against Mapnik 3.0.22
hiddewie Jul 5, 2020
3d4311c
Clean up some svg images
pitdicker Sep 12, 2020
d8118bd
Initial pass at rendering golf=* features (gravitystorm/openstreetmap…
justingruca Sep 29, 2020
56d8354
Fix golf=hole selector and color golf=hole/golf=pin points same as go…
justingruca Sep 29, 2020
a6a704f
Simplify SVG for golf pin
justingruca Sep 29, 2020
460a39a
Minor color and pattern updates
justingruca Sep 29, 2020
f1aa90e
Layer/organizational changes; remove rendered point for tees
justingruca Oct 5, 2020
67eff1e
Render mini-roudabout just like a turning circle
hiddewie Oct 11, 2020
7457578
Render icon as non-blocking small dot in casing color
hiddewie Oct 11, 2020
13e8f14
Switch to @leisure for golf course background color
justingruca Oct 13, 2020
9f53b34
Revert "Switch to @leisure for golf course background color"
justingruca Oct 13, 2020
357a79f
Change golf=green to use @campsite and increase the border; remove bu…
justingruca Oct 13, 2020
84a4947
Use @pitch for golf=[tee|fairway|driving_range|rough] and @grass for …
justingruca Oct 17, 2020
c8ed058
Link to CARTOGRAPHY.md in README.md
polarbearing Dec 5, 2020
aabdb7b
added password as an extra option to get-external-data
terminaldweller Dec 11, 2020
1ade787
added the password for ogr2ogr as well
terminaldweller Dec 11, 2020
633775f
Create a partial index for waterways
pnorman Jan 9, 2021
b7c3ecf
update to growing issue count
matkoniecz Jan 10, 2021
8fba163
Merge pull request #4281 from matkoniecz/master
pnorman Jan 10, 2021
37f4aaf
Merge pull request #4280 from pnorman/waterway
pnorman Jan 11, 2021
31c649a
Use custom indexes to speed up ST_PointOnSurface queries
pnorman Jan 23, 2021
85ed024
Merge pull request #4205 from pitdicker/svg_cleanup
pnorman Jan 23, 2021
b01b2b1
Merge pull request #4218 from hiddewie/highway-roundabout
pnorman Jan 23, 2021
4074484
Merge pull request #4263 from polarbearing/patch-1
pnorman Jan 23, 2021
6899a71
Merge pull request #4265 from terminaldweller/master
pnorman Jan 23, 2021
faead20
Merge pull request #4175 from hiddewie/patch-1
pnorman Jan 24, 2021
bf1e82c
Update DB dockerfile to use the postgis image
hiddewie Jan 24, 2021
f701987
Downgrade to postgis 2.5, fix password
hiddewie Jan 26, 2021
42a6baf
Merge pull request #4292 from pnorman/pointonsurface_index
pnorman Jan 28, 2021
bfb77a8
Add to changelog
pnorman Jan 29, 2021
c0482cf
Update preview.png
pnorman Jan 29, 2021
70ffaa7
Update changelog for v5.3.0
pnorman Jan 29, 2021
34ea0de
Fix v5.3.0 heading in Changelog
pnorman Jan 29, 2021
94fe82b
Fix changelog typos
pnorman Jan 29, 2021
396778b
Switch from Natural Earth to its CDN
pnorman Jan 30, 2021
e77163e
Merge pull request #4306 from pnorman/ne_url
pnorman Jan 30, 2021
cd0f8d7
Add an option to grant permissions to a user for rendering from
pnorman Jan 30, 2021
fabb5c9
Update indexes.sql comment
pnorman Jan 30, 2021
351e828
Update install documentation for shapefile loading
pnorman Jan 30, 2021
962f353
Merge pull request #4310 from pnorman/documentation_fixes
pnorman Jan 31, 2021
bdd92cd
Merge pull request #4307 from pnorman/render_user
pnorman Feb 3, 2021
8f4204e
Add to changelog
pnorman Feb 5, 2021
00bcf61
Update changelog
pnorman Feb 5, 2021
e5494bd
Correctly update changelog this time
pnorman Feb 5, 2021
70ba48c
Set git attributes so that python scripts don't get mangled on Windows
ZeLonewolf Feb 10, 2021
785f159
Updating git attributes to also apply LF endings to python scripts
ZeLonewolf Feb 10, 2021
d384ddf
Adding newline
ZeLonewolf Feb 10, 2021
3618861
Merge pull request #4330 from ZeLonewolf/windows-line-ending-fix
pnorman Feb 10, 2021
e858de4
Update README.md
kocio-pl Apr 2, 2021
e433211
Merge pull request #4357 from gravitystorm/kocio-pl-readme-v5
matkoniecz Apr 13, 2021
a2077c0
Merge pull request #4294 from hiddewie/docker-compose-postgis
pnorman Apr 16, 2021
48ec53d
Initial pass at rendering golf=* features (gravitystorm/openstreetmap…
justingruca Sep 29, 2020
22661a3
Fix golf=hole selector and color golf=hole/golf=pin points same as go…
justingruca Sep 29, 2020
3f0b7c2
Simplify SVG for golf pin
justingruca Sep 29, 2020
98c0a34
Minor color and pattern updates
justingruca Sep 29, 2020
59b982d
Layer/organizational changes; remove rendered point for tees
justingruca Oct 5, 2020
585d619
Switch to @leisure for golf course background color
justingruca Oct 13, 2020
3b14a03
Revert "Switch to @leisure for golf course background color"
justingruca Oct 13, 2020
074ece7
Change golf=green to use @campsite and increase the border; remove bu…
justingruca Oct 13, 2020
48a51bc
Use @pitch for golf=[tee|fairway|driving_range|rough] and @grass for …
justingruca Oct 17, 2020
ac3818c
green is now @pitch, everything else is @grass
justingruca Apr 19, 2021
d3e1968
Merge branch 'render-golf-features' of https://github.com/jgruca/open…
justingruca Apr 19, 2021
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
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@

# Declare files that will always have LF line endings on checkout.
*.sh text eol=lf
*.py text eol=lf
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ addons:
- postgresql-9.5-postgis-2.4
- osm2pgsql
env:
- CARTO=1.2.0 MAPNIK='3.0.0 3.0.12'
- CARTO=1.2.0 MAPNIK='3.0.0 3.0.12 3.0.22'
install:
- npm install carto@$CARTO
- pip3 install --user colormath
Expand Down
18 changes: 17 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
## [Unreleased](https://github.com/gravitystorm/openstreetmap-carto/compare/v5.2.0...master)
## [Unreleased](https://github.com/gravitystorm/openstreetmap-carto/compare/v5.3.1...master)

## [v5.3.1](https://github.com/gravitystorm/openstreetmap-carto/compare/v5.3.0...v5.3.1) - 2021-02-04
### Changes
- Natural Earth URL changed to directly point at the NACIS CDN (#4306)
- Added an option to the external data loader to grant SELECT permissions on the tables (#4307)

## [v5.3.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v5.2.0...v5.3.0) - 2021-01-28

### Major Changes
- External shapefiles for coastline and other data are now loaded into the database with a provided script. (#4092)
- The recommended indexes are now required. Attempting to render without them will result in abysmal performance.

### Changes
- amenity=embassy is no longer rendered, and office=diplomatic with diplomatic=embassy or diplomatic=consulate is instead (#4168)
- Mini-roundabouts are rendered like a turning circle (#4218)
- There is a new partial index for waterways

## [v5.2.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v5.1.0...v5.2.0) - 2020-05-8

Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.db
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM mdillon/postgis:10
FROM postgis/postgis:10-2.5-alpine

ADD ./scripts/tune-postgis.sh /docker-entrypoint-initdb.d
COPY ./scripts/tune-postgis.sh /docker-entrypoint-initdb.d/tune-postgis.sh
4 changes: 2 additions & 2 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ osm2pgsql -G --hstore --style openstreetmap-carto.style --tag-transform-script o
You can find a more detailed guide to setting up a database and loading data with osm2pgsql at [switch2osm.org](https://switch2osm.org/manually-building-a-tile-server-16-04-2-lts/).

### Custom indexes
Custom indexes are not required, but will speed up rendering, particularly for full planet databases, heavy load, or other production environments. They will not be as helpful with development using small extracts.
Custom indexes are required for rendering performance and are essential on full planet databases.

```
psql -d gis -f indexes.sql
Expand All @@ -42,7 +42,7 @@ To download them and import them into the database you can run the following scr
scripts/get-external-data.py
```

This script downloads necessary files, generates and populates the *data* directory with all needed shapefiles, including indexing them through *shapeindex*.
The script downloads shapefiles, loads them into the database and sets up the tables for rendering. Additional script option documentation can be seen with `scripts/get-external-data.py --help`.

## Fonts
The stylesheet uses Noto, an openly licensed font family from Google with support for multiple scripts. The stylesheet uses Noto's "Sans" style where available. If not available, this stylesheet uses another appropriate style of the Noto family. The "UI" version is used where available, with its vertical metrics which fit better with Latin text.
Expand Down
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

These are the CartoCSS map stylesheets for the Standard map layer on [OpenStreetMap.org](https://www.openstreetmap.org).

The general purpose, the cartographic design goals and guidelines for this style are outlined in [CARTOGRAPHY.md](CARTOGRAPHY.md).

These stylesheets can be used in your own cartography projects, and are designed
to be easily customised. They work with [Kosmtik](https://github.com/kosmtik/kosmtik)
and also with the command-line [CartoCSS](https://github.com/mapbox/carto) processor.
Expand Down Expand Up @@ -69,7 +71,12 @@ The v4.x series includes [osm2pgsql lua transforms](https://github.com/openstree
and a hstore column with all other tags, allowing use of more OpenStreetMap data. Users need
to reload their databases, v3.x compatibility is not maintained.

There are over [300 open requests][issues], some that have been open for years.
## Database schema change (v5.x)

The v5.x series updates Lua tag transforms, linestring and polygon decisions have changed.


There are over [400 open requests][issues], some that have been open for years.
These need reviewing and dividing into obvious fixes, or additional new features
that need some cartographic judgement.

Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ services:
ports:
- "127.0.0.1:5432:5432"
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
- PG_WORK_MEM
- PG_MAINTENANCE_WORK_MEM
import:
Expand Down
2 changes: 1 addition & 1 deletion external-data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ sources:

ne_110m_admin_0_boundary_lines_land:
type: shp
url: http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/110m/cultural/ne_110m_admin_0_boundary_lines_land.zip
url: https://naciscdn.org/naturalearth/110m/cultural/ne_110m_admin_0_boundary_lines_land.zip
file: ne_110m_admin_0_boundary_lines_land.shp
ogropts: &ne_opts
- "--config"
Expand Down
11 changes: 8 additions & 3 deletions indexes.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
-- These are optional but suggested indexes for rendering OpenStreetMap Carto
-- with a full planet database.
-- These are indexes for rendering performance with OpenStreetMap Carto.
-- This file is generated with scripts/indexes.py

CREATE INDEX planet_osm_line_ferry
Expand All @@ -11,14 +10,20 @@ CREATE INDEX planet_osm_line_name
CREATE INDEX planet_osm_line_river
ON planet_osm_line USING GIST (way)
WHERE waterway = 'river';
CREATE INDEX planet_osm_line_waterway
ON planet_osm_line USING GIST (way)
WHERE waterway IN ('river', 'canal', 'stream', 'drain', 'ditch');
CREATE INDEX planet_osm_point_place
ON planet_osm_point USING GIST (way)
WHERE place IS NOT NULL AND name IS NOT NULL;
CREATE INDEX planet_osm_polygon_admin
ON planet_osm_polygon USING GIST (ST_PointOnSurface(way))
WHERE name IS NOT NULL AND boundary = 'administrative' AND admin_level IN ('0', '1', '2', '3', '4');
CREATE INDEX planet_osm_polygon_military
ON planet_osm_polygon USING GIST (way)
WHERE (landuse = 'military' OR military = 'danger_area') AND building IS NULL;
CREATE INDEX planet_osm_polygon_name
ON planet_osm_polygon USING GIST (way)
ON planet_osm_polygon USING GIST (ST_PointOnSurface(way))
WHERE name IS NOT NULL;
CREATE INDEX planet_osm_polygon_nobuilding
ON planet_osm_polygon USING GIST (way)
Expand Down
6 changes: 6 additions & 0 deletions indexes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,16 @@ line:
where: route = 'ferry' AND osm_id > 0
river:
where: waterway = 'river'
waterway:
where: waterway IN ('river', 'canal', 'stream', 'drain', 'ditch')
polygon:
# The polygon table is by far the largest, and generally the slowest
name:
function: ST_PointOnSurface(way)
where: name IS NOT NULL
admin:
function: ST_PointOnSurface(way)
where: name IS NOT NULL AND boundary = 'administrative' AND admin_level IN ('0', '1', '2', '3', '4')
nobuilding:
where: building IS NULL
military:
Expand Down
Binary file modified preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading