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

Tilemaker does not support maritime boundaries #705

Open
jtafarrelly opened this issue Apr 24, 2024 · 2 comments
Open

Tilemaker does not support maritime boundaries #705

jtafarrelly opened this issue Apr 24, 2024 · 2 comments

Comments

@jtafarrelly
Copy link

jtafarrelly commented Apr 24, 2024

I've been trying for a day or so to get the rendering of worldwide coastal boundaries. See the following for Tileserver-GL rendering of the underlying basemap

image

For the exact same style file in Maputnik, you can immediately see the additional admin_level 2 maritime boundaries, as well as some others:

image

This is most noticeable for coastal waters, but also impacts, for example, nature reserves and marine protected zones (which fall under 'parks' in the OpenMapTiles schema; neither will render). The admin level 2 boundaries should by default include territorial waters - and it should be up to the style sheet to turn them off. Taking a look in the process-openmaptiles.lua file, it appears that this is the cause:

if isBoundary and not (Find("maritime")=="yes") then
		local mz = 0
		if     admin_level>=3 and admin_level<5 then mz=4
		elseif admin_level>=5 and admin_level<7 then mz=8
		elseif admin_level==7 then mz=10
		elseif admin_level>=8 then mz=12
		end

		Layer("boundary",false)
		AttributeNumeric("admin_level", admin_level)
		MinZoom(mz)
		-- disputed status (0 or 1). some styles need to have the 0 to show it.
		local disputed = Find("disputed")
		if disputed=="yes" then
			AttributeNumeric("disputed", 1)
		else
			AttributeNumeric("disputed", 0)
		end
	end

Is there any particular reason why not (Find("maritime")=="yes") is set?

@systemed
Copy link
Owner

I'll be completely honest and say the particular reason is that I think they look terrible! osm-carto, and styles influenced by it, are the only mainstream maps to show all maritime boundaries. Other webmaps and standard print cartography don't.

That said, if they're in the standard OMT schema, I wouldn't be opposed to a PR to include them in the vector tiles as long as it included a corresponding change to the default stylesheet to not show them.

@jtafarrelly
Copy link
Author

jtafarrelly commented Apr 24, 2024

Should be simple enough to implement, so I'll take a look this evening. The other maritime features already present in the OMT schema (See here) mentioned above would be fixed by adding boundary=protected_area and boundary=nature_reserve to

	if     boundary=="national_park" then Layer("park",true); Attribute("class",boundary); SetNameAttributes()

There's definitely room for the OMT schema for much more maritime information, I think - from my own research it seems like progress in porting OpenSeaMap data died in the cradle with the move from MapBox to OpenMapTiles. I've been considering writing something like a process-maritime.lua script that would handle seamark information present in the osm.pbf file, but it would also involve sorting the stylesheets - not a trivial endeavour. Possibly a conversation for a different repo though!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants