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

thank you #4

Open
wendellwt opened this issue Oct 4, 2021 · 6 comments
Open

thank you #4

wendellwt opened this issue Oct 4, 2021 · 6 comments

Comments

@wendellwt
Copy link

Thank you very much for doing this. I was able to follow your instructions & scripts and get a map to show up with tiles served from my own postile. It was quite challenging. (There were a couple of load scripts that were missing the postgresql port parameter.)

I think Web Mercator is wrong for many reasons, and I would like to make this server work with some sort of Lambert Conformal Conic, and just for the continental US. Where is the srs/srid/epsg/proj/whatever identifier for the type of tiles it serves? Or is that all in the browser?

Anyway, thank you.
Wendell

@acalcutt
Copy link
Owner

acalcutt commented Oct 4, 2021

I'm glad my project was helpful. It took me a lot of time to go through the OpenMapTiles docker images and pull out all the various commands and applications they were using to build the maps. I still don't quite have the water layer right, but it works enough for my use when combined with another water layer I made.

I am using this with Maplibre GL, which forked from Mapbox GL fairly recently due to license changes on mapbox's part. If I'm not mistaken, I think they only support Web Mercator ( https://docs.mapbox.com/help/glossary/projection/ )

To serve the tiles I am using TileServer GL, with my style customizations in this project ( https://github.com/acalcutt/wifidb-tileserver-gl ). You can see my current map in use here ( https://wifidb.net/wifidb/opt/map.php?func=wifidbmap&labeled=0&sig_label=none )

@acalcutt
Copy link
Owner

acalcutt commented Oct 4, 2021

I think the projections may come from the OpenMapTiles layer file. In my default config at config/env.config.
the import uses

IMPORT_LAYER_FILE=openmaptiles.yaml
and the export_mbtiles.sh script uses
EXPORT_LAYER_FILE=wdbmap.yaml

https://github.com/acalcutt/wdb-map-gen/blob/master/config/openmaptiles.yaml
https://github.com/acalcutt/wdb-map-gen/blob/master/config/wdbmap.yaml

At the bottom of those files it specifies
srs: +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over

There are also a few of my import scripts that mention a target projection I beileive

I'm not much of a gis person here, but this is where I would look if I were looking to change the projection.

@wendellwt
Copy link
Author

Thank you for the responses.

I looked at the postile.py source, and all of the comments say things like "read merc projection here". I asked them a question, but there doesn't seem to be much activity on their issues.

I've since found pg_tileserve. Since it is written by Paul Ramsey it must be good(!). I'll give it a try.

Your map sure looks nice. Is that what a MapBox Style does to OSM data? I'll have to try it out.

Wendell

@acalcutt
Copy link
Owner

acalcutt commented Oct 6, 2021

With the Styles on Tileserver GL I am able to combine layers, So my map includes the OSM data, but I have also created some base layers using the Jaxa aw3d30 GeoTiffs, which give the elevation colors and hillshade.

Originally I made my own color and hillshade layers using some scripts here ( https://github.com/acalcutt/jaxa_AW3D30_to_MBTiles ). you can see some examples up for download here (https://drive.google.com/drive/folders/1Uo5xyFd8it7UH3pSmBiWP4lfZdM9OmhA)

Right now I am working on a TerrainRGB layer (also based on the jaxa images), which lets me do hillshade in maplibre gl/mapbox gl on the fly with better sharpness. Right now I am using that instead of the hillshade layer i generated before. The TerrainRGB is also needed for the new 3d terrain features maplibre is working on. (which I am testing but is not ready for prime time)

@acalcutt
Copy link
Owner

acalcutt commented Oct 6, 2021

BTW, you mentioned just wanting to do the United States instead of the full planet.

You should be able to just change where it downloads the pbf file from
download-osm planet -o data/$PBF
to
download-osm north-america -o data/$PBF

@wendellwt
Copy link
Author

Good idea, but I didn't get it to work. Neither of the US mirrors listed in your "class Catalog", (ftp.osuosl.org, ftpmirror.your.org) had north-america, only the planet one, and downloading anything from .de was taking forever.

I ended up d/l'ing the planet one from OSU and using osmconvert to crop it to conus.

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