public byte[] ToBitmap(LayerInfo layerInfo)
        {
            using (var bitmap = new Bitmap(256, 256))
            using (var canvas = Graphics.FromImage(bitmap))
            using (var pen = new Pen(Color.Red, 2))
            {
                foreach (var feature in layerInfo.FeatureCollection.Features)
                {
                    if (feature.Geometry.Type == GeoJSONObjectType.Polygon)
                    {
                        var polygon = (Polygon)feature.Geometry;

                        foreach (var lineString in polygon.Coordinates)
                        {
                            canvas.Transform = new Matrix(); // todo set te matrix transform to match the tile extent.
                            canvas.DrawPolygon(pen, ToGdi(lineString));
                        }
                    }
                }

                return ToBytes(bitmap);
            }
        }
        public static List<LayerInfo> Parse(Stream stream, int x, int y, int z,bool convertToGeographicPosition=true)
        {
            var tile = Serializer.Deserialize<Tile>(stream);

            var list = new List<LayerInfo>();
            foreach (var layer in tile.Layers)
            {
                var extent = layer.Extent;
                var li = new LayerInfo();
                var fc = new FeatureCollection();
                foreach (var feature in layer.Features)
                {
                    var f = FeatureParser.Parse(feature, layer.Keys, layer.Values, x, y, z, extent, convertToGeographicPosition);
                    if (f != null)
                    {
                        fc.Features.Add(f);
                    }
                }
                li.FeatureCollection = fc;
                li.Name = layer.Name;
                list.Add(li);
            }
            return list;
        }