tilezen / vector-datasource

Tilezen vector tile service - OpenStreetMap data in several formats
https://www.nextzen.org/
Other
507 stars 119 forks source link

Add new elevation contours layer #1920

Open rwrx opened 5 years ago

rwrx commented 5 years ago

I need to add elevation contours into vector datasource. I have imported them into separate postgresql database with osm2pgsql, I have tried to do some modifications and commited them on my fork: https://github.com/rwrx/vector-datasource/commit/010b764d40b872dfc70eb5ffac6d3e61d1632ca0 (I must have deleted queries to tables which are not present in this database from queries.yaml). I have also modified tilequeue and tileserver to process contours layer. When I run query on tileserver to contours layer through browser I get empty tile. Could I ask you for some help? I am not sure if these are enough of information for you, so I can also add other information when needed.

nvkelso commented 5 years ago

I made some comments over in https://github.com/rwrx/vector-datasource/commit/010b764d40b872dfc70eb5ffac6d3e61d1632ca0.

rwrx commented 5 years ago

Thank you.

rwrx commented 5 years ago

Hi @nvkelso could I ask you to help me with adding new contours layer https://github.com/rwrx/vector-datasource/commit/010b764d40b872dfc70eb5ffac6d3e61d1632ca0? I am not sure what I am doing wrong and into which other files I should add contours layer. I can see that there is also a sql.py file which has defined postgresql table names for each layer and also it seems to me that into tilequeue into process.py and common.py there should be added contours layer.

Maybe this could be merged into vector-datasource as a new layer for tangram. Think that this could be a huge benefit of adding contours into Walkabout. I am working on style similar to OpenTopoMap and I need a contours there to be added.

rwrx commented 5 years ago

I have added contours layer by myself. Could I make a pull request? Or this layer isn't something you want in vector-datasource?

nvkelso commented 5 years ago

Hi @rwrx! That's great to hear, congrats on the accomplishment :)

Yes, please send along a PR to review. Contour lines have been oft requested. We'd probably make them an optional layer in the schema (like traffic), but in this case there's actual data to build with in the project. Huzzah!

rwrx commented 5 years ago

Great, thank you. I have contour data for the whole planet uploaded on Dropbox, it is a 200 GB zipped file, unzipped is 700 GB and it is dumped postgresql table. Could it be then possible to upload it somewhere else to some public hosting?

nvkelso commented 5 years ago

Send me link to nvkelso at Gmail and I can work to add it to Tilezen's data assets S3 bucket.

nvkelso commented 5 years ago

Also, is there an endpoint to visualize your dev results? Feel free to email that to me if you want the endpoint to be private.

rwrx commented 5 years ago

Unforutnately I have it only on my local pc, which I could not have it publicly available. But I can send you some screenshots from my Android mobile app which has contour lines. I have added them into Walkabout style.

nvkelso commented 5 years ago

Screenshots sound good :)

rwrx commented 5 years ago

Ok, I am attaching some screenshots:

screenshot-01 screenshot-02 screenshot-03

nvkelso commented 5 years ago

Nice! Are you bolding the "index" contour with another property or with a custom Javascript filter in the Tangram scene file?

rwrx commented 5 years ago

I am using custom JavaScript filter like this:

filter: function() { return feature.ele % 100 == 0; }

and:

filter: function() { return feature.ele % 50 == 0; }