Giter Club home page Giter Club logo

Comments (9)

Tom-Cuthill avatar Tom-Cuthill commented on July 30, 2024

Sorry there was a small typo, I did include the class name Tile in the PrepareSerializer call. See below:

static VectorTileParser()
{
Serializer.PrepareSerializer();
}

from mapbox-vector-tile-cs.

Tom-Cuthill avatar Tom-Cuthill commented on July 30, 2024

Apparently the contents of the angle braces get removed when submitted text in this textbox!!

from mapbox-vector-tile-cs.

pauldendulk avatar pauldendulk commented on July 30, 2024

@Tom-Cuthill For code samples use 3 backticks (top left of keyboard) at start and end. See syntax 'highlighting' over here.

static VectorTileParser()
{
   Serializer.PrepareSerializer();
}

from mapbox-vector-tile-cs.

pauldendulk avatar pauldendulk commented on July 30, 2024

@Tom-Cuthill Maybe a workaround is to do all vector tile parsing on a single background thread. So, start a background thread and do all parsing there. The main app is not blocked that way and protobuf-net is accessed on a single thread.

from mapbox-vector-tile-cs.

Tom-Cuthill avatar Tom-Cuthill commented on July 30, 2024

Yeah, well the tiles are all loading in separate background threads, so collapsing them down to a single thread to do parsing is a bottleneck and far from ideal. The protobuf-net library supports multithreading, it is just its initialization which isn't. I'll look for another solution ...

from mapbox-vector-tile-cs.

bertt avatar bertt commented on July 30, 2024

Hi, I'm trying to reproduce the exceptions using your sample code in a UWP project (see https://github.com/bertt/vectortileparsing/), but I don't see any exception occurring in method parseTile.
So how can we reproduce the exception?

from mapbox-vector-tile-cs.

Tom-Cuthill avatar Tom-Cuthill commented on July 30, 2024

I'm using Visual Studio 2015 and the project is a Universal Windows 8.1 app. Unfortunately we have to support this platform for the next year or so.

PS. I tried using the official google's official protobuf C# library, using the protoc utility to generate a C# class to do the protobuf parsing. Since it builds the class from the official mapbox vector tile project's proto file (see here: https://github.com/mapbox/vector-tile-spec/blob/master/2.1/vector_tile.proto), the library doesn't need to parse any metadata and consequently runs faster. I've tested it and it runs fine in a multithreaded environment. NOTE: That if you follow this route, you have to update the syntax of the vector_tile.proto file to version 3 of proto.

from mapbox-vector-tile-cs.

bertt avatar bertt commented on July 30, 2024

Can you send a PR of using the Google protobuf lib?

from mapbox-vector-tile-cs.

bertt avatar bertt commented on July 30, 2024

closing because no activity

from mapbox-vector-tile-cs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.