{"versions":{"1.3.3":{"name":"@cgcs2000/vector-tile","description":"Parses vector tiles","repository":{"type":"git","url":"https://github.com/cgcs2000/vector-tile-js.git"},"version":"1.3.3","license":"BSD-3-Clause","main":"index.js","dependencies":{"@mapbox/point-geometry":"~0.1.0"},"devDependencies":{"benchmark":"^1.0.0","coveralls":"~2.11.2","istanbul":"~0.3.6","mapnik":"~3.6.0","jshint":"^2.6.3","pbf":"^1.3.2","tape":"~3.5.0","eslint":"~1.00.0","eslint-config-unstyled":"^1.1.0"},"jshintConfig":{"trailing":true,"undef":true,"unused":true,"indent":4,"node":true},"scripts":{"test":"eslint lib index.js && jshint lib && tape test/parse.test.js","cov":"istanbul cover ./node_modules/.bin/tape test/parse.test.js && coveralls < ./coverage/lcov.info"},"licenseText":"Copyright (c) 2014, Mapbox\n\n\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n    * Redistributions of source code must retain the above copyright notice,\n      this list of conditions and the following disclaimer.\n    * Redistributions in binary form must reproduce the above copyright notice,\n      this list of conditions and the following disclaimer in the documentation\n      and/or other materials provided with the distribution.\n    * Neither the name of Mapbox nor the names of its contributors\n      may be used to endorse or promote products derived from this software\n      without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR\nCONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\nEXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\nPROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\nPROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\nLIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\nNEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n","_id":"@cgcs2000/vector-tile@1.3.3","dist":{"shasum":"5b7acaf8c34c7878712fce30b8609318dd161ba9","integrity":"sha512-1CZl4Ncm4yVytH4sY5sqYYds11uYK7U6TjnnYspJNtxzHJtgccf2O6qfTNlMbu219vcbhNl/rQpin8Xpws4SZQ==","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@cgcs2000/vector-tile/-/vector-tile-1.3.3.tgz","fileCount":35,"unpackedSize":261994,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcQURkCRA9TVsSAnZWagAA8wkP/jhG/obc4ZkWNW5sIYGf\nw/ekNj0LfqbqNyRMUA4/gGoi5WAfO7n5ENGVKGvMqQUySalDoyQm73xfqoyQ\nimzOmUbG+JRFVSjspH0dL8X+QAsA38SpUNu4A6TLQ8ipHSd+zeG/Cz6d/ydI\nk9T/UbhL6G+ItekI9PtEZ9ij1HHLQmXMDBXL3/v/+qA8isSYg/9413ADzTbr\nenNW8NmiH+k4C/t2EM2zTUZYQbWMAFOs7lQnes+BQhjhNHkjlG4ax1bt3k9T\nin0hq6nfsnC/r/9Wn1kwTlxcYq83PO8CoTed0hy9Z82mE+DQKm94ZGzAHhSs\nlR61HvAuzKTIBv527fsjuZpSFdWUrpnZEj9wnjFUhJ9LxG5541/zJtxvgyGb\nXsfH7hWHYgBuULU09U5XFdx1odNwShl/ydfX7/H2Yb/3vNyEYTieckC7odyG\nW9ckUFjcH2vv4cy7KKZCaumXpTe0XobRTUTdjF5Itwk+EF2NdXG3HrBlP3fr\nOZ6jtSEM8IHINyWpPu/LZ0Uk0rg1XErVez3cpXtrDX++1ktcVszXEzT0TRUh\nEVe2iofQnhXgPJcxcJ+0EfpGmvN9ztpVQz6Xf4YnBvhkEpZGwNPDOkTUfOj5\nnafCmqwitiWp8HPmSlOF2w/tOKVjrFiCyWKukmszKyECaqeLJiHpwZUVdOi4\nu1Av\r\n=xxGy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDa8rBHH0fgvrES+ToSuHiKHlMegY5rE/08YofWpDU6pAiBnozMb21vMufRZO6BKvtojmLj833UUGZ3OqG7LurzAUw=="}]},"maintainers":[{"name":"anonymous","email":"jing-sam@qq.com"}],"_npmUser":{"name":"anonymous","email":"jing-sam@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vector-tile_1.3.3_1547781219863_0.8345911400624495"},"_hasShrinkwrap":false,"contributors":[]}},"dist-tags":{"latest":"1.3.3"},"name":"@cgcs2000/vector-tile","time":{"created":"2022-01-27T14:55:10.554Z","1.3.3":"2019-01-18T03:13:39.978Z","modified":"2023-12-30T17:11:54.510Z"},"readme":"# vector-tile\n\n[![build status](https://secure.travis-ci.org/mapbox/vector-tile-js.svg)](http://travis-ci.org/mapbox/vector-tile-js) [![Coverage Status](https://coveralls.io/repos/mapbox/vector-tile-js/badge.svg)](https://coveralls.io/r/mapbox/vector-tile-js)\n\n> This repository is a fork of `mapbox/vector-tile-js`, but for CGCS2000 projection.\n\nThis library reads [Mapbox Vector Tiles](https://github.com/mapbox/vector-tile-spec) and allows access to the layers and features.\n\n## Example\n\n```js\nvar VectorTile = require('@mapbox/vector-tile').VectorTile;\nvar Protobuf = require('pbf');\n\nvar tile = new VectorTile(new Protobuf(data));\n\n// Contains a map of all layers\ntile.layers;\n\nvar landuse = tile.layers.landuse;\n\n// Amount of features in this layer\nlanduse.length;\n\n// Returns the first feature\nlanduse.feature(0);\n```\n\nVector tiles contained in [serialtiles-spec](https://github.com/mapbox/serialtiles-spec)\nare gzip-encoded, so a complete example of parsing them with the native\nzlib module would be:\n\n```js\nvar VectorTile = require('vector-tile').VectorTile;\nvar Protobuf = require('pbf');\nvar zlib = require('zlib');\n\nzlib.gunzip(data, function(err, buffer) {\n    var tile = new VectorTile(new Protobuf(buffer));\n});\n```\n\n## Depends\n\n - Node.js v0.10.x or v0.8.x\n\n\n## Install\n\nTo install:\n\n    npm install @mapbox/vector-tile\n\n\n## API Reference\n\n\n### VectorTile\n\nAn object that parses vector tile data and makes it readable.\n\n#### Constructor\n\n- **new VectorTile(protobuf[, end])** &mdash;\n  parses the vector tile data contained in the given [Protobuf](https://github.com/mapbox/pbf) object,\n  saving resulting layers in the created object as a `layers` property. Optionally accepts end index.\n\n#### Properties\n\n- **layers** (Object) &mdash; an object containing parsed layers in the form of `{<name>: <layer>, ...}`,\nwhere each layer is a `VectorTileLayer` object.\n\n\n### VectorTileLayer\n\nAn object that contains the data for a single vector tile layer.\n\n#### Properties\n\n- **version** (`Number`, default: `1`)\n- **name** (`String) `&mdash; layer name\n- **extent** (`Number`, default: `4096`) &mdash; tile extent size\n- **length** (`Number`) &mdash; number of features in the layer\n\n#### Methods\n\n- **feature(i)** &mdash; get a feature (`VectorTileFeature`) by the given index from the layer.\n\n\n### VectorTileFeature\n\nAn object that contains the data for a single feature.\n\n#### Properties\n\n- **type** (`Number`) &mdash; type of the feature (also see `VectorTileFeature.types`)\n- **extent** (`Number`) &mdash; feature extent size\n- **id** (`Number`) &mdash; feature identifier, if present\n- **properties** (`Object`) &mdash; object literal with feature properties\n\n#### Methods\n\n- **loadGeometry()** &mdash; parses feature geometry and returns an array of\n  [Point](https://github.com/mapbox/point-geometry) arrays (with each point having `x` and `y` properties)\n- **bbox()** &mdash; calculates and returns the bounding box of the feature in the form `[x1, y1, x2, y2]`\n- **toGeoJSON(x, y, z)** &mdash; returns a GeoJSON representation of the feature. (`x`, `y`, and `z` refer to the containing tile's index.)","users":{}}