/// <summary>
 /// Class to access the tile data
 /// </summary>
 /// <param name="data">Byte array containing the raw (already unzipped) tile data</param>
 /// <param name="validate">If true, run checks if the tile contains valid data. Decreases decoding speed.</param>
 public VectorTile(byte[] data, bool validate = true)
 {
     _Layers = new List <VectorTileLayer>();
     _VTR    = new VectorTileReader(data, validate);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Get a feature of this layer
 /// </summary>
 /// <param name="feature">Index of the feature to request</param>
 /// <param name="clippBuffer">
 /// <para>'null': returns the geometries unaltered as they are in the vector tile. </para>
 /// <para>Any value >=0 clips a border with the size around the tile. </para>
 /// <para>These are not pixels but the same units as the 'extent' of the layer. </para>
 /// </param>
 /// <returns></returns>
 public VectorTileFeature GetFeature(int feature, uint?clippBuffer = null)
 {
     return(VectorTileReader.GetFeature(this, _FeaturesData[feature], true, clippBuffer));
 }
Exemplo n.º 3
0
 /// <summary>
 /// Get a feature of this layer
 /// </summary>
 /// <param name="feature">Index of the feature to request</param>
 /// <param name="clipBuffer">
 /// <para>'null': returns the geometries unaltered as they are in the vector tile. </para>
 /// <para>Any value >=0 clips a border with the size around the tile. </para>
 /// <para>These are not pixels but the same units as the 'extent' of the layer. </para>
 /// </param>
 /// <returns></returns>
 public VectorTileFeature GetFeature(int feature, uint?clipBuffer = null, float scale = 1.0f)
 {
     return(VectorTileReader.GetFeature(this, _FeaturesData[feature], true, clipBuffer, scale));
 }
Exemplo n.º 4
0
 /// <summary>
 /// Class to access the tile data
 /// </summary>
 /// <param name="data">Byte array containing the raw (already unzipped) tile data</param>
 /// <param name="validate">If true, run checks if the tile contains valid data. Decreases decoding speed.</param>
 public VectorTileData(byte[] data, bool validate = true)
 {
     _VTR = new VectorTileReader(data, validate);
 }