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

[Question] Mapbox vector tile server solution #9

Closed
pherbel opened this issue Feb 7, 2017 · 17 comments
Closed

[Question] Mapbox vector tile server solution #9

pherbel opened this issue Feb 7, 2017 · 17 comments

Comments

@pherbel
Copy link

pherbel commented Feb 7, 2017

Hi,

I would like to create a PoC for .Net based Vector Tile server and serve Mapbox and GeoJson vector tile format. I'm planning to load the map data from OSM with OsmSharp

Do you know a sample about it or could you adjust me to a right direction?

I'm new in the map rendering and vector tile rendering so any help would be awesome.

Thanks

@bertt
Copy link
Owner

bertt commented Feb 7, 2017

Hi, seems like a nice project :-)
For the server part maybe you can get some inspiration here https://github.com/bertt/MBTiles.Server

What are you planning to use for encoding the vector tiles?

@pherbel
Copy link
Author

pherbel commented Feb 7, 2017

Yep, interesting project.

What are you planning to use for encoding the vector tiles?

What do you mean by that? On the frontend part or on the backend?

@bertt
Copy link
Owner

bertt commented Feb 8, 2017

I meant on the server-side, or are you using existing vector tiles?

@pherbel
Copy link
Author

pherbel commented Feb 9, 2017

First step I want to query the Tile information from OSM dump file by OsmSharp and covert this data to GeoJson and Mapbox Vector tile format.

@xivk
Copy link

xivk commented Feb 13, 2017

I'm working on encoding... perhaps will do a pull request here or at least share my code later on...

@pksorensen
Copy link

I was just looking for a way to write (encode) into protobuf tiles from a similar data stucture (classes) as in this library. How far are youwith encoding? @xivk

@xivk
Copy link

xivk commented Feb 21, 2017

I have some code to share but it's extremely hacky and dirty for now, more a POC than anything else... but it works for linestrings:

https://github.com/itinero/vector-tiles/tree/master/src/Itinero.VectorTiles.Mapbox

You can see it in action here:

http://routing.anyways.eu/#15.13/51.2621/4.7874

The roads data only comes from one of the Itinero route planning instances, the rest from open vector tiles.

@pksorensen
Copy link

Cool. Though I vent with a node interop solution :) using NodeServices in dotnet core. So i send the tile as json to node which encodes it using the following function

var vtpbf = require('vt-pbf')

module.exports = function (callback, tile) {
    var buff = vtpbf.fromGeojsonVt({ 'geojsonLayer': tile });
   // buff.pipe(callback.stream);
    callback(/* error */ null, buff);
};

Was alot faster then coding it in c# :)

@xivk
Copy link

xivk commented Feb 21, 2017

Yeah for sure, perhaps a bit different for me, I need a high-performing way of generating the tiles without first encoding them as json directly from a routing database.

That's also why I probably won't be submitting a pull-request here but feel free to reuse whatever code you find in this project (in whatever license you want):

https://github.com/itinero/vector-tiles/tree/master/src/Itinero.VectorTiles.Mapbox

@pksorensen
Copy link

I ported GeoJSON-VT to c# some time ago and just wanted to be able to save the data as pbf files :) But thanks for the effort, i am sure that it also will benefits others :)

@andreschardonguwo
Copy link

hello @pksorensen . I'm very interested in your solution. Are you using your GeoJSON-VT to c# and then node + vtpbf ? Did you succeed? Thanks!

@pksorensen
Copy link

Ye, i can put it up online in the weekend with some examples. Ping me again in the weekend to ask for progress :)

I ported the GeoJSON-VT from JS to C#, then extented it to work with custom projections and generate pbf vector tiles to file system that can be hosted on a file host like Azure BlobStorage eller amazon.

@andreschardonguwo
Copy link

Nice! Is your GeoJSON-VT port public? O would you be willing to share it?

@andreschardonguwo
Copy link

andreschardonguwo commented Feb 21, 2017 via email

@andreschardonguwo
Copy link

andreschardonguwo commented Feb 25, 2017 via email

@pksorensen
Copy link

Ye, i put the code at https://github.com/EarthML/EarthML.SpatialCluster but at this point its more a proof of concept. There is a sample application that can take a point.geojson file and tile it up aswell as do some simple XY clustering.

@bertt
Copy link
Owner

bertt commented May 31, 2017

well some examples for vector tile servers are given so closing this issue

@bertt bertt closed this as completed May 31, 2017
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

5 participants