osm.pbf

Open OSM pbf results in Protobuf exception

馋奶兔 提交于 2020-01-15 03:16:07
问题 Using OSMSharp I am having trouble to open a stream for a file (which I can provide on demand) The error occurs in PBFReader (line 104) using (var tmp = new LimitedStream(_stream, length)) { header = _runtimeTypeModel.Deserialize(tmp, null, _blockHeaderType) as BlobHeader; } and states: "ProtoBuf.ProtoException: 'Invalid field in source data: 0'" which might mean different things as I have read in this SO question. The file opens and is visualized with QGis so is not corrupt in my opinion.

How to use tag filtering in Atlas

故事扮演 提交于 2020-01-06 04:53:08
问题 New to the Atlas project (and also to Java), I am trying some things out. I am looking for the preferred way to combine the instructions given here and here to apply tag filtering on an Atlas. Would the below be a good approach or is there a better alternative? String definition = "highway->residential"; final TaggableFilter filter = TaggableFilter.forDefinition(definition); final Optional<Atlas> predicateAtlas = atlas.subAtlas(filter::test, AtlasCutType.SOFT_CUT); 回答1: Your code would work