Im trying to read .pbf files from Rosreestr and in case where I want to transform them into MemoryStream and pass to mapbox-tile-server the library doesnt parse it.
namespace test_mapbox;
using GeoJSON.Net.Feature;
using Mapbox.Vector.Tile;
class Program
{
static void Main(string[] args)
{
using (var stream = File.OpenRead("test.pbf"))
{
var tile = VectorTileParser.Parse(stream);
foreach (var layer in tile)
{
Console.WriteLine(layer.Name);
}
}
}
}
But when I try to:
var pbfFile = response.ResponseBinary;
var stream = new MemoryStream();
stream.Write(pbfFile, 0, pbfFile.Length);
var layers = VectorTileParser.Parse(stream); // This one returns zero length sequence
The case is:
Im trying to read .pbf files from Rosreestr and in case where I want to transform them into MemoryStream and pass to mapbox-tile-server the library doesnt parse it.
Example file 1195.pbf.zip
This example works totally fine
But when I try to:
You can try download the file by yourself using this link https://pkk.rosreestr.ru/arcgis/rest/services/Hosted/caddivsion/VectorTileServer/tile/12/1190/2392.pbf but VPN within Russia is needed to access it