{"_id":"topojson-server","_rev":"3001203","name":"topojson-server","description":"Convert GeoJSON to TopoJSON for smaller files and the power of topology!","dist-tags":{"latest":"3.0.1"},"maintainers":[{"name":"mbostock","email":"mike@ocks.org"}],"time":{"modified":"2023-08-29T08:56:39.000Z","created":"2016-12-12T18:15:24.970Z","3.0.1":"2019-09-05T17:06:13.620Z","3.0.0":"2017-03-31T05:15:13.790Z","2.0.0":"2016-12-12T18:15:24.970Z"},"users":{},"author":{"name":"Mike Bostock","url":"https://bost.ocks.org/mike"},"repository":{"type":"git","url":"git+https://github.com/topojson/topojson-server.git"},"versions":{"3.0.1":{"name":"topojson-server","version":"3.0.1","description":"Convert GeoJSON to TopoJSON for smaller files and the power of topology!","keywords":["topojson","geojson"],"homepage":"https://github.com/topojson/topojson-server","license":"ISC","author":{"name":"Mike Bostock","url":"https://bost.ocks.org/mike"},"main":"dist/topojson-server.js","unpkg":"dist/topojson-server.min.js","jsdelivr":"dist/topojson-server.min.js","module":"src/index.js","repository":{"type":"git","url":"git+https://github.com/topojson/topojson-server.git"},"bin":{"geo2topo":"bin/geo2topo"},"scripts":{"pretest":"rollup -c","test":"tape 'test/**/*-test.js' && eslint src test","prepublishOnly":"rm -rf dist && yarn test","postpublish":"git push && git push --tags && zip -j dist/${npm_package_name}.zip -- LICENSE README.md dist/${npm_package_name}.js dist/${npm_package_name}.min.js"},"dependencies":{"commander":"2"},"devDependencies":{"eslint":"6","rollup":"1","rollup-plugin-terser":"5","tape":"4","topojson-client":"3"},"gitHead":"a6b85929df5dfc3de06d2bb0a4507b76967ce899","bugs":{"url":"https://github.com/topojson/topojson-server/issues"},"_id":"topojson-server@3.0.1","_npmVersion":"6.4.1","_nodeVersion":"10.14.1","_npmUser":{"name":"mbostock","email":"mike@ocks.org"},"dist":{"shasum":"d2b3ec095b6732299be76a48406111b3201a34f5","size":16645,"noattachment":false,"key":"/topojson-server/-/topojson-server-3.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/topojson-server/download/topojson-server-3.0.1.tgz"},"maintainers":[{"name":"mbostock","email":"mike@ocks.org"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/topojson-server_3.0.1_1567703173502_0.12099294670123317"},"_hasShrinkwrap":false,"publish_time":1567703173620,"_cnpm_publish_time":1567703173620,"_cnpmcore_publish_time":"2021-12-16T17:40:41.562Z"},"3.0.0":{"name":"topojson-server","version":"3.0.0","description":"Convert GeoJSON to TopoJSON for smaller files and the power of topology!","keywords":["topojson","geojson"],"homepage":"https://github.com/topojson/topojson-server","license":"BSD-3-Clause","author":{"name":"Mike Bostock","url":"https://bost.ocks.org/mike"},"main":"dist/topojson-server.js","module":"index","repository":{"type":"git","url":"git+https://github.com/topojson/topojson-server.git"},"bin":{"geo2topo":"bin/geo2topo"},"scripts":{"pretest":"rm -rf dist && mkdir dist && rollup --banner \"$(preamble)\" -f umd -n topojson -o dist/topojson-server.js -- index.js && rollup -f cjs -o build/topojson-internals.js -- test/internals.js","test":"tape 'test/**/*-test.js' && eslint index.js src","prepublish":"npm run test && uglifyjs --preamble \"$(preamble)\" -cm -o dist/topojson-server.min.js -- dist/topojson-server.js","postpublish":"git push && git push --tags && zip -j dist/topojson-server.zip -- LICENSE.md README.md dist/topojson-server.js dist/topojson-server.min.js"},"dependencies":{"commander":"2"},"devDependencies":{"eslint":"3","package-preamble":"0.0","rollup":"0.41","tape":"4","topojson-client":"3","uglify-js":"2"},"gitHead":"901ec6012a7ee6a36c86926e8d0b1d9a3d203d46","bugs":{"url":"https://github.com/topojson/topojson-server/issues"},"_id":"topojson-server@3.0.0","_shasum":"378e78e87c3972a7b5be2c5d604369b6bae69c5e","_from":".","_npmVersion":"3.10.10","_nodeVersion":"7.3.0","_npmUser":{"name":"mbostock","email":"mike@ocks.org"},"dist":{"shasum":"378e78e87c3972a7b5be2c5d604369b6bae69c5e","size":19741,"noattachment":false,"key":"/topojson-server/-/topojson-server-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/topojson-server/download/topojson-server-3.0.0.tgz"},"maintainers":[{"name":"mbostock","email":"mike@ocks.org"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/topojson-server-3.0.0.tgz_1490937311653_0.6286520296707749"},"directories":{},"publish_time":1490937313790,"_hasShrinkwrap":false,"_cnpm_publish_time":1490937313790,"_cnpmcore_publish_time":"2021-12-16T17:40:41.779Z"},"2.0.0":{"name":"topojson-server","version":"2.0.0","description":"Convert GeoJSON to TopoJSON for smaller files and the power of topology!","keywords":["topojson","geojson"],"homepage":"https://github.com/topojson/topojson-server","license":"BSD-3-Clause","author":{"name":"Mike Bostock","url":"https://bost.ocks.org/mike"},"main":"dist/topojson-server.js","module":"index","repository":{"type":"git","url":"git+https://github.com/topojson/topojson-server.git"},"bin":{"geo2topo":"bin/geo2topo"},"scripts":{"pretest":"rm -rf dist && mkdir dist && rollup --banner \"$(preamble)\" -f umd -n topojson -o dist/topojson-server.js -- index.js && rollup -f cjs -o build/topojson-internals.js -- test/internals.js","test":"tape 'test/**/*-test.js' && eslint index.js src","prepublish":"npm run test && uglifyjs --preamble \"$(preamble)\" -cm -o dist/topojson-server.min.js -- dist/topojson-server.js","postpublish":"git push && git push --tags && zip -j dist/topojson-server.zip -- LICENSE.md README.md dist/topojson-server.js dist/topojson-server.min.js"},"dependencies":{"commander":"2"},"devDependencies":{"eslint":"3","package-preamble":"0.0","rollup":"0.36","tape":"4","topojson-client":"2","uglify-js":"2"},"gitHead":"78ca838ee981b739f44eea8f8bde8aeda28313ec","bugs":{"url":"https://github.com/topojson/topojson-server/issues"},"_id":"topojson-server@2.0.0","_shasum":"e5c1ce7eddf9d40312890ea51e95e17d98d321d8","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.9.1","_npmUser":{"name":"mbostock","email":"mike@ocks.org"},"dist":{"shasum":"e5c1ce7eddf9d40312890ea51e95e17d98d321d8","size":20140,"noattachment":false,"key":"/topojson-server/-/topojson-server-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/topojson-server/download/topojson-server-2.0.0.tgz"},"maintainers":[{"name":"mbostock","email":"mike@ocks.org"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/topojson-server-2.0.0.tgz_1481566523001_0.7394647328183055"},"directories":{},"publish_time":1481566524970,"_hasShrinkwrap":false,"_cnpm_publish_time":1481566524970,"_cnpmcore_publish_time":"2021-12-16T17:40:41.973Z"}},"readme":"# TopoJSON Server\n\nThe **topojson-server** module provides tools for converting GeoJSON to [TopoJSON](https://github.com/topojson). See [How to Infer Topology](https://bost.ocks.org/mike/topology/) for details on how the topology is constructed.\n\nSee [shapefile](https://github.com/mbostock/shapefile) for converting ESRI shapefiles to GeoJSON, [ndjson-cli](https://github.com/mbostock/ndjson-cli) for manipulating newline-delimited JSON streams, [d3-geo-projection](https://github.com/d3/d3-geo-projection) for manipulating GeoJSON, and [topojson-client](https://github.com/topojson/topojson-client) for manipulating TopoJSON and converting it back to GeoJSON. See also [us-atlas](https://github.com/topojson/us-atlas) and [world-atlas](https://github.com/topojson/world-atlas) for pre-built TopoJSON.\n\n## Installing\n\nIf you use NPM, `npm install topojson-server`. Otherwise, download the [latest release](https://github.com/topojson/topojson-server/releases/latest). You can also load directly from [unpkg](https://unpkg.com). AMD, CommonJS, and vanilla environments are supported. In vanilla, a `topojson` global is exported:\n\n```html\n<script src=\"https://unpkg.com/topojson-server@3\"></script>\n<script>\n\nvar topology = topojson.topology({foo: geojson});\n\n</script>\n```\n\n[Try topojson-server in your browser.](https://tonicdev.com/npm/topojson-server)\n\n## API Reference\n\n<a name=\"topology\" href=\"#topology\">#</a> topojson.<b>topology</b>(<i>objects</i>[, <i>quantization</i>]) [<>](https://github.com/topojson/topojson-server/blob/master/src/topology.js \"Source\")\n\nReturns a TopoJSON topology for the specified [GeoJSON *objects*](http://geojson.org/geojson-spec.html#geojson-objects). The returned topology makes a shallow copy of the input *objects*: the identifier, bounding box, properties and coordinates of input objects may be shared with the output topology.\n\nIf a *quantization* parameter is specified, the input geometry is quantized prior to computing the topology, the returned topology is quantized, and its arcs are [delta-encoded](https://github.com/topojson/topojson-specification/blob/master/README.md#213-arcs). Quantization is recommended to improve the quality of the topology if the input geometry is messy (*i.e.*, small floating point error means that adjacent boundaries do not have identical values); typical values are powers of ten, such as 1e4, 1e5 or 1e6. See also [topojson.quantize](https://github.com/topojson/topojson-client/blob/master/README.md#quantize) to quantize a topology after it has been constructed, without altering the topological relationships.\n\n## Command-Line Reference\n\n### geo2topo\n\n<a name=\"geo2topo\" href=\"#geo2topo\">#</a> <b>geo2topo</b> [<i>options…</i>] [<i>name</i>=]<i>file</i>… [<>](https://github.com/topojson/topojson-server/blob/master/bin/geo2topo \"Source\")\n\nConverts one or more GeoJSON objects to an output topology. For example, to convert a GeoJSON FeatureCollection in the input file us-states.json to a TopologyJSON topology in the output file us.json:\n\n```\ngeo2topo states=us-states.json > us.json\n```\n\nThe resulting topology has a “states” object which corresponds to the input geometry. For convenience, you can omit the object name and specify only the output *file* name; the object name will then be the basename of the file, with the directory and extension removed. For example, to convert the states.json GeoJSON FeatureCollection to a TopologyJSON topology with the “states” object in us.json:\n\n```\ngeo2topo states.json > us.json\n```\n\nAny properties and identifiers of input [feature objects](https://tools.ietf.org/html/rfc7946#section-3.2) are propagated to the output. If you want to transform or filter properties, try [ndjson-cli](https://github.com/mbostock/ndjson-cli) as demonstrated in [Command-Line Cartography](https://medium.com/@mbostock/command-line-cartography-part-1-897aa8f8ca2c).\n\nSee also [topo2geo](https://github.com/topojson/topojson-client/blob/master/README.md#topo2geo).\n\n<a name=\"geo2topo_help\" href=\"#geo2topo_help\">#</a> geo2topo <b>-h</b>\n<br><a href=\"#geo2topo_help\">#</a> geo2topo <b>--help</b>\n\nOutput usage information.\n\n<a name=\"geo2topo_version\" href=\"#geo2topo_version\">#</a> geo2topo <b>-V</b>\n<br><a href=\"#geo2topo_version\">#</a> geo2topo <b>--version</b>\n\nOutput the version number.\n\n<a name=\"geo2topo_newline_delimited\" href=\"#geo2topo_newline_delimited\">#</a> geo2topo <b>-n</b>\n<br><a href=\"#geo2topo_newline_delimited\">#</a> geo2topo <b>--newline-delimited</b>\n\nAccept [newline-delimited JSON](http://ndjson.org/), with one feature per line.\n\n<a name=\"geo2topo_out\" href=\"#geo2topo_out\">#</a> geo2topo <b>-o</b> <i>file</i>\n<br><a href=\"#geo2topo_out\">#</a> geo2topo <b>--out</b> <i>file</i>\n\nSpecify the output TopoJSON file name. Defaults to “-” for stdout.\n\n<a name=\"geo2topo_quantization\" href=\"#geo2topo_quantization\">#</a> geo2topo <b>-q</b> <i>count</i>\n<br><a href=\"#geo2topo_quantization\">#</a> geo2topo <b>--quantization</b> <i>count</i>\n\nSpecify a pre-quantization paramter. 0 disables quantization. See <a href=\"#topology\">topojson.topology</a> for a description of quantization.\n","_attachments":{},"homepage":"https://github.com/topojson/topojson-server","bugs":{"url":"https://github.com/topojson/topojson-server/issues"},"license":"ISC"}