├── .eslintrc.js ├── .gitignore ├── CHANGELOG.md ├── LICENSE ├── README.md ├── REFERENCE.md ├── SECURITY.md ├── bin ├── mapshaper ├── mapshaper-gui └── mapshaper-xl ├── package-lock.json ├── package.json ├── rollup.config.js ├── src ├── buffer │ ├── mapshaper-buffer-common.mjs │ ├── mapshaper-path-buffer.mjs │ ├── mapshaper-path-buffer2.mjs │ ├── mapshaper-point-buffer.mjs │ ├── mapshaper-polygon-buffer.mjs │ └── mapshaper-polyline-buffer.mjs ├── classification │ ├── mapshaper-blacki.mjs │ ├── mapshaper-categorical-classifier.mjs │ ├── mapshaper-classification.mjs │ ├── mapshaper-classify-methods.mjs │ ├── mapshaper-classify-ramps.mjs │ ├── mapshaper-indexed-classifier.mjs │ ├── mapshaper-interpolation.mjs │ ├── mapshaper-nice-breaks.mjs │ └── mapshaper-sequential-classifier.mjs ├── cli │ ├── mapshaper-cli-utils.mjs │ ├── mapshaper-command-info.mjs │ ├── mapshaper-command-parser.mjs │ ├── mapshaper-command-utils.mjs │ ├── mapshaper-option-parsing-utils.mjs │ ├── mapshaper-option-validation.mjs │ ├── mapshaper-options.mjs │ ├── mapshaper-parse-commands.mjs │ ├── mapshaper-run-command.mjs │ └── mapshaper-run-commands.mjs ├── clipping │ ├── mapshaper-bbox-clipping.mjs │ ├── mapshaper-bbox2-clipping.mjs │ ├── mapshaper-clip-erase-lines.mjs │ ├── mapshaper-clip-utils.mjs │ ├── mapshaper-overlay-utils.mjs │ ├── mapshaper-point-clipping.mjs │ ├── mapshaper-polygon-clipping.mjs │ └── mapshaper-polyline-clipping.mjs ├── color │ ├── blending.mjs │ ├── color-names.mjs │ ├── color-schemes.mjs │ ├── color-utils.mjs │ └── graph-color.mjs ├── commands │ ├── mapshaper-add-shape.mjs │ ├── mapshaper-affine.mjs │ ├── mapshaper-alpha-shapes.mjs │ ├── mapshaper-buffer.mjs │ ├── mapshaper-calc.mjs │ ├── mapshaper-check-geometry.mjs │ ├── mapshaper-classify.mjs │ ├── mapshaper-clean.mjs │ ├── mapshaper-clip-erase.mjs │ ├── mapshaper-cluster.mjs │ ├── mapshaper-colorizer.mjs │ ├── mapshaper-comment.mjs │ ├── mapshaper-dashlines.mjs │ ├── mapshaper-data-fill.mjs │ ├── mapshaper-define.mjs │ ├── mapshaper-dissolve.mjs │ ├── mapshaper-dissolve2.mjs │ ├── mapshaper-divide.mjs │ ├── mapshaper-dots.mjs │ ├── mapshaper-drop.mjs │ ├── mapshaper-each.mjs │ ├── mapshaper-explode.mjs │ ├── mapshaper-external.mjs │ ├── mapshaper-filter-geom.mjs │ ├── mapshaper-filter-islands.mjs │ ├── mapshaper-filter-islands2.mjs │ ├── mapshaper-filter-points.mjs │ ├── mapshaper-filter-rename-fields.mjs │ ├── mapshaper-filter-slivers.mjs │ ├── mapshaper-filter.mjs │ ├── mapshaper-frame.mjs │ ├── mapshaper-fuzzy-join.mjs │ ├── mapshaper-graticule.mjs │ ├── mapshaper-help.mjs │ ├── mapshaper-if-elif-else-endif.mjs │ ├── mapshaper-ignore.mjs │ ├── mapshaper-include.mjs │ ├── mapshaper-info.mjs │ ├── mapshaper-inlay.mjs │ ├── mapshaper-innerlines.mjs │ ├── mapshaper-inspect.mjs │ ├── mapshaper-join.mjs │ ├── mapshaper-lines.mjs │ ├── mapshaper-merge-layers.mjs │ ├── mapshaper-mosaic.mjs │ ├── mapshaper-point-grid.mjs │ ├── mapshaper-point-to-grid.mjs │ ├── mapshaper-points.mjs │ ├── mapshaper-polygon-grid.mjs │ ├── mapshaper-polygons.mjs │ ├── mapshaper-print.mjs │ ├── mapshaper-proj.mjs │ ├── mapshaper-rectangle.mjs │ ├── mapshaper-rename-layers.mjs │ ├── mapshaper-require.mjs │ ├── mapshaper-rotate.mjs │ ├── mapshaper-run.mjs │ ├── mapshaper-scalebar.mjs │ ├── mapshaper-shape.mjs │ ├── mapshaper-simplify.mjs │ ├── mapshaper-snap.mjs │ ├── mapshaper-sort.mjs │ ├── mapshaper-split-on-grid.mjs │ ├── mapshaper-split.mjs │ ├── mapshaper-stitch.mjs │ ├── mapshaper-stop.mjs │ ├── mapshaper-subdivide.mjs │ ├── mapshaper-svg-style.mjs │ ├── mapshaper-symbols.mjs │ ├── mapshaper-target.mjs │ ├── mapshaper-union.mjs │ └── mapshaper-uniq.mjs ├── crs │ ├── mapshaper-custom-projections.mjs │ ├── mapshaper-densify.mjs │ ├── mapshaper-mixed-projection.mjs │ ├── mapshaper-proj-extents.mjs │ ├── mapshaper-proj-info.mjs │ ├── mapshaper-proj-utils.mjs │ ├── mapshaper-projection-params.mjs │ ├── mapshaper-projections.mjs │ ├── mapshaper-spherical-clipping.mjs │ └── mapshaper-spherical-rotation.mjs ├── dataset │ ├── mapshaper-catalog.mjs │ ├── mapshaper-command-utils.mjs │ ├── mapshaper-dataset-editor.mjs │ ├── mapshaper-dataset-utils.mjs │ ├── mapshaper-layer-utils.mjs │ ├── mapshaper-merging.mjs │ ├── mapshaper-metadata.mjs │ ├── mapshaper-source-utils.mjs │ └── mapshaper-target-utils.mjs ├── datatable │ ├── mapshaper-data-table.mjs │ ├── mapshaper-data-utils.mjs │ └── mapshaper-json-table.mjs ├── dissolve │ ├── mapshaper-data-aggregation.mjs │ ├── mapshaper-point-dissolve.mjs │ ├── mapshaper-polygon-dissolve.mjs │ ├── mapshaper-polygon-dissolve2.mjs │ ├── mapshaper-polygon-dissolver.mjs │ └── mapshaper-polyline-dissolve.mjs ├── expressions │ ├── mapshaper-each-geojson.mjs │ ├── mapshaper-expression-utils.mjs │ ├── mapshaper-expressions.mjs │ ├── mapshaper-feature-expressions.mjs │ ├── mapshaper-feature-proxy.mjs │ ├── mapshaper-io-proxy.mjs │ ├── mapshaper-layer-expressions.mjs │ ├── mapshaper-layer-proxy.mjs │ ├── mapshaper-target-proxy.mjs │ └── mapshaper-template-expressions.mjs ├── furniture │ ├── mapshaper-frame-utils.mjs │ ├── mapshaper-furniture-cmd.mjs │ ├── mapshaper-furniture.mjs │ └── mapshaper-key.mjs ├── geojson │ ├── geojson-common.mjs │ ├── geojson-export.mjs │ ├── geojson-import.mjs │ ├── json-parser.mjs │ └── mapshaper-stringify.mjs ├── geom │ ├── mapshaper-antimeridian-cuts.mjs │ ├── mapshaper-basic-geom.mjs │ ├── mapshaper-bounds-geom.mjs │ ├── mapshaper-bounds-search.mjs │ ├── mapshaper-bounds.mjs │ ├── mapshaper-dms.mjs │ ├── mapshaper-geodesic.mjs │ ├── mapshaper-geom-constants.mjs │ ├── mapshaper-geom.mjs │ ├── mapshaper-latlon.mjs │ ├── mapshaper-matrix2d.mjs │ ├── mapshaper-path-geom.mjs │ ├── mapshaper-perimeter-calc.mjs │ ├── mapshaper-polygon-geom.mjs │ ├── mapshaper-rounding.mjs │ ├── mapshaper-segment-geom.mjs │ ├── mapshaper-transform.mjs │ └── mapshaper-units.mjs ├── grids │ ├── mapshaper-grid-to-point-index.mjs │ ├── mapshaper-grid-utils.mjs │ ├── mapshaper-hex-grid.mjs │ └── mapshaper-square-grid.mjs ├── gui-require │ ├── index.js │ └── package.json ├── gui │ ├── dom-utils.mjs │ ├── gui-add-field-popup.mjs │ ├── gui-add-layer-popup.mjs │ ├── gui-alert.mjs │ ├── gui-basemap-control.mjs │ ├── gui-box-tool.mjs │ ├── gui-canvas-patterns.mjs │ ├── gui-canvas.mjs │ ├── gui-catalog-control.mjs │ ├── gui-console.mjs │ ├── gui-context-menu.mjs │ ├── gui-core.mjs │ ├── gui-display-arcs.mjs │ ├── gui-display-layer.mjs │ ├── gui-display-utils.mjs │ ├── gui-dom-cache.mjs │ ├── gui-draw-lines2.mjs │ ├── gui-drawing-pencil.mjs │ ├── gui-drawing-utils.mjs │ ├── gui-dynamic-crs.mjs │ ├── gui-edit-labels.mjs │ ├── gui-edit-modes.mjs │ ├── gui-edit-points.mjs │ ├── gui-el.mjs │ ├── gui-element-position.mjs │ ├── gui-elements.mjs │ ├── gui-events.mjs │ ├── gui-export-control.mjs │ ├── gui-highlight-box.mjs │ ├── gui-hit-control.mjs │ ├── gui-hit-test.mjs │ ├── gui-import-control.mjs │ ├── gui-import-utils.mjs │ ├── gui-inspection-control.mjs │ ├── gui-instance.mjs │ ├── gui-interaction-mode-control.mjs │ ├── gui-keyboard.mjs │ ├── gui-layer-control.mjs │ ├── gui-layer-renderer.mjs │ ├── gui-layer-utils.mjs │ ├── gui-lib.mjs │ ├── gui-map-extent.mjs │ ├── gui-map-nav.mjs │ ├── gui-map-style.mjs │ ├── gui-map-utils.mjs │ ├── gui-map.mjs │ ├── gui-mode-button.mjs │ ├── gui-mode-rules.mjs │ ├── gui-model.mjs │ ├── gui-modes.mjs │ ├── gui-mouse-utils.mjs │ ├── gui-mouse.mjs │ ├── gui-popup.mjs │ ├── gui-proxy.mjs │ ├── gui-rectangle-control.mjs │ ├── gui-repair-control.mjs │ ├── gui-save.mjs │ ├── gui-selection-tool.mjs │ ├── gui-session-history.mjs │ ├── gui-session-snapshot-control.mjs │ ├── gui-shape-hit.mjs │ ├── gui-sidebar-buttons.mjs │ ├── gui-simplify-control.mjs │ ├── gui-slider.mjs │ ├── gui-svg-display.mjs │ ├── gui-svg-furniture.mjs │ ├── gui-svg-hit.mjs │ ├── gui-svg-labels.mjs │ ├── gui-svg-symbols.mjs │ ├── gui-table.mjs │ ├── gui-tween.mjs │ ├── gui-undo.mjs │ └── gui.mjs ├── indexing │ ├── mapshaper-id-lookup-index.mjs │ └── mapshaper-id-test-index.mjs ├── io │ ├── mapshaper-export.mjs │ ├── mapshaper-file-export.mjs │ ├── mapshaper-file-import.mjs │ ├── mapshaper-file-reader.mjs │ ├── mapshaper-file-types.mjs │ ├── mapshaper-gzip.mjs │ ├── mapshaper-import.mjs │ ├── mapshaper-json-import.mjs │ ├── mapshaper-output-format.mjs │ └── mapshaper-zip.mjs ├── join │ ├── mapshaper-join-calc.mjs │ ├── mapshaper-join-filter.mjs │ ├── mapshaper-join-polygons-via-mosaic.mjs │ ├── mapshaper-join-polygons-via-points.mjs │ ├── mapshaper-join-tables.mjs │ ├── mapshaper-point-point-join.mjs │ ├── mapshaper-point-polygon-join.mjs │ ├── mapshaper-polygon-polygon-join.mjs │ └── mapshaper-polyline-polygon-join.mjs ├── kml │ ├── kml-export.mjs │ └── kml-import.mjs ├── mapshaper-api.mjs ├── mapshaper-cmd.mjs ├── mapshaper-control-flow.mjs ├── mapshaper-env.mjs ├── mapshaper-internal.mjs ├── mapshaper-job.mjs ├── mapshaper-require.mjs ├── mapshaper-stash.mjs ├── mapshaper.mjs ├── pack │ ├── mapshaper-pack.mjs │ ├── mapshaper-packed-table.mjs │ └── mapshaper-unpack.mjs ├── paths │ ├── mapshaper-arc-clean.mjs │ ├── mapshaper-arc-dissolve.mjs │ ├── mapshaper-arc-editor.mjs │ ├── mapshaper-arc-utils.mjs │ ├── mapshaper-arcs.mjs │ ├── mapshaper-coordinate-utils.mjs │ ├── mapshaper-intersection-cuts.mjs │ ├── mapshaper-path-endpoints.mjs │ ├── mapshaper-path-export.mjs │ ├── mapshaper-path-import.mjs │ ├── mapshaper-path-index.mjs │ ├── mapshaper-path-repair-utils.mjs │ ├── mapshaper-path-utils.mjs │ ├── mapshaper-pathfinder-utils.mjs │ ├── mapshaper-pathfinder.mjs │ ├── mapshaper-polyline-to-point.mjs │ ├── mapshaper-rectangle-utils.mjs │ ├── mapshaper-segment-intersection-info.mjs │ ├── mapshaper-segment-intersection-repair.mjs │ ├── mapshaper-segment-intersection.mjs │ ├── mapshaper-segment-sorting.mjs │ ├── mapshaper-shape-iter.mjs │ ├── mapshaper-shape-utils.mjs │ ├── mapshaper-snapping.mjs │ └── mapshaper-vertex-utils.mjs ├── points │ ├── mapshaper-anchor-points-v3.mjs │ ├── mapshaper-anchor-points.mjs │ ├── mapshaper-dot-density.mjs │ ├── mapshaper-point-index.mjs │ ├── mapshaper-point-utils.mjs │ └── mapshaper-polygon-centroid.mjs ├── polygons │ ├── mapshaper-mosaic-index.mjs │ ├── mapshaper-polygon-connectivity.mjs │ ├── mapshaper-polygon-holes.mjs │ ├── mapshaper-polygon-index.mjs │ ├── mapshaper-polygon-mosaic.mjs │ ├── mapshaper-polygon-neighbors.mjs │ ├── mapshaper-polygon-repair.mjs │ ├── mapshaper-polygon-tiler.mjs │ ├── mapshaper-ring-nesting.mjs │ ├── mapshaper-slivers.mjs │ └── mapshaper-tile-shape-index.mjs ├── polylines │ └── mapshaper-polyline-clean.mjs ├── shapefile │ ├── dbf-export.mjs │ ├── dbf-import.mjs │ ├── dbf-reader.mjs │ ├── dbf-writer.mjs │ ├── shp-common.mjs │ ├── shp-export.mjs │ ├── shp-import.mjs │ ├── shp-reader.mjs │ ├── shp-record.mjs │ └── shp-type.mjs ├── simplify │ ├── mapshaper-dp.mjs │ ├── mapshaper-heap.mjs │ ├── mapshaper-keep-shapes.mjs │ ├── mapshaper-post-simplify-repair.mjs │ ├── mapshaper-simplify-fast.mjs │ ├── mapshaper-simplify-info.mjs │ ├── mapshaper-simplify-pct.mjs │ ├── mapshaper-simplify-stats.mjs │ ├── mapshaper-variable-simplify.mjs │ └── mapshaper-visvalingam.mjs ├── svg │ ├── geojson-to-svg.mjs │ ├── mapshaper-svg.mjs │ ├── svg-definitions.mjs │ ├── svg-effect.mjs │ ├── svg-fetch.mjs │ ├── svg-hatch.mjs │ ├── svg-labels.mjs │ ├── svg-path-utils.mjs │ ├── svg-properties.mjs │ ├── svg-stringify.mjs │ └── svg-symbols.mjs ├── symbols │ ├── mapshaper-arrow-symbols.mjs │ ├── mapshaper-basic-symbols.mjs │ ├── mapshaper-path-symbols.mjs │ ├── mapshaper-ring-symbols.mjs │ ├── mapshaper-star-symbols.mjs │ └── mapshaper-symbol-utils.mjs ├── text │ ├── mapshaper-delim-export.mjs │ ├── mapshaper-delim-import.mjs │ ├── mapshaper-delim-reader.mjs │ ├── mapshaper-encoding-detection.mjs │ ├── mapshaper-encodings.mjs │ └── mapshaper-fixed-width.mjs ├── thirdparty │ └── geokdbush.mjs ├── topojson │ ├── topojson-arc-prune.mjs │ ├── topojson-common.mjs │ ├── topojson-export.mjs │ ├── topojson-import.mjs │ ├── topojson-presimplify.mjs │ ├── topojson-split.mjs │ └── topojson-validation.mjs ├── topology │ ├── mapshaper-arc-classifier.mjs │ ├── mapshaper-arc-index.mjs │ ├── mapshaper-hash-function.mjs │ ├── mapshaper-nodes.mjs │ ├── mapshaper-topology-chains-v1.mjs │ ├── mapshaper-topology-chains-v2.mjs │ ├── mapshaper-topology.mjs │ └── mapshaper-undershoots.mjs └── utils │ ├── mapshaper-binarray.mjs │ ├── mapshaper-calc-utils.mjs │ ├── mapshaper-filename-utils.mjs │ ├── mapshaper-logging.mjs │ ├── mapshaper-node-buffer.mjs │ ├── mapshaper-sha1.mjs │ ├── mapshaper-timing.mjs │ └── mapshaper-utils.mjs ├── test ├── _loader.js ├── add-shape-test.mjs ├── affine-test.mjs ├── anchor-points-test.mjs ├── antimeridian-cuts-test.mjs ├── arc-dissolve-test.mjs ├── arc-editor-test.mjs ├── arc-prune-test.mjs ├── arc-utils-test.mjs ├── arcs-test.mjs ├── bbox-clipping-test.mjs ├── blacki-test.mjs ├── blending-test.mjs ├── buffer-common-test.mjs ├── buffer-test.mjs ├── calc-test.mjs ├── calc-utils-test.mjs ├── chunker-test.mjs ├── classification-test.mjs ├── classify-test.mjs ├── clean-test.mjs ├── cli-utils-test.mjs ├── clip-bbox-test.mjs ├── clip-erase-test.mjs ├── clip-issues-test.mjs ├── cluster-test.mjs ├── color-schemes-test.mjs ├── color-utils-test.mjs ├── colorizer-test.mjs ├── command-parser-test.mjs ├── commands-test.mjs ├── common-test.mjs ├── custom-projections-test.mjs ├── dashlines-test.mjs ├── data-aggregation-test.mjs ├── data-fill-test.mjs ├── data-table-test.mjs ├── data-utils-test.mjs ├── data │ ├── ccw_polygon.json │ ├── dbf │ │ ├── POLYGON.dbf │ │ ├── big5.dbf │ │ ├── comma_separated.dbf │ │ ├── cpg │ │ │ ├── big5.cpg │ │ │ ├── big5.dbf │ │ │ ├── big5.shp │ │ │ ├── big5.shx │ │ │ ├── euckr.cpg │ │ │ ├── euckr.dbf │ │ │ ├── koi8r.cpg │ │ │ ├── koi8r.dbf │ │ │ ├── latin2.cpg │ │ │ ├── latin2.dbf │ │ │ ├── shiftjis.cpg │ │ │ ├── shiftjis.dbf │ │ │ ├── utf16.cpg │ │ │ ├── utf16.dbf │ │ │ ├── win1251.cpg │ │ │ ├── win1251.dbf │ │ │ ├── win874.cpg │ │ │ └── win874.dbf │ │ ├── duplicate_fields.dbf │ │ ├── eucjp.dbf │ │ ├── gb2312.dbf │ │ ├── gbk.dbf │ │ ├── latin1.dbf │ │ ├── ldid │ │ │ ├── chinese.dbf │ │ │ ├── chinese.prj │ │ │ ├── chinese.shp │ │ │ └── chinese.shx │ │ ├── ne_10m_time_zones.dbf │ │ ├── periphereies.dbf │ │ ├── shiftjis.dbf │ │ └── utf8.dbf │ ├── features │ │ ├── centroids │ │ │ ├── a.cpg │ │ │ ├── a.dbf │ │ │ ├── a.prj │ │ │ ├── a.qpj │ │ │ ├── a.shp │ │ │ ├── a.shx │ │ │ ├── b.cpg │ │ │ ├── b.dbf │ │ │ ├── b.prj │ │ │ ├── b.qpj │ │ │ ├── b.shp │ │ │ └── b.shx │ │ ├── clean │ │ │ ├── ex10_bowtie.json │ │ │ ├── ex11_ogc.geojson │ │ │ ├── ex12_ogc.geojson │ │ │ ├── ex13_ogc.json │ │ │ ├── ex14_ogc.json │ │ │ ├── ex15_ogc.json │ │ │ ├── ex16_ogc.json │ │ │ ├── ex17_ogc.json │ │ │ ├── ex18_ogc.json │ │ │ ├── ex19_ogc.json │ │ │ ├── ex1_yemen.json │ │ │ ├── ex20_ogc_line.json │ │ │ ├── ex21_crossed_lines.json │ │ │ ├── ex22_three_ia_precincts.json │ │ │ ├── ex2_yemen.json │ │ │ ├── ex3.json │ │ │ ├── ex4.json │ │ │ ├── ex5_three_precincts.json │ │ │ ├── ex6.json │ │ │ ├── ex7_britain.json │ │ │ ├── ex8_britain.json │ │ │ └── ex9_FranklinTwoPrecinctsDetail.json │ │ ├── clip │ │ │ ├── ex1_inner2.json │ │ │ ├── ex1_inner3.json │ │ │ ├── ex1_outer.json │ │ │ ├── ex2_grid.json │ │ │ ├── ex2_rectangle.json │ │ │ ├── ex3_inner.json │ │ │ └── ex3_outer.json │ │ ├── dissolve2 │ │ │ ├── ex1.json │ │ │ ├── ex2.json │ │ │ └── ex3_two_polygons.json │ │ ├── divide │ │ │ ├── ex1_line.json │ │ │ ├── ex1_polygon.json │ │ │ ├── ex2_line.json │ │ │ └── ex2_polygons.json │ │ ├── explode │ │ │ ├── ex1_invalid_rings.json │ │ │ └── ex2_nesting.json │ │ ├── grid │ │ │ └── rectangle.json │ │ ├── gzip │ │ │ ├── utf8_bom.csv.gz │ │ │ └── world_land.json.gz │ │ ├── inlay │ │ │ ├── ex1_inner.json │ │ │ ├── ex1_outer.json │ │ │ ├── ex2_Jackson_city.json │ │ │ └── ex2_Jackson_county.json │ │ ├── join │ │ │ ├── ex1_polyA.json │ │ │ ├── ex1_polyB.json │ │ │ ├── ex2_pointA.json │ │ │ ├── ex2_pointB.json │ │ │ ├── ex3_pointA.json │ │ │ └── ex3_pointB.json │ │ ├── merge_layers │ │ │ ├── ex1_a.json │ │ │ └── ex1_b.json │ │ ├── mosaic │ │ │ ├── test2.json │ │ │ ├── test3.json │ │ │ └── two_polygons.json │ │ ├── polygon_join │ │ │ ├── ex1_inner.json │ │ │ ├── ex1_outer.json │ │ │ ├── ex2_A.json │ │ │ ├── ex2_B.json │ │ │ ├── ex2_C.json │ │ │ ├── ex3_source.json │ │ │ ├── ex3_target.json │ │ │ ├── ex4_source.json │ │ │ └── ex4_target.json │ │ ├── polygons │ │ │ ├── ex1.dbf │ │ │ ├── ex1.prj │ │ │ ├── ex1.shp │ │ │ ├── ex1.shx │ │ │ └── ia_county_lines.json │ │ ├── require │ │ │ ├── command1.js │ │ │ ├── command2.js │ │ │ ├── test_module.js │ │ │ └── test_module2.mjs │ │ ├── run │ │ │ └── includes1.js │ │ ├── union │ │ │ ├── polygonA.json │ │ │ ├── polygonB.json │ │ │ └── polygonC.json │ │ └── zip │ │ │ ├── points.zip │ │ │ └── zip-in-zip.zip │ ├── geo_lines.dbf │ ├── geo_lines.prj │ ├── geo_lines.shp │ ├── geo_lines.shx │ ├── issues │ │ ├── 68 │ │ │ ├── cell1.shp │ │ │ └── clipper.shp │ │ ├── 125 │ │ │ └── openring.json │ │ ├── 153 │ │ │ ├── a.json │ │ │ └── b.json │ │ ├── 166 │ │ │ ├── a_utm.dbf │ │ │ ├── a_utm.prj │ │ │ ├── a_utm.shp │ │ │ ├── a_utm.shx │ │ │ ├── b_utm.dbf │ │ │ ├── b_utm.prj │ │ │ ├── b_utm.shp │ │ │ ├── b_utm.shx │ │ │ ├── c_utm.dbf │ │ │ ├── c_utm.shp │ │ │ ├── c_utm.shx │ │ │ ├── d_geo.dbf │ │ │ ├── d_geo.prj │ │ │ ├── d_geo.shp │ │ │ ├── d_geo.shx │ │ │ ├── e_merc.dbf │ │ │ ├── e_merc.prj │ │ │ ├── e_merc.shp │ │ │ └── e_merc.shx │ │ ├── 177 │ │ │ └── mixed_feature.json │ │ ├── 193 │ │ │ ├── gauss_kruger.prj │ │ │ ├── gauss_kruger.shp │ │ │ ├── three_points.dbf │ │ │ ├── three_points.prj │ │ │ ├── three_points.shp │ │ │ └── three_points.shx │ │ ├── 236 │ │ │ └── point.geojson │ │ ├── 386 │ │ │ └── data.csv │ │ ├── 384_invalid_json │ │ │ ├── ex2.json │ │ │ ├── sample.json │ │ │ └── sample1.json │ │ ├── 389_clipping_error │ │ │ ├── inner_polygon.json │ │ │ └── outer_polygon.json │ │ ├── 485_wildcard │ │ │ └── three_points.geojson │ │ ├── 518_519_shp_reading │ │ │ ├── data_corruption_error.cpg │ │ │ ├── data_corruption_error.dbf │ │ │ ├── data_corruption_error.prj │ │ │ ├── data_corruption_error.shp │ │ │ ├── data_corruption_error.shx │ │ │ ├── max_callstack_error.dbf │ │ │ ├── max_callstack_error.prj │ │ │ ├── max_callstack_error.shp │ │ │ └── max_callstack_error.shx │ │ ├── 538_missing_holes │ │ │ └── multipolygon.json │ │ ├── 595_clip_error │ │ │ ├── clipped.json │ │ │ └── clipper.json │ │ ├── bbox2_error │ │ │ └── usa.json │ │ ├── clip_error │ │ │ ├── clip_shape.json │ │ │ ├── clip_shape2.json │ │ │ └── original_shape.json │ │ ├── invalid_coords │ │ │ ├── invalid_coordinates.dbf │ │ │ ├── invalid_coordinates.json │ │ │ ├── invalid_coordinates.prj │ │ │ ├── invalid_coordinates.shp │ │ │ └── invalid_coordinates.shx │ │ ├── point_shapefile_import_error │ │ │ ├── points.dbf │ │ │ ├── points.shp │ │ │ └── points.shx │ │ ├── polygon_join_error │ │ │ ├── inner_polygon.json │ │ │ └── outer_polygon.json │ │ └── proj_issues │ │ │ └── split_island_geo.json │ ├── json │ │ └── JSONTestSuite │ │ │ ├── LICENSE │ │ │ └── test_parsing │ │ │ ├── i_number_double_huge_neg_exp.json │ │ │ ├── i_number_huge_exp.json │ │ │ ├── i_number_neg_int_huge_exp.json │ │ │ ├── i_number_pos_double_huge_exp.json │ │ │ ├── i_number_real_neg_overflow.json │ │ │ ├── i_number_real_pos_overflow.json │ │ │ ├── i_number_real_underflow.json │ │ │ ├── i_number_too_big_neg_int.json │ │ │ ├── i_number_too_big_pos_int.json │ │ │ ├── i_number_very_big_negative_int.json │ │ │ ├── i_object_key_lone_2nd_surrogate.json │ │ │ ├── i_string_1st_surrogate_but_2nd_missing.json │ │ │ ├── i_string_1st_valid_surrogate_2nd_invalid.json │ │ │ ├── i_string_UTF-16LE_with_BOM.json │ │ │ ├── i_string_UTF-8_invalid_sequence.json │ │ │ ├── i_string_UTF8_surrogate_U+D800.json │ │ │ ├── i_string_incomplete_surrogate_and_escape_valid.json │ │ │ ├── i_string_incomplete_surrogate_pair.json │ │ │ ├── i_string_incomplete_surrogates_escape_valid.json │ │ │ ├── i_string_invalid_lonely_surrogate.json │ │ │ ├── i_string_invalid_surrogate.json │ │ │ ├── i_string_invalid_utf-8.json │ │ │ ├── i_string_inverted_surrogates_U+1D11E.json │ │ │ ├── i_string_iso_latin_1.json │ │ │ ├── i_string_lone_second_surrogate.json │ │ │ ├── i_string_lone_utf8_continuation_byte.json │ │ │ ├── i_string_not_in_unicode_range.json │ │ │ ├── i_string_overlong_sequence_2_bytes.json │ │ │ ├── i_string_overlong_sequence_6_bytes.json │ │ │ ├── i_string_overlong_sequence_6_bytes_null.json │ │ │ ├── i_string_truncated-utf-8.json │ │ │ ├── i_string_utf16BE_no_BOM.json │ │ │ ├── i_string_utf16LE_no_BOM.json │ │ │ ├── i_structure_500_nested_arrays.json │ │ │ ├── i_structure_UTF-8_BOM_empty_object.json │ │ │ ├── n_array_1_true_without_comma.json │ │ │ ├── n_array_a_invalid_utf8.json │ │ │ ├── n_array_colon_instead_of_comma.json │ │ │ ├── n_array_comma_after_close.json │ │ │ ├── n_array_comma_and_number.json │ │ │ ├── n_array_double_comma.json │ │ │ ├── n_array_double_extra_comma.json │ │ │ ├── n_array_extra_close.json │ │ │ ├── n_array_extra_comma.json │ │ │ ├── n_array_incomplete.json │ │ │ ├── n_array_incomplete_invalid_value.json │ │ │ ├── n_array_inner_array_no_comma.json │ │ │ ├── n_array_invalid_utf8.json │ │ │ ├── n_array_items_separated_by_semicolon.json │ │ │ ├── n_array_just_comma.json │ │ │ ├── n_array_just_minus.json │ │ │ ├── n_array_missing_value.json │ │ │ ├── n_array_newlines_unclosed.json │ │ │ ├── n_array_number_and_comma.json │ │ │ ├── n_array_number_and_several_commas.json │ │ │ ├── n_array_spaces_vertical_tab_formfeed.json │ │ │ ├── n_array_star_inside.json │ │ │ ├── n_array_unclosed.json │ │ │ ├── n_array_unclosed_trailing_comma.json │ │ │ ├── n_array_unclosed_with_new_lines.json │ │ │ ├── n_array_unclosed_with_object_inside.json │ │ │ ├── n_incomplete_false.json │ │ │ ├── n_incomplete_null.json │ │ │ ├── n_incomplete_true.json │ │ │ ├── n_multidigit_number_then_00.json │ │ │ ├── n_number_++.json │ │ │ ├── n_number_+1.json │ │ │ ├── n_number_+Inf.json │ │ │ ├── n_number_-01.json │ │ │ ├── n_number_-1.0..json │ │ │ ├── n_number_-2..json │ │ │ ├── n_number_-NaN.json │ │ │ ├── n_number_.-1.json │ │ │ ├── n_number_.2e-3.json │ │ │ ├── n_number_0.1.2.json │ │ │ ├── n_number_0.3e+.json │ │ │ ├── n_number_0.3e.json │ │ │ ├── n_number_0.e1.json │ │ │ ├── n_number_0_capital_E+.json │ │ │ ├── n_number_0_capital_E.json │ │ │ ├── n_number_0e+.json │ │ │ ├── n_number_0e.json │ │ │ ├── n_number_1.0e+.json │ │ │ ├── n_number_1.0e-.json │ │ │ ├── n_number_1.0e.json │ │ │ ├── n_number_1_000.json │ │ │ ├── n_number_1eE2.json │ │ │ ├── n_number_2.e+3.json │ │ │ ├── n_number_2.e-3.json │ │ │ ├── n_number_2.e3.json │ │ │ ├── n_number_9.e+.json │ │ │ ├── n_number_Inf.json │ │ │ ├── n_number_NaN.json │ │ │ ├── n_number_U+FF11_fullwidth_digit_one.json │ │ │ ├── n_number_expression.json │ │ │ ├── n_number_hex_1_digit.json │ │ │ ├── n_number_hex_2_digits.json │ │ │ ├── n_number_infinity.json │ │ │ ├── n_number_invalid+-.json │ │ │ ├── n_number_invalid-negative-real.json │ │ │ ├── n_number_invalid-utf-8-in-bigger-int.json │ │ │ ├── n_number_invalid-utf-8-in-exponent.json │ │ │ ├── n_number_invalid-utf-8-in-int.json │ │ │ ├── n_number_minus_infinity.json │ │ │ ├── n_number_minus_sign_with_trailing_garbage.json │ │ │ ├── n_number_minus_space_1.json │ │ │ ├── n_number_neg_int_starting_with_zero.json │ │ │ ├── n_number_neg_real_without_int_part.json │ │ │ ├── n_number_neg_with_garbage_at_end.json │ │ │ ├── n_number_real_garbage_after_e.json │ │ │ ├── n_number_real_with_invalid_utf8_after_e.json │ │ │ ├── n_number_real_without_fractional_part.json │ │ │ ├── n_number_starting_with_dot.json │ │ │ ├── n_number_with_alpha.json │ │ │ ├── n_number_with_alpha_char.json │ │ │ ├── n_number_with_leading_zero.json │ │ │ ├── n_object_bad_value.json │ │ │ ├── n_object_bracket_key.json │ │ │ ├── n_object_comma_instead_of_colon.json │ │ │ ├── n_object_double_colon.json │ │ │ ├── n_object_emoji.json │ │ │ ├── n_object_garbage_at_end.json │ │ │ ├── n_object_key_with_single_quotes.json │ │ │ ├── n_object_lone_continuation_byte_in_key_and_trailing_comma.json │ │ │ ├── n_object_missing_colon.json │ │ │ ├── n_object_missing_key.json │ │ │ ├── n_object_missing_semicolon.json │ │ │ ├── n_object_missing_value.json │ │ │ ├── n_object_no-colon.json │ │ │ ├── n_object_non_string_key.json │ │ │ ├── n_object_non_string_key_but_huge_number_instead.json │ │ │ ├── n_object_repeated_null_null.json │ │ │ ├── n_object_several_trailing_commas.json │ │ │ ├── n_object_single_quote.json │ │ │ ├── n_object_trailing_comma.json │ │ │ ├── n_object_trailing_comment.json │ │ │ ├── n_object_trailing_comment_open.json │ │ │ ├── n_object_trailing_comment_slash_open.json │ │ │ ├── n_object_trailing_comment_slash_open_incomplete.json │ │ │ ├── n_object_two_commas_in_a_row.json │ │ │ ├── n_object_unquoted_key.json │ │ │ ├── n_object_unterminated-value.json │ │ │ ├── n_object_with_single_string.json │ │ │ ├── n_object_with_trailing_garbage.json │ │ │ ├── n_single_space.json │ │ │ ├── n_string_1_surrogate_then_escape.json │ │ │ ├── n_string_1_surrogate_then_escape_u.json │ │ │ ├── n_string_1_surrogate_then_escape_u1.json │ │ │ ├── n_string_1_surrogate_then_escape_u1x.json │ │ │ ├── n_string_accentuated_char_no_quotes.json │ │ │ ├── n_string_backslash_00.json │ │ │ ├── n_string_escape_x.json │ │ │ ├── n_string_escaped_backslash_bad.json │ │ │ ├── n_string_escaped_ctrl_char_tab.json │ │ │ ├── n_string_escaped_emoji.json │ │ │ ├── n_string_incomplete_escape.json │ │ │ ├── n_string_incomplete_escaped_character.json │ │ │ ├── n_string_incomplete_surrogate.json │ │ │ ├── n_string_incomplete_surrogate_escape_invalid.json │ │ │ ├── n_string_invalid-utf-8-in-escape.json │ │ │ ├── n_string_invalid_backslash_esc.json │ │ │ ├── n_string_invalid_unicode_escape.json │ │ │ ├── n_string_invalid_utf8_after_escape.json │ │ │ ├── n_string_leading_uescaped_thinspace.json │ │ │ ├── n_string_no_quotes_with_bad_escape.json │ │ │ ├── n_string_single_doublequote.json │ │ │ ├── n_string_single_quote.json │ │ │ ├── n_string_single_string_no_double_quotes.json │ │ │ ├── n_string_start_escape_unclosed.json │ │ │ ├── n_string_unescaped_ctrl_char.json │ │ │ ├── n_string_unescaped_newline.json │ │ │ ├── n_string_unescaped_tab.json │ │ │ ├── n_string_unicode_CapitalU.json │ │ │ ├── n_string_with_trailing_garbage.json │ │ │ ├── n_structure_100000_opening_arrays.json │ │ │ ├── n_structure_U+2060_word_joined.json │ │ │ ├── n_structure_UTF8_BOM_no_data.json │ │ │ ├── n_structure_angle_bracket_..json │ │ │ ├── n_structure_angle_bracket_null.json │ │ │ ├── n_structure_array_trailing_garbage.json │ │ │ ├── n_structure_array_with_extra_array_close.json │ │ │ ├── n_structure_array_with_unclosed_string.json │ │ │ ├── n_structure_ascii-unicode-identifier.json │ │ │ ├── n_structure_capitalized_True.json │ │ │ ├── n_structure_close_unopened_array.json │ │ │ ├── n_structure_comma_instead_of_closing_brace.json │ │ │ ├── n_structure_double_array.json │ │ │ ├── n_structure_end_array.json │ │ │ ├── n_structure_incomplete_UTF8_BOM.json │ │ │ ├── n_structure_lone-invalid-utf-8.json │ │ │ ├── n_structure_lone-open-bracket.json │ │ │ ├── n_structure_no_data.json │ │ │ ├── n_structure_null-byte-outside-string.json │ │ │ ├── n_structure_number_with_trailing_garbage.json │ │ │ ├── n_structure_object_followed_by_closing_object.json │ │ │ ├── n_structure_object_unclosed_no_value.json │ │ │ ├── n_structure_object_with_comment.json │ │ │ ├── n_structure_object_with_trailing_garbage.json │ │ │ ├── n_structure_open_array_apostrophe.json │ │ │ ├── n_structure_open_array_comma.json │ │ │ ├── n_structure_open_array_object.json │ │ │ ├── n_structure_open_array_open_object.json │ │ │ ├── n_structure_open_array_open_string.json │ │ │ ├── n_structure_open_array_string.json │ │ │ ├── n_structure_open_object.json │ │ │ ├── n_structure_open_object_close_array.json │ │ │ ├── n_structure_open_object_comma.json │ │ │ ├── n_structure_open_object_open_array.json │ │ │ ├── n_structure_open_object_open_string.json │ │ │ ├── n_structure_open_object_string_with_apostrophes.json │ │ │ ├── n_structure_open_open.json │ │ │ ├── n_structure_single_eacute.json │ │ │ ├── n_structure_single_star.json │ │ │ ├── n_structure_trailing_#.json │ │ │ ├── n_structure_uescaped_LF_before_string.json │ │ │ ├── n_structure_unclosed_array.json │ │ │ ├── n_structure_unclosed_array_partial_null.json │ │ │ ├── n_structure_unclosed_array_unfinished_false.json │ │ │ ├── n_structure_unclosed_array_unfinished_true.json │ │ │ ├── n_structure_unclosed_object.json │ │ │ ├── n_structure_unicode-identifier.json │ │ │ ├── n_structure_whitespace_U+2060_word_joiner.json │ │ │ ├── n_structure_whitespace_formfeed.json │ │ │ ├── y_array_arraysWithSpaces.json │ │ │ ├── y_array_empty-string.json │ │ │ ├── y_array_empty.json │ │ │ ├── y_array_ending_with_newline.json │ │ │ ├── y_array_false.json │ │ │ ├── y_array_heterogeneous.json │ │ │ ├── y_array_null.json │ │ │ ├── y_array_with_1_and_newline.json │ │ │ ├── y_array_with_leading_space.json │ │ │ ├── y_array_with_several_null.json │ │ │ ├── y_array_with_trailing_space.json │ │ │ ├── y_number.json │ │ │ ├── y_number_0e+1.json │ │ │ ├── y_number_0e1.json │ │ │ ├── y_number_after_space.json │ │ │ ├── y_number_double_close_to_zero.json │ │ │ ├── y_number_int_with_exp.json │ │ │ ├── y_number_minus_zero.json │ │ │ ├── y_number_negative_int.json │ │ │ ├── y_number_negative_one.json │ │ │ ├── y_number_negative_zero.json │ │ │ ├── y_number_real_capital_e.json │ │ │ ├── y_number_real_capital_e_neg_exp.json │ │ │ ├── y_number_real_capital_e_pos_exp.json │ │ │ ├── y_number_real_exponent.json │ │ │ ├── y_number_real_fraction_exponent.json │ │ │ ├── y_number_real_neg_exp.json │ │ │ ├── y_number_real_pos_exponent.json │ │ │ ├── y_number_simple_int.json │ │ │ ├── y_number_simple_real.json │ │ │ ├── y_object.json │ │ │ ├── y_object_basic.json │ │ │ ├── y_object_duplicated_key.json │ │ │ ├── y_object_duplicated_key_and_value.json │ │ │ ├── y_object_empty.json │ │ │ ├── y_object_empty_key.json │ │ │ ├── y_object_escaped_null_in_key.json │ │ │ ├── y_object_extreme_numbers.json │ │ │ ├── y_object_long_strings.json │ │ │ ├── y_object_simple.json │ │ │ ├── y_object_string_unicode.json │ │ │ ├── y_object_with_newlines.json │ │ │ ├── y_string_1_2_3_bytes_UTF-8_sequences.json │ │ │ ├── y_string_accepted_surrogate_pair.json │ │ │ ├── y_string_accepted_surrogate_pairs.json │ │ │ ├── y_string_allowed_escapes.json │ │ │ ├── y_string_backslash_and_u_escaped_zero.json │ │ │ ├── y_string_backslash_doublequotes.json │ │ │ ├── y_string_comments.json │ │ │ ├── y_string_double_escape_a.json │ │ │ ├── y_string_double_escape_n.json │ │ │ ├── y_string_escaped_control_character.json │ │ │ ├── y_string_escaped_noncharacter.json │ │ │ ├── y_string_in_array.json │ │ │ ├── y_string_in_array_with_leading_space.json │ │ │ ├── y_string_last_surrogates_1_and_2.json │ │ │ ├── y_string_nbsp_uescaped.json │ │ │ ├── y_string_nonCharacterInUTF-8_U+10FFFF.json │ │ │ ├── y_string_nonCharacterInUTF-8_U+FFFF.json │ │ │ ├── y_string_null_escape.json │ │ │ ├── y_string_one-byte-utf-8.json │ │ │ ├── y_string_pi.json │ │ │ ├── y_string_reservedCharacterInUTF-8_U+1BFFF.json │ │ │ ├── y_string_simple_ascii.json │ │ │ ├── y_string_space.json │ │ │ ├── y_string_surrogates_U+1D11E_MUSICAL_SYMBOL_G_CLEF.json │ │ │ ├── y_string_three-byte-utf-8.json │ │ │ ├── y_string_two-byte-utf-8.json │ │ │ ├── y_string_u+2028_line_sep.json │ │ │ ├── y_string_u+2029_par_sep.json │ │ │ ├── y_string_uEscape.json │ │ │ ├── y_string_uescaped_newline.json │ │ │ ├── y_string_unescaped_char_delete.json │ │ │ ├── y_string_unicode.json │ │ │ ├── y_string_unicodeEscapedBackslash.json │ │ │ ├── y_string_unicode_2.json │ │ │ ├── y_string_unicode_U+10FFFE_nonchar.json │ │ │ ├── y_string_unicode_U+1FFFE_nonchar.json │ │ │ ├── y_string_unicode_U+200B_ZERO_WIDTH_SPACE.json │ │ │ ├── y_string_unicode_U+2064_invisible_plus.json │ │ │ ├── y_string_unicode_U+FDD0_nonchar.json │ │ │ ├── y_string_unicode_U+FFFE_nonchar.json │ │ │ ├── y_string_unicode_escaped_double_quote.json │ │ │ ├── y_string_utf8.json │ │ │ ├── y_string_with_del_character.json │ │ │ ├── y_structure_lonely_false.json │ │ │ ├── y_structure_lonely_int.json │ │ │ ├── y_structure_lonely_negative_real.json │ │ │ ├── y_structure_lonely_null.json │ │ │ ├── y_structure_lonely_string.json │ │ │ ├── y_structure_lonely_true.json │ │ │ ├── y_structure_string_empty.json │ │ │ ├── y_structure_trailing_newline.json │ │ │ ├── y_structure_true_in_array.json │ │ │ └── y_structure_whitespace_array.json │ ├── kml │ │ └── Albania.kmz │ ├── msx │ │ ├── mapshaper_snapshot.msx │ │ ├── mapshaper_snapshot.msx.zip │ │ └── mapshaper_snapshot_2.msx │ ├── ne │ │ ├── LICENSE.md │ │ ├── VERSION │ │ ├── ne_110m_admin_0_boundary_lines_land.dbf │ │ ├── ne_110m_admin_0_boundary_lines_land.prj │ │ ├── ne_110m_admin_0_boundary_lines_land.shp │ │ ├── ne_110m_admin_0_boundary_lines_land.shx │ │ ├── ne_110m_admin_0_pacific_groupings.dbf │ │ ├── ne_110m_admin_0_pacific_groupings.prj │ │ ├── ne_110m_admin_0_pacific_groupings.shp │ │ ├── ne_110m_admin_0_pacific_groupings.shx │ │ ├── ne_110m_admin_0_scale_rank.dbf │ │ ├── ne_110m_admin_0_scale_rank.json │ │ ├── ne_110m_admin_0_scale_rank.prj │ │ ├── ne_110m_admin_0_scale_rank.shp │ │ ├── ne_110m_admin_0_scale_rank.shx │ │ ├── ne_110m_admin_1_states_provinces_lines.dbf │ │ ├── ne_110m_admin_1_states_provinces_lines.json │ │ ├── ne_110m_admin_1_states_provinces_lines.prj │ │ ├── ne_110m_admin_1_states_provinces_lines.shp │ │ ├── ne_110m_admin_1_states_provinces_lines.shx │ │ ├── ne_110m_admin_1_states_provinces_shp.dbf │ │ ├── ne_110m_admin_1_states_provinces_shp.prj │ │ ├── ne_110m_admin_1_states_provinces_shp.sbn │ │ ├── ne_110m_admin_1_states_provinces_shp.sbx │ │ ├── ne_110m_admin_1_states_provinces_shp.shp │ │ └── ne_110m_admin_1_states_provinces_shp.shx │ ├── one_point.geojson │ ├── shapefile │ │ ├── LICENSE │ │ ├── date-property.json │ │ ├── ignore-properties.json │ │ ├── ignore-properties.shp │ │ ├── latin1-property.dbf │ │ ├── latin1-property.json │ │ ├── latin1-property.prj │ │ ├── latin1-property.shp │ │ ├── latin1-property.shx │ │ ├── nad27 │ │ │ ├── popctr_state1970.dbf │ │ │ ├── popctr_state1970.prj │ │ │ ├── popctr_state1970.shp │ │ │ └── popctr_state1970.shx │ │ ├── polygons.json │ │ ├── polygons.shp │ │ ├── utf8-property.cpg │ │ ├── utf8-property.dbf │ │ ├── utf8-property.json │ │ ├── utf8-property.prj │ │ ├── utf8-property.shp │ │ └── utf8-property.shx │ ├── shplib │ │ ├── 3dpoints.dbf │ │ ├── 3dpoints.shp │ │ ├── 3dpoints.shx │ │ ├── LICENSE.LGPL │ │ ├── anno.aux │ │ ├── anno.dbf │ │ ├── anno.shp │ │ ├── anno.shx │ │ ├── brklinz.dbf │ │ ├── brklinz.shp │ │ ├── brklinz.shx │ │ ├── csah.dbf │ │ ├── csah.shp │ │ ├── csah.shx │ │ ├── masspntz.dbf │ │ ├── masspntz.shp │ │ ├── masspntz.shx │ │ ├── multipnt.dbf │ │ ├── multipnt.shp │ │ ├── multipnt.shx │ │ ├── pline.dbf │ │ ├── pline.shp │ │ ├── pline.shx │ │ ├── polygon.dbf │ │ ├── polygon.shp │ │ └── polygon.shx │ ├── six_counties.dbf │ ├── six_counties.prj │ ├── six_counties.shp │ ├── six_counties.shx │ ├── six_counties_three_null.json │ ├── text │ │ ├── empty.csv │ │ ├── empty_fields.csv │ │ ├── empty_fields2.csv │ │ ├── empty_fields3.csv │ │ ├── lorem.txt │ │ ├── states.csv │ │ ├── two_states.csv │ │ ├── two_states.tsv │ │ ├── utf16.txt │ │ ├── utf16_be_bom.csv │ │ ├── utf16_le_bom.csv │ │ ├── utf16bom.txt │ │ ├── utf16le.txt │ │ ├── utf16le_bom.txt │ │ ├── utf8_bom.csv │ │ └── utf8bom.txt │ ├── three_points.dbf │ ├── three_points.geojson │ ├── three_points.prj │ ├── three_points.shp │ ├── three_points.shx │ ├── two_states.dbf │ ├── two_states.json │ ├── two_states.prj │ ├── two_states.shp │ ├── two_states.shx │ ├── two_states_merc_copy.shp │ ├── two_states_mercator.dbf │ ├── two_states_mercator.prj │ ├── two_states_mercator.shp │ ├── two_states_mercator.shx │ └── world_land.json ├── dataset-utils-test.mjs ├── dbf-import-test.mjs ├── dbf-reader-test.mjs ├── dbf-writer-test.mjs ├── debug-test.mjs ├── define-test.mjs ├── delim-export-test.mjs ├── delim-import-test.mjs ├── delim-reader-test.mjs ├── densify-test.mjs ├── dissolve-points-test.mjs ├── dissolve-test.mjs ├── dissolve2-test.mjs ├── divide-test.mjs ├── dms-test.mjs ├── dots-test.mjs ├── dp-test.mjs ├── drop-test.mjs ├── each-test.mjs ├── encoding-detection-test.mjs ├── encodings-test.mjs ├── explode.test.mjs ├── export-test.mjs ├── expression-utils-test.mjs ├── expressions-test.mjs ├── external-test.mjs ├── figures.txt ├── file-export-test.mjs ├── file-import-test.mjs ├── file-reader-test.mjs ├── file-types-test.mjs ├── filename-utils-test.mjs ├── filter-geom-test.mjs ├── filter-islands-test.mjs ├── filter-rename-fields-test.mjs ├── filter-slivers-test.mjs ├── filter-test.mjs ├── fixed-width-test.mjs ├── frame-test.mjs ├── frame-utils-test.mjs ├── fuzzy-join-test.mjs ├── geodesic-test.mjs ├── geojson-test.mjs ├── geojson-to-svg-test.mjs ├── geom-test.mjs ├── graticule-test.mjs ├── grid-test.mjs ├── gzip-test.mjs ├── heap-test.mjs ├── helpers.mjs ├── id-lookup-index-test.mjs ├── if-elif-else-test.mjs ├── import-test.mjs ├── include-test.mjs ├── info-test.mjs ├── inlay-test.mjs ├── innerlines-test.mjs ├── interpolation-test.mjs ├── intersection-cuts-test.mjs ├── issue-160-test.mjs ├── issue-161-test.mjs ├── issue-166-test.mjs ├── issue-171-test.mjs ├── issue-174-test.mjs ├── issue-192-test.mjs ├── issue-193-test.mjs ├── issue-236-test.mjs ├── issue-247-test.mjs ├── issue-269-field-order.mjs ├── issue-304-test.mjs ├── issue-337-test.mjs ├── issue-339-test.mjs ├── issue-340-test.mjs ├── issue-356-test.mjs ├── issue-389-intersection-test.mjs ├── issue-485-test.mjs ├── issue-538-test.mjs ├── issue-clean-errors.mjs ├── issue-invalid-coords.mjs ├── join-calc-test.mjs ├── join-filter-test.mjs ├── join-points-to-points-test.mjs ├── join-points-to-polygons-test.mjs ├── join-polygons-to-polygons-test.mjs ├── join-polygons-to-polylines-test.mjs ├── join-test.mjs ├── json-import-test.mjs ├── json-parse-performance-test.mjs ├── json-parse-test.mjs ├── json-table-test.mjs ├── keep-shapes-test.mjs ├── kml-test.mjs ├── lines-test.mjs ├── merge-layers-test.mjs ├── merging-test.mjs ├── metadata-test.mjs ├── mosaic-test.mjs ├── nodes-test.mjs ├── option-parsing-utils-test.mjs ├── options-test.mjs ├── pack-test.mjs ├── parse-commands-test.mjs ├── path-endpoints-test.mjs ├── path-import-test.mjs ├── path-index-test.mjs ├── pathfinder-utils-test.mjs ├── point-clipping-test.mjs ├── point-grid-test.mjs ├── point-to-grid-test.mjs ├── points-test.mjs ├── polygon-index-test.mjs ├── polygon-mosaic-test.mjs ├── polygon-repair-test.mjs ├── polygons-test.mjs ├── polyline-buffer-test.mjs ├── polyline-clean-test.mjs ├── polyline-clipping-test.mjs ├── proj-test.mjs ├── projection-params-test.mjs ├── projections-test.mjs ├── rectangle-test.mjs ├── rename-layers-test.mjs ├── require-test.mjs ├── rounding-test.mjs ├── run-test.mjs ├── scalebar-test.mjs ├── segment-geom-test.mjs ├── segment-intersection-test.mjs ├── self-intersection-test.mjs ├── shape-geom-test.mjs ├── shape-test.mjs ├── shape-utils-test.mjs ├── shapefile-test.mjs ├── shp-reader-test.mjs ├── simplify-fast-test.mjs ├── simplify-test.mjs ├── slivers-test.mjs ├── snapping-test.mjs ├── sort-test.mjs ├── source-utils-test.mjs ├── split-on-grid-test.mjs ├── split-test.mjs ├── stash-test.mjs ├── stop-test.mjs ├── stringify-test.mjs ├── subdivide-test.mjs ├── svg-data-test.mjs ├── svg-hatch-test.mjs ├── svg-properties-test.mjs ├── svg-stringify-test.mjs ├── svg-style-test.mjs ├── svg-symbols-test.mjs ├── svg-test.mjs ├── symbol-utils-test.mjs ├── symbols-test.mjs ├── target-test.mjs ├── target-utils-test.mjs ├── template-expressions-test.mjs ├── topojson-import-test.mjs ├── topojson-presimplify-test.mjs ├── topojson-split-test.mjs ├── topojson-test.mjs ├── topology-test.mjs ├── undershoots-test.mjs ├── union-test.mjs ├── uniq-test.mjs ├── units-test.mjs ├── utils-test.mjs ├── variable-simplify-test.mjs ├── visvalingam-test.mjs ├── x_clipping_bug.mjs └── zip-test.mjs └── www ├── assets ├── SourceSansPro-Regular.woff ├── SourceSansPro-Semibold.woff ├── epsg ├── esri ├── iosevka-light.woff2 ├── nad27 └── nad83 ├── basemap.js ├── elements.css ├── images ├── close.png ├── close2.png ├── eye.png ├── eye2.png ├── icon.png ├── slider_handle_v1.png ├── thumb-map.jpg └── thumb-satellite.jpg ├── index.html ├── manifest.js ├── modules.js └── page.css /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | __* 3 | node_modules 4 | npm-debug.log 5 | .npmignore 6 | .jshintrc 7 | /mapshaper.js 8 | /www/mapshaper-gui.js 9 | /www/mapshaper.js 10 | /www/node_modules.js 11 | # /www/basemap.js 12 | pre-publish 13 | pre-release.js 14 | release* 15 | nacis 16 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2025, Matthew Bloch 2 | 3 | This Source Code Form is subject to the terms of the Mozilla Public 4 | License, v. 2.0. If a copy of the MPL was not distributed with this 5 | file, You can obtain one at http://mozilla.org/MPL/2.0/. -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ### Supported Versions 4 | 5 | When a vulnerability is fixed, a new patch version will be released (e.g. 0.6.34 -> 0.6.35). 6 | 7 | ### Reporting a Vulnerability 8 | 9 | Please email the developer (Matthew Bloch) at masiyou@gmail.com to report a vulnerability. 10 | 11 | If preferred, you can create a new draft security advisory (https://github.com/mbloch/mapshaper/security/advisories) 12 | -------------------------------------------------------------------------------- /bin/mapshaper: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | var mapshaper = require('../mapshaper.js'); 4 | mapshaper.enableLogging(); 5 | mapshaper.runCommands(process.argv.slice(2), done); 6 | function done(err) { 7 | process.exit(err ? 1 : 0); 8 | } 9 | -------------------------------------------------------------------------------- /bin/mapshaper-xl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | // Run node in a child process with more memory 4 | // note: require('v8').getHeapStatistics().heap_size_limit seems to give the current limit 5 | var gb = 8; 6 | var args = process.argv.slice(2); 7 | var mapshaper = require('path').join(__dirname, 'mapshaper'); // path of mapshaper executable 8 | var memRxp = /^[0-9]+(gb?)?$/i; 9 | if (memRxp.test(args[0])) { 10 | gb = parseFloat(args.shift()); 11 | if (gb < 1 || gb > 64) { 12 | console.error('Unsupported heap size:', gb, 'GB'); 13 | process.exit(1); 14 | } 15 | } 16 | args = ['--max-old-space-size=' + Math.round(gb * 1000), mapshaper].concat(args); 17 | require('child_process').spawn(process.argv[0], args, {stdio: 'inherit'}); 18 | -------------------------------------------------------------------------------- /src/buffer/mapshaper-polygon-buffer.mjs: -------------------------------------------------------------------------------- 1 | import { dissolveBufferDataset } from '../buffer/mapshaper-buffer-common'; 2 | import { importGeoJSON } from '../geojson/geojson-import'; 3 | import { makeShapeBufferGeoJSON } from '../buffer/mapshaper-polyline-buffer'; 4 | 5 | export function makePolygonBuffer(lyr, dataset, opts) { 6 | var geojson = makeShapeBufferGeoJSON(lyr, dataset, opts); 7 | var dataset2 = importGeoJSON(geojson, {}); 8 | dissolveBufferDataset(dataset2); 9 | return dataset2; 10 | } 11 | -------------------------------------------------------------------------------- /src/classification/mapshaper-categorical-classifier.mjs: -------------------------------------------------------------------------------- 1 | import { getDiscreteValueGetter } from '../classification/mapshaper-classification'; 2 | 3 | export function getCategoricalClassifier(classValues, nullVal, opts) { 4 | // categories: strings to match in the data 5 | var categories = opts.categories; 6 | var classToValue = getDiscreteValueGetter(classValues, nullVal, opts.other); 7 | return function(val) { 8 | var i = categories.indexOf(val); 9 | var idx = -1; 10 | if (i >= 0) { 11 | idx = i; 12 | } else if (val) { 13 | idx = -2; // field contains an 'other' value 14 | } else { 15 | idx = -1; // field is empty (null value) 16 | } 17 | return classToValue(idx); 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /src/clipping/mapshaper-clip-erase-lines.mjs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/src/clipping/mapshaper-clip-erase-lines.mjs -------------------------------------------------------------------------------- /src/clipping/mapshaper-clip-utils.mjs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/src/clipping/mapshaper-clip-utils.mjs -------------------------------------------------------------------------------- /src/clipping/mapshaper-point-clipping.mjs: -------------------------------------------------------------------------------- 1 | import { PathIndex } from '../paths/mapshaper-path-index'; 2 | // 3 | export function clipPoints(points, clipShapes, arcs, type) { 4 | var index = new PathIndex(clipShapes, arcs); 5 | 6 | var points2 = points.reduce(function(memo, feat) { 7 | var n = feat ? feat.length : 0, 8 | feat2 = [], 9 | enclosed; 10 | 11 | for (var i=0; i -1; 13 | if (type == 'clip' && enclosed || type == 'erase' && !enclosed) { 14 | feat2.push(feat[i].concat()); 15 | } 16 | } 17 | 18 | memo.push(feat2.length > 0 ? feat2 : null); 19 | return memo; 20 | }, []); 21 | 22 | return points2; 23 | } 24 | -------------------------------------------------------------------------------- /src/commands/mapshaper-check-geometry.mjs: -------------------------------------------------------------------------------- 1 | 2 | import cmd from '../mapshaper-cmd'; 3 | import { stop, message } from '../utils/mapshaper-logging'; 4 | import { findSegmentIntersections } from '../paths/mapshaper-segment-intersection'; 5 | 6 | // currently undocumented, used in tests 7 | cmd.checkGeometry = function(targetLayer, dataset, opts) { 8 | if (!dataset.arcs) return; 9 | 10 | // TODO: only check the target layer for intersections 11 | var intersections = findSegmentIntersections(dataset.arcs); 12 | if (intersections.length > 0) { 13 | handleError(`Found ${intersections.length} intersection${intersections.length > 1 ? 's' : ''}.`, opts); 14 | } 15 | 16 | // TODO: look for other geometry errors 17 | }; 18 | 19 | function handleError(msg, opts) { 20 | var report = opts.strict ? stop : message; 21 | report(msg); 22 | } 23 | 24 | -------------------------------------------------------------------------------- /src/commands/mapshaper-comment.mjs: -------------------------------------------------------------------------------- 1 | import cmd from '../mapshaper-cmd'; 2 | import { verbose, message } from '../utils/mapshaper-logging'; 3 | 4 | cmd.comment = function(opts) { 5 | // TODO: print the comment in verbose mode 6 | // message('[comment]', opts.message); 7 | }; // no-op, so -comment doesn't trigger a parsing error 8 | -------------------------------------------------------------------------------- /src/commands/mapshaper-dissolve2.mjs: -------------------------------------------------------------------------------- 1 | import cmd from '../mapshaper-cmd'; 2 | import { dissolvePolygonLayer2 } from '../dissolve/mapshaper-polygon-dissolve2'; 3 | import { addIntersectionCuts } from '../paths/mapshaper-intersection-cuts'; 4 | import { requirePolygonLayer, layerHasPaths } from '../dataset/mapshaper-layer-utils'; 5 | 6 | // Removes small gaps and all overlaps 7 | cmd.dissolve2 = function(layers, dataset, opts) { 8 | layers.forEach(requirePolygonLayer); 9 | var nodes = addIntersectionCuts(dataset, opts); 10 | return layers.map(function(lyr) { 11 | if (!layerHasPaths(lyr)) return lyr; 12 | return dissolvePolygonLayer2(lyr, dataset, opts); 13 | }); 14 | }; 15 | -------------------------------------------------------------------------------- /src/commands/mapshaper-help.mjs: -------------------------------------------------------------------------------- 1 | import cmd from '../mapshaper-cmd'; 2 | import { print } from '../utils/mapshaper-logging'; 3 | import { getOptionParser } from '../cli/mapshaper-options'; 4 | 5 | cmd.printHelp = function(opts) { 6 | var str = getOptionParser().getHelpMessage(opts.command); 7 | print(str); 8 | }; 9 | -------------------------------------------------------------------------------- /src/commands/mapshaper-ignore.mjs: -------------------------------------------------------------------------------- 1 | import cmd from '../mapshaper-cmd'; 2 | import { layerIsEmpty } from '../dataset/mapshaper-layer-utils'; 3 | import { interrupt } from '../utils/mapshaper-logging'; 4 | 5 | cmd.ignore = function(targetLayer, dataset, opts) { 6 | if (opts.empty && layerIsEmpty(targetLayer)) { 7 | interrupt('Layer is empty, stopping processing'); 8 | } 9 | }; -------------------------------------------------------------------------------- /src/commands/mapshaper-print.mjs: -------------------------------------------------------------------------------- 1 | import cmd from '../mapshaper-cmd'; 2 | import { print } from '../utils/mapshaper-logging'; 3 | 4 | cmd.print = function(msgArg) { 5 | print(msgArg || ''); 6 | }; 7 | -------------------------------------------------------------------------------- /src/commands/mapshaper-sort.mjs: -------------------------------------------------------------------------------- 1 | import { compileFeatureExpression } from '../expressions/mapshaper-feature-expressions'; 2 | import { getFeatureCount } from '../dataset/mapshaper-layer-utils'; 3 | import cmd from '../mapshaper-cmd'; 4 | import utils from '../utils/mapshaper-utils'; 5 | 6 | cmd.sortFeatures = function(lyr, arcs, opts) { 7 | var n = getFeatureCount(lyr), 8 | ascending = !opts.descending, 9 | compiled = compileFeatureExpression(opts.expression, lyr, arcs), 10 | values = []; 11 | 12 | utils.repeat(n, function(i) { 13 | values.push(compiled(i)); 14 | }); 15 | 16 | var ids = utils.getSortedIds(values, ascending); 17 | if (lyr.shapes) { 18 | utils.reorderArray(lyr.shapes, ids); 19 | } 20 | if (lyr.data) { 21 | utils.reorderArray(lyr.data.getRecords(), ids); 22 | } 23 | }; 24 | -------------------------------------------------------------------------------- /src/commands/mapshaper-stop.mjs: -------------------------------------------------------------------------------- 1 | 2 | import { stopJob } from '../mapshaper-control-flow'; 3 | import cmd from '../mapshaper-cmd'; 4 | 5 | cmd.stop = function(job) { 6 | stopJob(job); 7 | }; 8 | -------------------------------------------------------------------------------- /src/crs/mapshaper-proj-utils.mjs: -------------------------------------------------------------------------------- 1 | 2 | export function getSemiMinorAxis(P) { 3 | return P.a * Math.sqrt(1 - (P.es || 0)); 4 | } 5 | 6 | export function getCircleRadiusFromAngle(P, angle) { 7 | // Using semi-minor axis radius, to prevent overflowing projection bounds 8 | // when clipping up to the edge of the projectable area 9 | // TODO: improve (this just gives a safe minimum distance, not the best distance) 10 | // TODO: modify point buffer function to use angle + ellipsoidal geometry 11 | return angle * Math.PI / 180 * getSemiMinorAxis(P); 12 | } 13 | -------------------------------------------------------------------------------- /src/dataset/mapshaper-metadata.mjs: -------------------------------------------------------------------------------- 1 | 2 | import { setDatasetCrsInfo, getCrsInfo, crsToProj4, getDatasetCRS } from '../crs/mapshaper-projections'; 3 | 4 | export function importMetadata(dataset, obj) { 5 | if (obj.proj4) { 6 | setDatasetCrsInfo(dataset, getCrsInfo(obj.proj4)); 7 | } 8 | } 9 | 10 | export function exportMetadata(dataset) { 11 | var crs = getDatasetCRS(dataset); 12 | var proj4 = null; 13 | if (crs) { 14 | proj4 = crsToProj4(crs); 15 | } 16 | return { 17 | proj4: proj4 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /src/expressions/mapshaper-io-proxy.mjs: -------------------------------------------------------------------------------- 1 | import utils from '../utils/mapshaper-utils'; 2 | 3 | export function getIOProxy(job) { 4 | async function addInputFile(filename, content) { 5 | if (utils.isPromise(content)) { 6 | content = await content; 7 | } 8 | io._cache[filename] = content; 9 | return filename; // return filename to support -run '-i {io.ifile()}' 10 | } 11 | var io = { 12 | _cache: {}, 13 | addInputFile, 14 | ifile: addInputFile // ifile() is an alias for addInputFile 15 | }; 16 | return io; 17 | } 18 | -------------------------------------------------------------------------------- /src/furniture/mapshaper-furniture-cmd.mjs: -------------------------------------------------------------------------------- 1 | 2 | export function addFurnitureLayer(lyr, catalog) { 3 | var o = { 4 | info: {}, 5 | layers: [lyr] 6 | }; 7 | catalog.getDatasets().push(o); 8 | } 9 | -------------------------------------------------------------------------------- /src/geom/mapshaper-bounds-geom.mjs: -------------------------------------------------------------------------------- 1 | import geom from '../geom/mapshaper-geom'; 2 | 3 | export function testSegmentBoundsIntersection(a, b, bb) { 4 | if (bb.containsPoint(a[0], a[1])) { 5 | return true; 6 | } 7 | return !!( 8 | geom.segmentIntersection(a[0], a[1], b[0], b[1], bb.xmin, bb.ymin, bb.xmin, bb.ymax) || 9 | geom.segmentIntersection(a[0], a[1], b[0], b[1], bb.xmin, bb.ymax, bb.xmax, bb.ymax) || 10 | geom.segmentIntersection(a[0], a[1], b[0], b[1], bb.xmax, bb.ymax, bb.xmax, bb.ymin) || 11 | geom.segmentIntersection(a[0], a[1], b[0], b[1], bb.xmax, bb.ymin, bb.xmin, bb.ymin)); 12 | } 13 | -------------------------------------------------------------------------------- /src/geom/mapshaper-geom-constants.mjs: -------------------------------------------------------------------------------- 1 | 2 | var WGS84 = { 3 | // https://en.wikipedia.org/wiki/Earth_radius 4 | SEMIMAJOR_AXIS: 6378137, 5 | SEMIMINOR_AXIS: 6356752.3142, 6 | AUTHALIC_RADIUS: 6371007.2, 7 | VOLUMETRIC_RADIUS: 6371000.8 8 | }; 9 | 10 | export { 11 | WGS84 12 | }; 13 | -------------------------------------------------------------------------------- /src/geom/mapshaper-geom.mjs: -------------------------------------------------------------------------------- 1 | import * as Geom from '../geom/mapshaper-basic-geom'; 2 | import * as PolygonCentroid from '../points/mapshaper-polygon-centroid'; 3 | import * as PathGeom from '../geom/mapshaper-path-geom'; 4 | import * as PolygonGeom from '../geom/mapshaper-polygon-geom'; 5 | import * as SegmentGeom from '../geom/mapshaper-segment-geom'; 6 | 7 | export default Object.assign({}, Geom, PolygonGeom, PathGeom, SegmentGeom, PolygonCentroid); 8 | -------------------------------------------------------------------------------- /src/grids/mapshaper-grid-utils.mjs: -------------------------------------------------------------------------------- 1 | 2 | import { distance2D } from '../geom/mapshaper-basic-geom'; 3 | 4 | // Source: https://diego.assencio.com/?index=8d6ca3d82151bad815f78addf9b5c1c6 5 | export function twoCircleIntersection(c1, r1, c2, r2) { 6 | var d = distance2D(c1[0], c1[1], c2[0], c2[1]); 7 | if (d >= r1 + r2) return 0; 8 | var r1sq = r1 * r1, 9 | r2sq = r2 * r2, 10 | d1 = (r1sq - r2sq + d * d) / (2 * d), 11 | d2 = d - d1; 12 | if (d <= Math.abs(r1 - r2)) { 13 | return Math.PI * Math.min(r1sq, r2sq); 14 | } 15 | return r1sq * Math.acos(d1/r1) - d1 * Math.sqrt(r1sq - d1 * d1) + 16 | r2sq * Math.acos(d2/r2) - d2 * Math.sqrt(r2sq - d2 * d2); 17 | } 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/gui-require/index.js: -------------------------------------------------------------------------------- 1 | 2 | module.exports = function() {}; 3 | -------------------------------------------------------------------------------- /src/gui-require/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mapshaper-gui-require", 3 | "main": "./index.js" 4 | } -------------------------------------------------------------------------------- /src/gui/gui-core.mjs: -------------------------------------------------------------------------------- 1 | var api = window.mapshaper; // assuming mapshaper is in global scope 2 | export var mapshaper = api, 3 | utils = api.utils, 4 | cli = api.cli, 5 | geom = api.geom, 6 | internal = api.internal, 7 | Bounds = internal.Bounds, 8 | UserError = internal.UserError, 9 | message = internal.message, // stop, error and message are overridden in gui-proxy.js 10 | stop = internal.stop, 11 | error = internal.error; 12 | 13 | api.enableLogging(); 14 | -------------------------------------------------------------------------------- /src/gui/gui-dom-cache.mjs: -------------------------------------------------------------------------------- 1 | export function DomCache() { 2 | var cache = {}; 3 | var used = {}; 4 | 5 | this.contains = function(html) { 6 | return html in cache; 7 | }; 8 | 9 | this.use = function(html) { 10 | var el = used[html] = cache[html]; 11 | return el; 12 | }; 13 | 14 | this.cleanup = function() { 15 | cache = used; 16 | used = {}; 17 | }; 18 | 19 | this.add = function(html, el) { 20 | used[html] = el; 21 | }; 22 | } 23 | -------------------------------------------------------------------------------- /src/gui/gui-drawing-pencil.mjs: -------------------------------------------------------------------------------- 1 | 2 | 3 | export function Pencil(gui, mouse, hit) { 4 | var self = this; 5 | var _on = false; 6 | 7 | self.turnOn = function() { 8 | _on = true; 9 | }; 10 | 11 | self.turnOff = function() { 12 | _on = false; 13 | }; 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/gui/gui-edit-modes.mjs: -------------------------------------------------------------------------------- 1 | import { initLabelDragging } from './gui-edit-labels'; 2 | import { initPointEditing } from './gui-edit-points'; 3 | import { initLineEditing } from './gui-draw-lines2'; 4 | 5 | 6 | export function initInteractiveEditing(gui, ext, hit) { 7 | initLabelDragging(gui, ext, hit); 8 | initPointEditing(gui, ext, hit); 9 | initLineEditing(gui, ext, hit); 10 | } 11 | -------------------------------------------------------------------------------- /src/gui/gui-import-utils.mjs: -------------------------------------------------------------------------------- 1 | import { showPrompt } from './gui-alert'; 2 | import { internal } from './gui-core'; 3 | 4 | export async function considerReprojecting(gui, dataset, opts) { 5 | var mapCRS = gui.map.getActiveLayerCRS(); 6 | var dataCRS = internal.getDatasetCRS(dataset); 7 | if (!dataCRS || !mapCRS || internal.crsAreEqual(mapCRS, dataCRS)) return; 8 | var msg = `The input file ${dataset?.info?.input_files[0] || ''} has a different projection from the current selected layer. Would you like to reproject it to match?`; 9 | var reproject = await showPrompt(msg, 'Reproject file?'); 10 | if (reproject) { 11 | internal.projectDataset(dataset, dataCRS, mapCRS, {densify: true}); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/gui/gui-mouse-utils.mjs: -------------------------------------------------------------------------------- 1 | export function initVariableClick(node, cb) { 2 | var downEvent = null; 3 | var downTime = 0; 4 | 5 | node.addEventListener('mousedown', function(e) { 6 | downEvent = e; 7 | downTime = Date.now(); 8 | }); 9 | 10 | node.addEventListener('mouseup', function(upEvent) { 11 | if (!downEvent) return; 12 | var shift = Math.abs(downEvent.pageX - upEvent.pageX) + 13 | Math.abs(downEvent.pageY - upEvent.pageY); 14 | var elapsed = Date.now() - downTime; 15 | if (shift > 5 || elapsed > 1000) return; 16 | downEvent = null; 17 | cb({time: elapsed}); 18 | }); 19 | } 20 | -------------------------------------------------------------------------------- /src/join/mapshaper-join-calc.mjs: -------------------------------------------------------------------------------- 1 | import { compileCalcExpression } from '../commands/mapshaper-calc'; 2 | 3 | // get function that returns an object containing calculated values 4 | export function getJoinCalc(src, exp) { 5 | var calc = compileCalcExpression({data: src}, null, exp); 6 | return function(ids, destRec) { 7 | if (!ids) ids = []; 8 | calc(ids, destRec); 9 | }; 10 | } 11 | -------------------------------------------------------------------------------- /src/join/mapshaper-polygon-polygon-join.mjs: -------------------------------------------------------------------------------- 1 | import { joinPolygonsViaMosaic } from '../join/mapshaper-join-polygons-via-mosaic'; 2 | import { joinPolygonsViaPoints } from '../join/mapshaper-join-polygons-via-points'; 3 | 4 | export function joinPolygonsToPolygons(targetLyr, targetDataset, source, opts) { 5 | if (opts.point_method) { 6 | return joinPolygonsViaPoints(targetLyr, targetDataset, source, opts); 7 | } else { 8 | return joinPolygonsViaMosaic(targetLyr, targetDataset, source, opts); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/kml/kml-export.mjs: -------------------------------------------------------------------------------- 1 | import { exportDatasetAsGeoJSON } from '../geojson/geojson-export'; 2 | import { getOutputFileBase } from '../utils/mapshaper-filename-utils'; 3 | // import { isKmzFile } from '../io/mapshaper-file-types'; 4 | 5 | export function exportKML(dataset, opts) { 6 | var toKML = require("@placemarkio/tokml").toKML; 7 | var geojsonOpts = Object.assign({combine_layers: true, geojson_type: 'FeatureCollection'}, opts); 8 | var geojson = exportDatasetAsGeoJSON(dataset, geojsonOpts); 9 | var kml = toKML(geojson); 10 | // TODO: add KMZ output 11 | // var useKmz = opts.file && isKmzFile(opts.file); 12 | var ofile = opts.file || getOutputFileBase(dataset) + '.kml'; 13 | return [{ 14 | content: kml, 15 | filename: ofile 16 | }]; 17 | } -------------------------------------------------------------------------------- /src/kml/kml-import.mjs: -------------------------------------------------------------------------------- 1 | 2 | import { importGeoJSON } from '../geojson/geojson-import'; 3 | import require from '../mapshaper-require'; 4 | 5 | export function importKML(str, opts) { 6 | var togeojson = require("@tmcw/togeojson"); 7 | var Parser = typeof DOMParser == 'undefined' ? require("@xmldom/xmldom").DOMParser : DOMParser; 8 | var geojson = togeojson.kml(new Parser().parseFromString(str, "text/xml")); 9 | return importGeoJSON(geojson, opts || {}); 10 | } 11 | -------------------------------------------------------------------------------- /src/mapshaper-api.mjs: -------------------------------------------------------------------------------- 1 | import { enableLogging } from './utils/mapshaper-logging'; 2 | import { runCommands, applyCommands, runCommandsXL } from './cli/mapshaper-run-commands'; 3 | 4 | import cmd from './mapshaper-cmd'; 5 | import internal from './mapshaper-internal'; 6 | import geom from './geom/mapshaper-geom'; 7 | import utils from './utils/mapshaper-utils'; 8 | import cli from './cli/mapshaper-cli-utils'; 9 | 10 | // the mapshaper public api only has 4 functions 11 | var api = { 12 | runCommands, 13 | applyCommands, 14 | runCommandsXL, 15 | enableLogging 16 | }; 17 | 18 | // Add some namespaces, for easier testability and 19 | // to expose internal functions to the web UI 20 | Object.assign(api, { 21 | cli, cmd, geom, utils, internal, 22 | }); 23 | 24 | export default api; 25 | -------------------------------------------------------------------------------- /src/mapshaper-cmd.mjs: -------------------------------------------------------------------------------- 1 | var cmd = {}; // command functions get added to this object 2 | export default cmd; 3 | -------------------------------------------------------------------------------- /src/mapshaper-env.mjs: -------------------------------------------------------------------------------- 1 | 2 | export function runningInBrowser() { 3 | return typeof window !== 'undefined' && typeof window.document !== 'undefined'; 4 | } 5 | -------------------------------------------------------------------------------- /src/mapshaper-require.mjs: -------------------------------------------------------------------------------- 1 | // Several dependencies are loaded via require() ... this module returns a 2 | // stub function when require() does not exist as a global function, 3 | // to avoid runtime errors (this should only happen in some tests when single 4 | // modules are imported) 5 | var f; 6 | if (typeof require == 'function') { 7 | f = require; 8 | } else { 9 | f = function() { 10 | // console.error('Unable to load module', name); 11 | }; 12 | } 13 | export default f; 14 | -------------------------------------------------------------------------------- /src/mapshaper-stash.mjs: -------------------------------------------------------------------------------- 1 | import { error } from './utils/mapshaper-logging'; 2 | 3 | // This module provides a way for multiple jobs to run together asynchronously 4 | // while keeping job-level context variables (like "defs") separate. 5 | 6 | var stash = {}; 7 | 8 | export function stashVar(key, val) { 9 | if (key in stash) { 10 | error('Tried to replace a stashed variable:', key); 11 | } 12 | stash[key] = val; 13 | } 14 | 15 | export function getStashedVar(key) { 16 | if (key in stash === false) { 17 | return undefined; // to support running commands in tests 18 | // error('Tried to read a nonexistent variable from the stash:', key); 19 | } 20 | return stash[key]; 21 | } 22 | 23 | export function clearStash() { 24 | stash = {}; 25 | } 26 | -------------------------------------------------------------------------------- /src/mapshaper.mjs: -------------------------------------------------------------------------------- 1 | // The entry point for the core mapshaper module 2 | import api from './mapshaper-api'; 3 | 4 | if (typeof module === "object" && module.exports) { 5 | module.exports = api; 6 | } else if (typeof window === "object" && window) { 7 | window.mapshaper = api; 8 | } 9 | -------------------------------------------------------------------------------- /src/paths/mapshaper-rectangle-utils.mjs: -------------------------------------------------------------------------------- 1 | 2 | // TODO: make this stricter (could give false positive on some degenerate paths) 3 | export function pathIsRectangle(ids, arcs) { 4 | var bbox = arcs.getSimpleShapeBounds(ids).toArray(); 5 | var iter = arcs.getShapeIter(ids); 6 | var count = 0; 7 | while (iter.hasNext()) { 8 | if (iter.x != bbox[0] && iter.x != bbox[2] || 9 | iter.y != bbox[1] && iter.y != bbox[3]) { 10 | return false; 11 | } 12 | count++; 13 | } 14 | if (count < 5) return false; 15 | if (bbox[2] > bbox[0] === false || bbox[3] > bbox[1] === false) return false; 16 | return true; 17 | } 18 | 19 | export function bboxToCoords(bbox) { 20 | return [[bbox[0], bbox[1]], [bbox[0], bbox[3]], [bbox[2], bbox[3]], 21 | [bbox[2], bbox[1]], [bbox[0], bbox[1]]]; 22 | } 23 | -------------------------------------------------------------------------------- /src/points/mapshaper-anchor-points-v3.mjs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/src/points/mapshaper-anchor-points-v3.mjs -------------------------------------------------------------------------------- /src/shapefile/shp-common.mjs: -------------------------------------------------------------------------------- 1 | import ShpType from '../shapefile/shp-type'; 2 | 3 | export function translateShapefileType(shpType) { 4 | if ([ShpType.POLYGON, ShpType.POLYGONM, ShpType.POLYGONZ].includes(shpType)) { 5 | return 'polygon'; 6 | } else if ([ShpType.POLYLINE, ShpType.POLYLINEM, ShpType.POLYLINEZ].includes(shpType)) { 7 | return 'polyline'; 8 | } else if ([ShpType.POINT, ShpType.POINTM, ShpType.POINTZ, 9 | ShpType.MULTIPOINT, ShpType.MULTIPOINTM, ShpType.MULTIPOINTZ].includes(shpType)) { 10 | return 'point'; 11 | } 12 | return null; 13 | } 14 | 15 | export function isSupportedShapefileType(t) { 16 | return [0,1,3,5,8,11,13,15,18,21,23,25,28].includes(t); 17 | } 18 | -------------------------------------------------------------------------------- /src/svg/svg-fetch.mjs: -------------------------------------------------------------------------------- 1 | import require from '../mapshaper-require'; 2 | 3 | var cache = {}; 4 | export function fetchFileSync(url) { 5 | if (url in cache) return cache[url]; 6 | var res = require('sync-request')('GET', url, {timeout: 2000}); 7 | var content = res.getBody().toString(); 8 | cache[url] = content; 9 | return content; 10 | } 11 | -------------------------------------------------------------------------------- /src/topojson/topojson-presimplify.mjs: -------------------------------------------------------------------------------- 1 | 2 | export function getPresimplifyFunction(width) { 3 | var quanta = 10000, // enough resolution for pixel-level detail at 1000px width and 10x zoom 4 | k = quanta / width; 5 | return function(z) { 6 | // could substitute a rounding function with decimal precision 7 | return z === Infinity ? 0 : Math.ceil(z * k); 8 | }; 9 | } 10 | -------------------------------------------------------------------------------- /src/topojson/topojson-split.mjs: -------------------------------------------------------------------------------- 1 | import { pruneArcs } from '../dataset/mapshaper-dataset-utils'; 2 | import utils from '../utils/mapshaper-utils'; 3 | 4 | // not in use 5 | 6 | // Divide a TopoJSON topology into multiple topologies, one for each 7 | // named geometry object. 8 | // Arcs are filtered and arc ids are reindexed as needed. 9 | 10 | export function splitTopology(topology) { 11 | var topologies = {}; 12 | Object.keys(topology.objects).forEach(function(name) { 13 | var split = { 14 | arcs: topology.arcs, 15 | // bbox: obj.bbox || null, 16 | objects: {} 17 | }; 18 | split.objects[name] = topology.objects[name]; 19 | utils.defaults(split, topology); 20 | pruneArcs(split); 21 | topologies[name] = split; 22 | }); 23 | return topologies; 24 | } 25 | -------------------------------------------------------------------------------- /src/utils/mapshaper-node-buffer.mjs: -------------------------------------------------------------------------------- 1 | // Fall back to browserify's Buffer polyfill 2 | var B = typeof Buffer != 'undefined' ? Buffer : require('buffer').Buffer; 3 | export { B as Buffer }; 4 | 5 | -------------------------------------------------------------------------------- /src/utils/mapshaper-timing.mjs: -------------------------------------------------------------------------------- 1 | // Support for timing using T.start() and T.stop() 2 | export var T = { 3 | stack: [], 4 | start: function() { 5 | T.stack.push(Date.now()); 6 | }, 7 | stop: function() { 8 | return (Date.now() - T.stack.pop()) + 'ms'; 9 | } 10 | }; 11 | 12 | export function tick(msg) { 13 | var now = Date.now(); 14 | var elapsed = tickTime ? ' - ' + (now - tickTime) + 'ms' : ''; 15 | tickTime = now; 16 | console.log((msg || '') + elapsed); 17 | } 18 | 19 | var tickTime = 0; 20 | -------------------------------------------------------------------------------- /test/blending-test.mjs: -------------------------------------------------------------------------------- 1 | import { blend } from '../src/color/blending' 2 | import assert from 'assert'; 3 | 4 | describe('blending.js', function () { 5 | describe('blend()', function () { 6 | it('test1', function () { 7 | const col = blend('#ff0000', 1, '#00ff00', 1); 8 | assert.equal(col, '#808000'); 9 | }) 10 | }) 11 | }) 12 | -------------------------------------------------------------------------------- /test/buffer-test.mjs: -------------------------------------------------------------------------------- 1 | 2 | import api from '../mapshaper.js'; 3 | import assert from 'assert'; 4 | 5 | 6 | describe('mapshaper-buffer.js', function () { 7 | 8 | describe('-buffer command', function () { 9 | it('converts line to polygon', function (done) { 10 | var line = { 11 | type: 'LineString', 12 | coordinates: [[0, 0], [2, 0]] 13 | }; 14 | api.applyCommands('-i line.json -buffer 2km -o buffer.json', {'line.json': line}, function(err, output) { 15 | var json = JSON.parse(output['buffer.json']); 16 | var poly = json.geometries[0]; 17 | assert.equal(json.geometries.length, 1); 18 | assert.equal(poly.type, 'Polygon'); 19 | done(); 20 | }) 21 | }) 22 | }) 23 | 24 | }) 25 | 26 | -------------------------------------------------------------------------------- /test/color-utils-test.mjs: -------------------------------------------------------------------------------- 1 | import { parseColor } from '../src/color/color-utils' 2 | import assert from 'assert'; 3 | 4 | describe('color-utils.js', function () { 5 | describe('parseColor()', function () { 6 | it('#00ff00', function () { 7 | const col = parseColor('#00ff00'); 8 | assert.deepEqual(col, {r: 0, g: 255, b: 0, a: 1 }); 9 | }) 10 | 11 | it ('black', function() { 12 | assert.deepEqual(parseColor('black'), {r: 0, g: 0, b: 0, a: 1}); 13 | }) 14 | 15 | it ('rgba(0, 34, 255,0.4)', function() { 16 | assert.deepEqual(parseColor('rgba(0, 34, 255,0.4)'), {r: 0, g: 34, b: 255, a: 0.4}); 17 | }) 18 | 19 | it ('rgb(0,2,90)', function() { 20 | assert.deepEqual(parseColor('rgb( 0,2,90)'), {r: 0, g: 2, b: 90, a: 1}); 21 | }) 22 | 23 | }) 24 | }) 25 | 26 | -------------------------------------------------------------------------------- /test/command-parser-test.mjs: -------------------------------------------------------------------------------- 1 | import api from '../mapshaper.js'; 2 | import assert from 'assert'; 3 | var internal = api.internal; 4 | 5 | describe('mapshaper-command-parser.js', function () { 6 | 7 | 8 | }) 9 | -------------------------------------------------------------------------------- /test/custom-projections-test.mjs: -------------------------------------------------------------------------------- 1 | import assert from 'assert'; 2 | import api from '../mapshaper.js'; 3 | var internal = api.internal; 4 | 5 | describe('mapshaper-custom-projections.js', function() { 6 | 7 | describe('parseCustomParams()', function() { 8 | 9 | it ('test1', function() { 10 | var target = {AK: {lon_0: -141, position: [0.1, 0.9]}} 11 | var output = internal.parseCustomParams(['AK.lon_0=-141', 'AK.position=0.1,0.9']); 12 | assert.deepEqual(output, target); 13 | 14 | }); 15 | }); 16 | 17 | }); -------------------------------------------------------------------------------- /test/data-aggregation-test.mjs: -------------------------------------------------------------------------------- 1 | import api from '../mapshaper.js'; 2 | import assert from 'assert'; 3 | var internal = api.internal; 4 | 5 | 6 | describe('mapshaper-data-aggregation.js', function () { 7 | describe('getMultiFieldKeyFunction()', function () { 8 | var f = internal.getMultiFieldKeyFunction; 9 | it('single keys', function () { 10 | assert.equal(f(['foo'])({foo: 'bar'}), 'bar'); 11 | assert.equal(f(['foo'])({foo: 100.23}), '100.23'); 12 | assert.equal(f(['foo'])({foo: true}), 'true'); 13 | assert.equal(f(['foo'])({}), 'undefined'); 14 | }) 15 | it('multiple keys', function () { 16 | assert.equal(f(['foo','bar','baz'])({foo:'a', bar:0, baz:null}), 'a~~0~~null'); 17 | }) 18 | }) 19 | 20 | }) 21 | -------------------------------------------------------------------------------- /test/data/dbf/POLYGON.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/dbf/POLYGON.dbf -------------------------------------------------------------------------------- /test/data/dbf/big5.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/dbf/big5.dbf -------------------------------------------------------------------------------- /test/data/dbf/comma_separated.dbf: -------------------------------------------------------------------------------- 1 | _aWAUGSTUMSNPIEZIMESCP 68,50010k 66,30010k 65,50010k 64,30010k 64,30010k 68,50010k 67,80010k -------------------------------------------------------------------------------- /test/data/dbf/cpg/big5.cpg: -------------------------------------------------------------------------------- 1 | Big-5 -------------------------------------------------------------------------------- /test/data/dbf/cpg/big5.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/dbf/cpg/big5.dbf -------------------------------------------------------------------------------- /test/data/dbf/cpg/big5.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/dbf/cpg/big5.shp -------------------------------------------------------------------------------- /test/data/dbf/cpg/big5.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/dbf/cpg/big5.shx -------------------------------------------------------------------------------- /test/data/dbf/cpg/euckr.cpg: -------------------------------------------------------------------------------- 1 | EUC-KR -------------------------------------------------------------------------------- /test/data/dbf/cpg/euckr.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/dbf/cpg/euckr.dbf -------------------------------------------------------------------------------- /test/data/dbf/cpg/koi8r.cpg: -------------------------------------------------------------------------------- 1 | koi8r -------------------------------------------------------------------------------- /test/data/dbf/cpg/koi8r.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/dbf/cpg/koi8r.dbf -------------------------------------------------------------------------------- /test/data/dbf/cpg/latin2.cpg: -------------------------------------------------------------------------------- 1 | latin2 -------------------------------------------------------------------------------- /test/data/dbf/cpg/latin2.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/dbf/cpg/latin2.dbf -------------------------------------------------------------------------------- /test/data/dbf/cpg/shiftjis.cpg: -------------------------------------------------------------------------------- 1 | shiftjis -------------------------------------------------------------------------------- /test/data/dbf/cpg/shiftjis.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/dbf/cpg/shiftjis.dbf -------------------------------------------------------------------------------- /test/data/dbf/cpg/utf16.cpg: -------------------------------------------------------------------------------- 1 | UTF-16 -------------------------------------------------------------------------------- /test/data/dbf/cpg/utf16.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/dbf/cpg/utf16.dbf -------------------------------------------------------------------------------- /test/data/dbf/cpg/win1251.cpg: -------------------------------------------------------------------------------- 1 | 1251 -------------------------------------------------------------------------------- /test/data/dbf/cpg/win1251.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/dbf/cpg/win1251.dbf -------------------------------------------------------------------------------- /test/data/dbf/cpg/win874.cpg: -------------------------------------------------------------------------------- 1 | 874 -------------------------------------------------------------------------------- /test/data/dbf/cpg/win874.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/dbf/cpg/win874.dbf -------------------------------------------------------------------------------- /test/data/dbf/duplicate_fields.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/dbf/duplicate_fields.dbf -------------------------------------------------------------------------------- /test/data/dbf/eucjp.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/dbf/eucjp.dbf -------------------------------------------------------------------------------- /test/data/dbf/gb2312.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/dbf/gb2312.dbf -------------------------------------------------------------------------------- /test/data/dbf/gbk.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/dbf/gbk.dbf -------------------------------------------------------------------------------- /test/data/dbf/latin1.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/dbf/latin1.dbf -------------------------------------------------------------------------------- /test/data/dbf/ldid/chinese.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/dbf/ldid/chinese.dbf -------------------------------------------------------------------------------- /test/data/dbf/ldid/chinese.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.0174532925199433]] -------------------------------------------------------------------------------- /test/data/dbf/ldid/chinese.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/dbf/ldid/chinese.shp -------------------------------------------------------------------------------- /test/data/dbf/ldid/chinese.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/dbf/ldid/chinese.shx -------------------------------------------------------------------------------- /test/data/dbf/ne_10m_time_zones.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/dbf/ne_10m_time_zones.dbf -------------------------------------------------------------------------------- /test/data/dbf/periphereies.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/dbf/periphereies.dbf -------------------------------------------------------------------------------- /test/data/dbf/shiftjis.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/dbf/shiftjis.dbf -------------------------------------------------------------------------------- /test/data/dbf/utf8.dbf: -------------------------------------------------------------------------------- 1 | sA NAMEC 国语國語 -------------------------------------------------------------------------------- /test/data/features/centroids/a.cpg: -------------------------------------------------------------------------------- 1 | UTF-8 -------------------------------------------------------------------------------- /test/data/features/centroids/a.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/features/centroids/a.dbf -------------------------------------------------------------------------------- /test/data/features/centroids/a.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] -------------------------------------------------------------------------------- /test/data/features/centroids/a.qpj: -------------------------------------------------------------------------------- 1 | GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]] 2 | -------------------------------------------------------------------------------- /test/data/features/centroids/a.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/features/centroids/a.shp -------------------------------------------------------------------------------- /test/data/features/centroids/a.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/features/centroids/a.shx -------------------------------------------------------------------------------- /test/data/features/centroids/b.cpg: -------------------------------------------------------------------------------- 1 | UTF-8 -------------------------------------------------------------------------------- /test/data/features/centroids/b.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/features/centroids/b.dbf -------------------------------------------------------------------------------- /test/data/features/centroids/b.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] -------------------------------------------------------------------------------- /test/data/features/centroids/b.qpj: -------------------------------------------------------------------------------- 1 | GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]] 2 | -------------------------------------------------------------------------------- /test/data/features/centroids/b.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/features/centroids/b.shp -------------------------------------------------------------------------------- /test/data/features/centroids/b.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/features/centroids/b.shx -------------------------------------------------------------------------------- /test/data/features/clean/ex10_bowtie.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "GeometryCollection", 3 | "geometries": [{ 4 | "type": "Polygon", 5 | "coordinates": [[[0, 2], [2, 2], [3, 2], [2, 3], [2, 2], [2, 0], [0, 0], [0, 2]]] 6 | }, { 7 | "type": "Polygon", 8 | "coordinates": [[[4, 2], [2, 2], [2, 4], [4, 2]]] 9 | }] 10 | } -------------------------------------------------------------------------------- /test/data/features/clean/ex11_ogc.geojson: -------------------------------------------------------------------------------- 1 | { 2 | "type": "FeatureCollection", 3 | "features": [ 4 | { "type": "Feature", "id": 1, "properties": { "Example": "Minimal" }, "geometry": { "type": "MultiPolygon", "coordinates": [ 5 | [ [ [ 3.0, 1.0 ], [ 1.0, 2.0 ], [ 2.0, 3.0 ], [ 1.0, 4.0 ], [ 3.0, 5.0 ], [ 5.0, 4.0 ], [ 4.0, 3.0 ], [ 5.0, 2.0 ], [ 3.0, 1.0 ] ] ], 6 | [ [ [ 7.0, 1.0 ], [ 5.0, 2.0 ], [ 6.0, 3.0 ], [ 5.0, 4.0 ], [ 7.0, 5.0 ], [ 9.0, 4.0 ], [ 8.0, 3.0 ], [ 9.0, 2.0 ], [ 7.0, 1.0 ] ] ] 7 | ] } } 8 | ] 9 | } -------------------------------------------------------------------------------- /test/data/features/clean/ex12_ogc.geojson: -------------------------------------------------------------------------------- 1 | {"type":"FeatureCollection", "features": [ 2 | {"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[5,4],[5,2],[3,1],[1,2],[1,4],[3,5],[5,4]]],[[[5,2],[5,4],[7,5],[9,4],[9,2],[7,1],[5,2]]]]},"properties":{"Example":"Minimal"},"id":1} 3 | ]} -------------------------------------------------------------------------------- /test/data/features/clean/ex13_ogc.json: -------------------------------------------------------------------------------- 1 | {"type":"MultiPolygon","coordinates":[ 2 | [[[5, 2], [5, 3], [6, 3], [6, 1], [4, 1], [4, 3], [5, 3], [5, 2]]], 3 | [[[1, 1], [1, 3], [2, 3], [2, 2], [2, 3], [3, 3], [3, 1], [1, 1]]] 4 | ]} -------------------------------------------------------------------------------- /test/data/features/clean/ex14_ogc.json: -------------------------------------------------------------------------------- 1 | {"type":"MultiPolygon","coordinates":[ 2 | [[[6, 5], [5, 4], [5, 3], [6, 3], [6, 1], [4, 1], [4, 3], [5, 3], [5, 4], [6, 5]]], 3 | [[[1, 1], [1, 3], [2, 3], [2, 4], [3, 5], [2, 4], [2, 3], [3, 3], [3, 1], [1, 1]]] 4 | ]} -------------------------------------------------------------------------------- /test/data/features/clean/ex15_ogc.json: -------------------------------------------------------------------------------- 1 | {"type":"Polygon","coordinates":[ 2 | [[1, 1], [1, 3], [3, 3], [3, 1], [1, 1]], 3 | [[2, 1], [1, 2], [2, 3], [3, 2], [2, 1]] 4 | ]} -------------------------------------------------------------------------------- /test/data/features/clean/ex16_ogc.json: -------------------------------------------------------------------------------- 1 | {"type":"Polygon","coordinates":[ 2 | [[1, 1], [1, 3], [3, 3], [3, 1], [1, 1]], 3 | [[2, 1], [1.1, 2], [2, 2.9], [2.9, 2], [2, 1]] 4 | ]} -------------------------------------------------------------------------------- /test/data/features/clean/ex17_ogc.json: -------------------------------------------------------------------------------- 1 | {"type":"Polygon","coordinates":[ 2 | [[1, 1], [1, 3], [3, 3], [3, 1], [1, 1]], 3 | [[2, 1], [1.1, 2], [2, 3], [2.9, 2], [2, 1]] 4 | ]} -------------------------------------------------------------------------------- /test/data/features/clean/ex18_ogc.json: -------------------------------------------------------------------------------- 1 | {"type":"Polygon","coordinates":[ 2 | [[1, 1], [1, 3], [3, 3], [3, 1], [1, 1]], [[1.5, 1], [1.5, 2], [2.5, 2], [2.5, 1], [1.5, 1]] 3 | ]} -------------------------------------------------------------------------------- /test/data/features/clean/ex19_ogc.json: -------------------------------------------------------------------------------- 1 | {"type":"Polygon","coordinates": 2 | [[[3, 1], [1, 1], [1, 3], [2, 3], [3, 3], [3, 1], [4, 1], [4, 3], [6, 3], [6, 1], [3, 1]]] 3 | } -------------------------------------------------------------------------------- /test/data/features/clean/ex20_ogc_line.json: -------------------------------------------------------------------------------- 1 | {"type":"LineString","coordinates": 2 | [[0, 0], [3, 3], [0, 3], [3, 0]] 3 | } -------------------------------------------------------------------------------- /test/data/features/clean/ex21_crossed_lines.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "type": "FeatureCollection", 4 | "features": [ 5 | { 6 | "type": "Feature", 7 | "properties": {"id": 0}, 8 | "geometry": { 9 | "type": "MultiLineString", 10 | "coordinates": [[[0, 0], [3, 3]], [[0, 1], [1, 0]]] 11 | } 12 | }, 13 | { 14 | "type": "Feature", 15 | "properties": {"id": 1}, 16 | "geometry": { 17 | "type": "LineString", 18 | "coordinates": [[1, 3], [3, 1]] 19 | } 20 | } 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /test/data/features/clean/ex3.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "GeometryCollection", 3 | "geometries": [{ 4 | "type": "Polygon", 5 | "coordinates": [[[1, 1], [1, 2], [2, 2], [2, 1], [1, 1]]] 6 | }, { 7 | "type": "Polygon", 8 | "coordinates": [[[0, 0], [0, 3], [3, 3], [3, 1.9], [1.1, 1.9], [1.1, 0], [0, 0]]] 9 | }, { 10 | "type": "Polygon", 11 | "coordinates": [[[1, 0], [1, 1.1], [1.9, 1.1], [1.9, 2], [3, 2], [3, 0], [1, 0]]] 12 | }] 13 | } -------------------------------------------------------------------------------- /test/data/features/clean/ex4.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "GeometryCollection", 3 | "geometries": [{ 4 | "type": "Polygon", 5 | "coordinates": [[[0, 0], [0, 3], [3, 3], [3, 1.9], [1.1, 1.9], [1.1, 0], [0, 0]]] 6 | }, { 7 | "type": "Polygon", 8 | "coordinates": [[[1, 0], [1, 1.1], [1.9, 1.1], [1.9, 2], [3, 2], [3, 0], [1, 0]]] 9 | }] 10 | } -------------------------------------------------------------------------------- /test/data/features/clean/ex6.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "GeometryCollection", 3 | "geometries": [{ 4 | "type": "Polygon", 5 | "coordinates": [[[0, 0], [0, 2], [2, 2], [2, 0], [0, 0]]] 6 | }, { 7 | "type": "Polygon", 8 | "coordinates": [[[1, 1], [3, 3], [5, 1], [3, -1], [1, 1]]] 9 | }] 10 | } -------------------------------------------------------------------------------- /test/data/features/clip/ex1_inner2.json: -------------------------------------------------------------------------------- 1 | {"type":"FeatureCollection", "features": [ 2 | {"type":"Feature","geometry":{"type":"Polygon","coordinates":[[ 3 | [-87.683302,42.071478], 4 | [-87.68077699999999,42.073189], 5 | [-87.68074939887087,42.07315957615481], 6 | [-87.67969598493819,42.071478], 7 | [-87.683302,42.071478]]]},"properties":{"GEOID":"IL09","NYTID":"IL09","SEAT":"09","ST":"IL","STATEFP":"17"}} 8 | ]} -------------------------------------------------------------------------------- /test/data/features/clip/ex1_inner3.json: -------------------------------------------------------------------------------- 1 | {"type":"FeatureCollection", "features": [ 2 | {"type":"Feature","geometry":{"type":"Polygon","coordinates":[[ 3 | [-87.683302,42.071478], 4 | [-87.683302,42.07315957615481], 5 | [-87.68074939887087,42.07315957615481], 6 | [-87.67969598493819,42.071478], 7 | [-87.683302,42.071478]]]},"properties":{"GEOID":"IL09","NYTID":"IL09","SEAT":"09","ST":"IL","STATEFP":"17"}} 8 | ]} -------------------------------------------------------------------------------- /test/data/features/clip/ex1_outer.json: -------------------------------------------------------------------------------- 1 | {"type":"FeatureCollection", "features": [ 2 | {"type":"Feature","geometry":{"type":"Polygon","coordinates":[[[-87.68203199115044,42.076721],[-87.68235899999999,42.075728999999995],[-87.679843229159,42.071713047556294],[-87.67936772808278,42.070954],[-87.684057,42.070954],[-87.684057,42.076721],[-87.68203199115044,42.076721]]]},"properties":{"GEOID":"17031","NAME":"Cook","ST":"IL","STATEFP":"17"}} 3 | ]} -------------------------------------------------------------------------------- /test/data/features/clip/ex2_rectangle.json: -------------------------------------------------------------------------------- 1 | {"type":"GeometryCollection","crs":null, "geometries": [ 2 | {"type":"Polygon","coordinates":[[[-8631382.35817249,4667050.116257201],[-8631382.35817249,4729984.141293795],[-8561514.807811085,4729984.141293795],[-8561514.807811085,4667050.116257201],[-8631382.35817249,4667050.116257201]]]} 3 | ]} -------------------------------------------------------------------------------- /test/data/features/clip/ex3_inner.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "MultiPolygon", 3 | "coordinates": [ 4 | [[[1, 1], [1, 2], [2, 2], [2, 1], [1, 1]]], 5 | [[[2, 1], [2, 2], [3, 2], [3, 1], [2, 1]]] 6 | ] 7 | } -------------------------------------------------------------------------------- /test/data/features/clip/ex3_outer.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "Polygon", 3 | "coordinates": [[[0, 0], [0, 3], [4, 3], [4, 0], [0, 0]]] 4 | } -------------------------------------------------------------------------------- /test/data/features/dissolve2/ex1.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "GeometryCollection", 3 | "geometries": [ 4 | { 5 | "type": "Polygon", 6 | "coordinates": [[[0, 0], [0, 3], [3, 3], [3, 0], [0, 0]], [[1, 1], [2, 1], [2, 2], [1, 2], [1, 1]]] 7 | }, { 8 | "type": "Polygon", 9 | "coordinates": [[[-1,-1], [-1, 4], [4, 4], [4, -1], [-1, -1]], [[1.1, 1.1], [1.9, 1.1], [1.9, 1.9], [1.1, 1.9], [1.1, 1.1]]] 10 | } 11 | ] 12 | } -------------------------------------------------------------------------------- /test/data/features/dissolve2/ex3_two_polygons.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "FeatureCollection", 3 | "features": [ 4 | { 5 | "type": "Feature", 6 | "properties": { 7 | "name": "A", 8 | "count": 4 9 | }, 10 | "geometry": { 11 | "type": "Polygon", 12 | "coordinates": [[[0, 1], [1, 2], [2, 1], [1, 0], [0, 1]]] 13 | } 14 | }, { 15 | "type": "Feature", 16 | "properties": { 17 | "name": "B", 18 | "count": 8 19 | }, 20 | "geometry": { 21 | "type": "Polygon", 22 | "coordinates": [[[1, 1], [2, 2], [3, 1], [2, 0], [1, 1]]] 23 | } 24 | } 25 | ] 26 | } -------------------------------------------------------------------------------- /test/data/features/divide/ex1_line.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "Feature", 3 | "properties": {"line_name": "B"}, 4 | "geometry": { 5 | "type": "LineString", 6 | "coordinates": [[0, 1], [2, 1]] 7 | } 8 | } -------------------------------------------------------------------------------- /test/data/features/divide/ex1_polygon.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "Feature", 3 | "properties": {"polygon_name": "A"}, 4 | "geometry": { 5 | "type": "Polygon", 6 | "coordinates": [[[0, 0], [0, 2], [1, 2], [1, 0], [0, 0]]] 7 | } 8 | } -------------------------------------------------------------------------------- /test/data/features/divide/ex2_line.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "Feature", 3 | "properties": {"line_name": "B"}, 4 | "geometry": { 5 | "type": "LineString", 6 | "coordinates": [[0, 1], [3, 1]] 7 | } 8 | } -------------------------------------------------------------------------------- /test/data/features/divide/ex2_polygons.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "FeatureCollection", 3 | "features": [ 4 | { 5 | "type": "Feature", 6 | "properties": {"polygon_name": "A"}, 7 | "geometry": { 8 | "type": "Polygon", 9 | "coordinates": [[[0, 0], [0, 2], [1, 2], [1, 0], [0, 0]]] 10 | } 11 | }, { 12 | "type": "Feature", 13 | "properties": {"polygon_name": "B"}, 14 | "geometry": { 15 | "type": "Polygon", 16 | "coordinates": [[[-1, -1], [-1, 3], [2, 3], [2, -1], [-1, -1]]] 17 | } 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /test/data/features/grid/rectangle.json: -------------------------------------------------------------------------------- 1 | {"type":"GeometryCollection","crs":null, "geometries": [ 2 | {"type":"Polygon","coordinates":[[[-8631382.35817249,4667050.116257201],[-8631382.35817249,4729984.141293795],[-8561514.807811085,4729984.141293795],[-8561514.807811085,4667050.116257201],[-8631382.35817249,4667050.116257201]]]} 3 | ]} -------------------------------------------------------------------------------- /test/data/features/gzip/utf8_bom.csv.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/features/gzip/utf8_bom.csv.gz -------------------------------------------------------------------------------- /test/data/features/gzip/world_land.json.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/features/gzip/world_land.json.gz -------------------------------------------------------------------------------- /test/data/features/inlay/ex1_inner.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "FeatureCollection", 3 | "features": [ 4 | { 5 | "type": "Feature", 6 | "properties": {"bar": "c"}, 7 | "geometry": { 8 | "type": "Polygon", 9 | "coordinates": [ 10 | [[2, 2], [1, 2], [1, 1], [2, 1], [2, 2]] 11 | ] 12 | } 13 | }, 14 | { 15 | "type": "Feature", 16 | "properties": {"bar": "d"}, 17 | "geometry": { 18 | "type": "Polygon", 19 | "coordinates": [ 20 | [[2, 1], [3, 1], [3, 2], [2, 2], [2, 1]] 21 | ] 22 | } 23 | } 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /test/data/features/inlay/ex1_outer.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "FeatureCollection", 3 | "features": [ 4 | { 5 | "type": "Feature", 6 | "properties": {"foo": "a"}, 7 | "geometry": { 8 | "type": "Polygon", 9 | "coordinates": [ 10 | [[0, 0], [2, 0], [2, 3], [0, 3], [0, 0]] 11 | ] 12 | } 13 | }, 14 | { 15 | "type": "Feature", 16 | "properties": {"foo": "b"}, 17 | "geometry": { 18 | "type": "Polygon", 19 | "coordinates": [ 20 | [[2, 0], [4, 0], [4, 3], [2, 3], [2, 0]] 21 | ] 22 | } 23 | } 24 | ]} -------------------------------------------------------------------------------- /test/data/features/join/ex1_polyA.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "Polygon", 3 | "coordinates": [[[1, 0], [1, 3], [4, 3], [4, 0], [1, 0]]] 4 | } -------------------------------------------------------------------------------- /test/data/features/join/ex1_polyB.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "FeatureCollection", 3 | "features": [{ 4 | "type": "Feature", 5 | "properties": {"id": "A"}, 6 | "geometry": { 7 | "type": "Polygon", 8 | "coordinates": [[[0, 0], [0, 1], [2, 1], [2, 0], [0, 0]]] 9 | } 10 | }, { 11 | "type": "Feature", 12 | "properties": {"id": "B"}, 13 | "geometry": { 14 | "type": "Polygon", 15 | "coordinates": [[[2, 0], [2, 1], [5, 1], [5, 0], [2, 0]]] 16 | } 17 | }, { 18 | "type": "Feature", 19 | "properties": {"id": "C"}, 20 | "geometry": { 21 | "type": "Polygon", 22 | "coordinates": [[[0, 1], [0, 1.5], [5, 1.5], [5, 1], [0, 1]]] 23 | } 24 | }] 25 | } -------------------------------------------------------------------------------- /test/data/features/join/ex2_pointA.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "Point", 3 | "coordinates": [0,100] 4 | } -------------------------------------------------------------------------------- /test/data/features/join/ex2_pointB.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "FeatureCollection", 3 | "features": [{ 4 | "type": "Feature", 5 | "properties": {"id": "A"}, 6 | "geometry": { 7 | "type": "Point", 8 | "coordinates": [0, 100] 9 | } 10 | }, { 11 | "type": "Feature", 12 | "properties": {"id": "B"}, 13 | "geometry": { 14 | "type": "Point", 15 | "coordinates": [10, 100] 16 | } 17 | }, { 18 | "type": "Feature", 19 | "properties": {"id": "C"}, 20 | "geometry": { 21 | "type": "Point", 22 | "coordinates": [100, 100] 23 | } 24 | }] 25 | } -------------------------------------------------------------------------------- /test/data/features/join/ex3_pointA.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "MultiPoint", 3 | "coordinates": [[179, 1], [0,0]] 4 | } -------------------------------------------------------------------------------- /test/data/features/join/ex3_pointB.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "FeatureCollection", 3 | "features": [{ 4 | "type": "Feature", 5 | "properties": {"id": "A"}, 6 | "geometry": { 7 | "type": "Point", 8 | "coordinates": [-179, 1] 9 | } 10 | }, { 11 | "type": "Feature", 12 | "properties": {"id": "B"}, 13 | "geometry": { 14 | "type": "Point", 15 | "coordinates": [0, 2] 16 | } 17 | }, { 18 | "type": "Feature", 19 | "properties": {"id": "C"}, 20 | "geometry": { 21 | "type": "Point", 22 | "coordinates": [90, 90] 23 | } 24 | }] 25 | } -------------------------------------------------------------------------------- /test/data/features/merge_layers/ex1_a.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "Feature", 3 | "properties": {"id": "a"}, 4 | "geometry": { 5 | "type": "Polygon", 6 | "coordinates": [[[0,0], [0,1], [2, 1], [2,0], [0,0]]] 7 | } 8 | } -------------------------------------------------------------------------------- /test/data/features/merge_layers/ex1_b.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "Feature", 3 | "properties": {"id": "b"}, 4 | "geometry": { 5 | "type": "Polygon", 6 | "coordinates": [[[1,0], [1,1], [2,1], [2,0], [1,0]]] 7 | } 8 | } -------------------------------------------------------------------------------- /test/data/features/mosaic/test2.json: -------------------------------------------------------------------------------- 1 | {"type":"GeometryCollection", "geometries": [ 2 | {"type":"Polygon","coordinates":[[[1,1],[1,2],[2,2],[2,1],[1,1],[1,0],[3,0],[3,3],[0,3],[0,1],[1,1]]]}, 3 | {"type":"Polygon","coordinates":[[[1,1],[2,1],[2,2],[1,2],[1,1]]]} 4 | ]} -------------------------------------------------------------------------------- /test/data/features/mosaic/test3.json: -------------------------------------------------------------------------------- 1 | {"type":"GeometryCollection", "geometries": [ 2 | {"type":"Polygon","coordinates":[[[1,1],[1,2],[2,2],[2,1],[1,1],[1,0],[3,0],[3,3],[0,3],[0,1],[1,1]]]} 3 | ]} -------------------------------------------------------------------------------- /test/data/features/mosaic/two_polygons.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "FeatureCollection", 3 | "features": [ 4 | { 5 | "type": "Feature", 6 | "properties": { 7 | "name": "A", 8 | "count": 4 9 | }, 10 | "geometry": { 11 | "type": "Polygon", 12 | "coordinates": [[[0, 1], [1, 2], [2, 1], [1, 0], [0, 1]]] 13 | } 14 | }, { 15 | "type": "Feature", 16 | "properties": { 17 | "name": "B", 18 | "count": 8 19 | }, 20 | "geometry": { 21 | "type": "Polygon", 22 | "coordinates": [[[1, 1], [2, 2], [3, 1], [2, 0], [1, 1]]] 23 | } 24 | } 25 | ] 26 | } -------------------------------------------------------------------------------- /test/data/features/polygon_join/ex1_outer.json: -------------------------------------------------------------------------------- 1 | {"type":"FeatureCollection", "features": [ 2 | {"type":"Feature","geometry":{"type":"Polygon","coordinates":[[[509957,1064656.8672818756],[510400.90387065226,1065078.2030064156],[511975.11389746604,1065885.4790276308],[512433.02182976605,1066267],[512607,1066267],[512607,1064439],[509957,1064439],[509957,1064656.8672818756]]]},"properties":{"STATE_NAME":"Michigan","FIPS":"26131","POPULATION":6421,"T":3433,"D":1176,"R":2066}} 3 | ]} -------------------------------------------------------------------------------- /test/data/features/polygon_join/ex2_A.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "FeatureCollection", 3 | "features": [ 4 | { 5 | "type": "Feature", 6 | "properties": { 7 | "name": "A", 8 | "value": 4 9 | }, 10 | "geometry": { 11 | "type": "Polygon", 12 | "coordinates": [[[0, 1], [1, 2], [2, 1], [1, 0], [0, 1]]] 13 | } 14 | } 15 | ] 16 | } -------------------------------------------------------------------------------- /test/data/features/polygon_join/ex2_B.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "FeatureCollection", 3 | "features": [{ 4 | "type": "Feature", 5 | "properties": { 6 | "name": "B", 7 | "value": 8 8 | }, 9 | "geometry": { 10 | "type": "Polygon", 11 | "coordinates": [[[1, 1], [2, 2], [3, 1], [2, 0], [1, 1]]] 12 | } 13 | } 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /test/data/features/polygon_join/ex2_C.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "FeatureCollection", 3 | "features": [ 4 | { 5 | "type": "Feature", 6 | "properties": { 7 | "name": "C", 8 | "cval": 8 9 | }, 10 | "geometry": { 11 | "type": "Polygon", 12 | "coordinates": [[[0.5, 0.5], [0.5, 1.5], [1.5, 1.5], [1.5, 0.5], [0.5, 0.5]]] 13 | } 14 | } 15 | ] 16 | } -------------------------------------------------------------------------------- /test/data/features/polygon_join/ex3_source.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "FeatureCollection", 3 | "features": [ 4 | { 5 | "type": "Feature", 6 | "properties": { 7 | "name": "A", 8 | "group": "foo" 9 | }, 10 | "geometry": { 11 | "type": "Polygon", 12 | "coordinates": [[[0.5, 0.5], [0.5, 1.5], [1, 1.5], [1, 0.5], [0.5, 0.5]]] 13 | } 14 | }, { 15 | "type": "Feature", 16 | "properties": { 17 | "name": "B", 18 | "group": "foo" 19 | }, 20 | "geometry": { 21 | "type": "Polygon", 22 | "coordinates": [[[1, 0.5], [1, 1.5], [1.5, 1.5], [1.5, 0.5], [1, 0.5]]] 23 | } 24 | } 25 | ] 26 | } -------------------------------------------------------------------------------- /test/data/features/polygon_join/ex3_target.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "FeatureCollection", 3 | "features": [ 4 | { 5 | "type": "Feature", 6 | "properties": {}, 7 | "geometry": { 8 | "type": "Polygon", 9 | "coordinates": [[[0, 1], [1, 2], [2, 1], [1, 0], [0, 1]]] 10 | } 11 | } 12 | ] 13 | } -------------------------------------------------------------------------------- /test/data/features/polygon_join/ex4_source.json: -------------------------------------------------------------------------------- 1 | {"type":"FeatureCollection", "features": [ 2 | {"type":"Feature","geometry":{"type":"Polygon","coordinates":[[[0,0],[2,0],[2,1],[0,1],[0,0]]]},"properties":{"money":10,"name":"C"}}, 3 | {"type":"Feature","geometry":{"type":"Polygon","coordinates":[[[1,1.5],[0.5,1.5],[0.5,0.5],[1,0.5],[1,1.5]]]},"properties":{"money":5,"name":"A"}}, 4 | {"type":"Feature","geometry":{"type":"Polygon","coordinates":[[[1,0.5],[1.5,0.5],[1.5,1.5],[1,1.5],[1,0.5]]]},"properties":{"money":3,"name":"B"}} 5 | ]} -------------------------------------------------------------------------------- /test/data/features/polygon_join/ex4_target.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "FeatureCollection", 3 | "features": [ 4 | { 5 | "type": "Feature", 6 | "properties": {}, 7 | "geometry": { 8 | "type": "Polygon", 9 | "coordinates": [[[0, 1], [1, 2], [2, 1], [1, 0], [0, 1]]] 10 | } 11 | } 12 | ] 13 | } -------------------------------------------------------------------------------- /test/data/features/polygons/ex1.dbf: -------------------------------------------------------------------------------- 1 | w A 2 | aN 0 0 0 0 0 0 -------------------------------------------------------------------------------- /test/data/features/polygons/ex1.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] -------------------------------------------------------------------------------- /test/data/features/polygons/ex1.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/features/polygons/ex1.shp -------------------------------------------------------------------------------- /test/data/features/polygons/ex1.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/features/polygons/ex1.shx -------------------------------------------------------------------------------- /test/data/features/require/command1.js: -------------------------------------------------------------------------------- 1 | 2 | module.exports = function(api) { 3 | var options = [{ 4 | name: 'string', 5 | DEFAULT: true 6 | }]; 7 | var cmd = { 8 | name: 'set-foo', 9 | options, 10 | command: run, 11 | target: 'layer' 12 | }; 13 | 14 | return cmd; 15 | 16 | // modifies layer in place 17 | function run(lyr, dataset, opts) { 18 | lyr.data.getRecords().forEach(function(d) { 19 | d.foo = opts.string || ''; 20 | }); 21 | } 22 | }; 23 | 24 | -------------------------------------------------------------------------------- /test/data/features/require/test_module.js: -------------------------------------------------------------------------------- 1 | var name = ''; 2 | module.exports = { 3 | setName: function(str) {name = str;}, 4 | getName: function() {return name;} 5 | }; 6 | -------------------------------------------------------------------------------- /test/data/features/require/test_module2.mjs: -------------------------------------------------------------------------------- 1 | 2 | export function wc(str) { 3 | return str.trim().split(/\s+/).length; 4 | } -------------------------------------------------------------------------------- /test/data/features/run/includes1.js: -------------------------------------------------------------------------------- 1 | 2 | module.exports.getCommand = function(io) { 3 | var data = [{"foo": "bar"}]; 4 | io.addInputFile('data.json', data); 5 | return '-i data.json'; 6 | }; 7 | -------------------------------------------------------------------------------- /test/data/features/union/polygonA.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "FeatureCollection", 3 | "features": [ 4 | { 5 | "type": "Feature", 6 | "properties": { 7 | "name": "A", 8 | "value": 4 9 | }, 10 | "geometry": { 11 | "type": "Polygon", 12 | "coordinates": [[[0, 1], [1, 2], [2, 1], [1, 0], [0, 1]]] 13 | } 14 | } 15 | ] 16 | } -------------------------------------------------------------------------------- /test/data/features/union/polygonB.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "FeatureCollection", 3 | "features": [{ 4 | "type": "Feature", 5 | "properties": { 6 | "name": "B", 7 | "value": 8 8 | }, 9 | "geometry": { 10 | "type": "Polygon", 11 | "coordinates": [[[1, 1], [2, 2], [3, 1], [2, 0], [1, 1]]] 12 | } 13 | } 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /test/data/features/union/polygonC.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "FeatureCollection", 3 | "features": [{ 4 | "type": "Feature", 5 | "properties": { 6 | "name": "C", 7 | "value": 0 8 | }, 9 | "geometry": { 10 | "type": "Polygon", 11 | "coordinates": [[[2.1, 1], [3.1, 2], [4.1, 1], [3.1, 0], [2.1, 1]]] 12 | } 13 | } 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /test/data/features/zip/points.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/features/zip/points.zip -------------------------------------------------------------------------------- /test/data/features/zip/zip-in-zip.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/features/zip/zip-in-zip.zip -------------------------------------------------------------------------------- /test/data/geo_lines.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/geo_lines.dbf -------------------------------------------------------------------------------- /test/data/geo_lines.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.017453292519943295]] -------------------------------------------------------------------------------- /test/data/geo_lines.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/geo_lines.shp -------------------------------------------------------------------------------- /test/data/geo_lines.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/geo_lines.shx -------------------------------------------------------------------------------- /test/data/issues/125/openring.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "Polygon", 3 | "coordinates": [ [ [ -123.936472948494043, 46.423938166423028 ], [ -123.941570215790534, 46.410857353712807 ], [ -123.967091078694651, 46.409983925012625 ], [ -123.966193889178754, 46.432689669756748 ], [ -123.992389576627573, 46.448185460817442 ], [ -123.993724005489852, 46.480935606795839 ], [ -123.987853112157794, 46.497188256459083 ], [ -123.9719549031593, 46.485522567600263 ], [ -123.972313347664482, 46.476438636999021 ], [ -123.942753113026853, 46.463145604000097 ], [ -123.956544422522541, 46.445230499899694 ] ] ] 4 | } -------------------------------------------------------------------------------- /test/data/issues/153/a.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "Polygon", 3 | "coordinates": [[[0, 0], [0, 1], [1, 1], [1, 0], [0, 0]]] 4 | } -------------------------------------------------------------------------------- /test/data/issues/153/b.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "Polygon", 3 | "coordinates": [[[1, 1], [2, 1], [2, 0], [1, 0], [1, 1]]] 4 | } -------------------------------------------------------------------------------- /test/data/issues/166/a_utm.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/issues/166/a_utm.dbf -------------------------------------------------------------------------------- /test/data/issues/166/a_utm.prj: -------------------------------------------------------------------------------- 1 | PROJCS["NAD_1983_UTM_Zone_18N",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-75.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]] -------------------------------------------------------------------------------- /test/data/issues/166/a_utm.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/issues/166/a_utm.shp -------------------------------------------------------------------------------- /test/data/issues/166/a_utm.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/issues/166/a_utm.shx -------------------------------------------------------------------------------- /test/data/issues/166/b_utm.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/issues/166/b_utm.dbf -------------------------------------------------------------------------------- /test/data/issues/166/b_utm.prj: -------------------------------------------------------------------------------- 1 | PROJCS["NAD_1983_UTM_Zone_18N",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-75.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]] -------------------------------------------------------------------------------- /test/data/issues/166/b_utm.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/issues/166/b_utm.shp -------------------------------------------------------------------------------- /test/data/issues/166/b_utm.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/issues/166/b_utm.shx -------------------------------------------------------------------------------- /test/data/issues/166/c_utm.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/issues/166/c_utm.dbf -------------------------------------------------------------------------------- /test/data/issues/166/c_utm.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/issues/166/c_utm.shp -------------------------------------------------------------------------------- /test/data/issues/166/c_utm.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/issues/166/c_utm.shx -------------------------------------------------------------------------------- /test/data/issues/166/d_geo.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/issues/166/d_geo.dbf -------------------------------------------------------------------------------- /test/data/issues/166/d_geo.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] -------------------------------------------------------------------------------- /test/data/issues/166/d_geo.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/issues/166/d_geo.shp -------------------------------------------------------------------------------- /test/data/issues/166/d_geo.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/issues/166/d_geo.shx -------------------------------------------------------------------------------- /test/data/issues/166/e_merc.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/issues/166/e_merc.dbf -------------------------------------------------------------------------------- /test/data/issues/166/e_merc.prj: -------------------------------------------------------------------------------- 1 | PROJCS["WGS_84_World_Mercator",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Mercator"],PARAMETER["central_meridian",0],PARAMETER["false_easting",0],PARAMETER["false_northing",0],PARAMETER["standard_parallel_1",0],UNIT["Meter",1]] -------------------------------------------------------------------------------- /test/data/issues/166/e_merc.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/issues/166/e_merc.shp -------------------------------------------------------------------------------- /test/data/issues/166/e_merc.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/issues/166/e_merc.shx -------------------------------------------------------------------------------- /test/data/issues/177/mixed_feature.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "type": "FeatureCollection", 4 | "features": [{ 5 | "type": "Feature", 6 | "properties": {"name": "A"}, 7 | "geometry": { 8 | "type": "MultiPoint", 9 | "coordinates": [[0, 1], [2, 3]] 10 | } 11 | }, { 12 | "type": "Feature", 13 | "properties": {"name": "B"}, 14 | "geometry": { 15 | "type": "LineString", 16 | "coordinates": [[0, 1], [2, 3], [4, 5]] 17 | } 18 | },{ 19 | "type": "Feature", 20 | "properties": {"name": "C"}, 21 | "geometry": { 22 | "type": "Polygon", 23 | "coordinates": [[[0, 1], [1, 1], [0, 0], [0, 1]]] 24 | } 25 | }] 26 | } 27 | -------------------------------------------------------------------------------- /test/data/issues/193/gauss_kruger.prj: -------------------------------------------------------------------------------- 1 | PROJCS["Beijing_1954_3_Degree_GK_CM_114E",GEOGCS["GCS_Beijing_1954",DATUM["D_Beijing_1954",SPHEROID["Krasovsky_1940",6378245.0,298.3]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Gauss_Kruger"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",114.0],PARAMETER["Scale_Factor",1.0],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]] -------------------------------------------------------------------------------- /test/data/issues/193/gauss_kruger.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/issues/193/gauss_kruger.shp -------------------------------------------------------------------------------- /test/data/issues/193/three_points.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/issues/193/three_points.dbf -------------------------------------------------------------------------------- /test/data/issues/193/three_points.prj: -------------------------------------------------------------------------------- 1 | PROJCS["Unknown",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Unknown Projection"],PARAMETER["central_meridian",0],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["Meter",1],PARAMETER["standard_parallel_1",0.0]] -------------------------------------------------------------------------------- /test/data/issues/193/three_points.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/issues/193/three_points.shp -------------------------------------------------------------------------------- /test/data/issues/193/three_points.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/issues/193/three_points.shx -------------------------------------------------------------------------------- /test/data/issues/236/point.geojson: -------------------------------------------------------------------------------- 1 | {"type":"FeatureCollection","features":[{"type":"Feature","properties":{"name":"Niagara Falls"},"geometry":{"type":"Point","coordinates":[-79.04411780507252,43.08771393436908]}}], 2 | "crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG::4326"}} 3 | } -------------------------------------------------------------------------------- /test/data/issues/386/data.csv: -------------------------------------------------------------------------------- 1 | plz,ort,bundesland 2 | 01067,Dresden,Sachsen -------------------------------------------------------------------------------- /test/data/issues/518_519_shp_reading/data_corruption_error.cpg: -------------------------------------------------------------------------------- 1 | UTF-8 -------------------------------------------------------------------------------- /test/data/issues/518_519_shp_reading/data_corruption_error.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/issues/518_519_shp_reading/data_corruption_error.dbf -------------------------------------------------------------------------------- /test/data/issues/518_519_shp_reading/data_corruption_error.prj: -------------------------------------------------------------------------------- 1 | PROJCS["SWEREF99_TM",GEOGCS["GCS_SWEREF99",DATUM["D_SWEREF99",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]] -------------------------------------------------------------------------------- /test/data/issues/518_519_shp_reading/data_corruption_error.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/issues/518_519_shp_reading/data_corruption_error.shp -------------------------------------------------------------------------------- /test/data/issues/518_519_shp_reading/data_corruption_error.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/issues/518_519_shp_reading/data_corruption_error.shx -------------------------------------------------------------------------------- /test/data/issues/518_519_shp_reading/max_callstack_error.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/issues/518_519_shp_reading/max_callstack_error.dbf -------------------------------------------------------------------------------- /test/data/issues/518_519_shp_reading/max_callstack_error.prj: -------------------------------------------------------------------------------- 1 | PROJCS["RT90_25_gon_V",GEOGCS["GCS_RT_1990",DATUM["D_RT_1990",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",1500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",15.8082777777778],PARAMETER["Scale_Factor",1.0],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]] -------------------------------------------------------------------------------- /test/data/issues/518_519_shp_reading/max_callstack_error.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/issues/518_519_shp_reading/max_callstack_error.shp -------------------------------------------------------------------------------- /test/data/issues/518_519_shp_reading/max_callstack_error.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/issues/518_519_shp_reading/max_callstack_error.shx -------------------------------------------------------------------------------- /test/data/issues/538_missing_holes/multipolygon.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "MultiPolygon", 3 | "coordinates": [ 4 | [[[4, 0], [4, 4], [0,4], [0, 5], [5, 5], [5, 0], [4, 0]]], 5 | [[[1, 0], [1, 1], [0, 1], [0, 3], [3, 3], [3, 0], [1, 0]], 6 | [[1, 1], [2, 1], [2, 2], [1, 2], [1, 1]]] 7 | ] 8 | } -------------------------------------------------------------------------------- /test/data/issues/595_clip_error/clipped.json: -------------------------------------------------------------------------------- 1 | {"type":"FeatureCollection", "features": [ 2 | {"type":"Feature","geometry":{"type":"LineString","coordinates":[[-0.44971025868821524,35.88828713320934],[-0.25278607587883556,35.95006726899267]]},"properties":{"Name":null,"width":100,"noSmooth":null}} 3 | ]} -------------------------------------------------------------------------------- /test/data/issues/68/cell1.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/issues/68/cell1.shp -------------------------------------------------------------------------------- /test/data/issues/68/clipper.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/issues/68/clipper.shp -------------------------------------------------------------------------------- /test/data/issues/clip_error/clip_shape.json: -------------------------------------------------------------------------------- 1 | {"type":"FeatureCollection", "features": [ 2 | {"type":"Feature","geometry":{"type":"Polygon","coordinates":[[[-96.51,40.2],[-96.42,41.23],[-97.04,42.22],[-97.91,42.8],[-99.07,43.65],[-100.51,43.81],[-101.24,43.36],[-101.79,42.86],[-101.78,42.1],[-100.75,41.11],[-99.49,40.59],[-96.51,40.2]]]},"properties":{"DN":10,"VALID":"202307111200","EXPIRE":"202307121200","ISSUE":"202307101730","LABEL":"SIGN","LABEL2":"10% Significant Hail Risk","stroke":"#000000","fill":"#888888"}} 3 | ]} -------------------------------------------------------------------------------- /test/data/issues/clip_error/clip_shape2.json: -------------------------------------------------------------------------------- 1 | {"type":"GeometryCollection", "geometries": [ 2 | {"type":"Polygon","coordinates":[[[-96.51,40.2],[-96.42,41.23],[-97.04,42.22],[-97.91,42.8], 3 | [-98.59,43.75], 4 | [-100.51,43.81],[-101.24,43.36],[-101.79,42.86],[-101.78,42.1],[-100.75,41.11], 5 | [-99.33,40.45], 6 | [-96.51,40.2]]]} 7 | ]} -------------------------------------------------------------------------------- /test/data/issues/clip_error/original_shape.json: -------------------------------------------------------------------------------- 1 | {"type":"FeatureCollection", "features": [ 2 | {"type":"Feature","geometry":{"type":"Polygon","coordinates":[[[-101.78,42.1],[-100.82,41],[-99.33,40.45],[-95.07,39.86],[-92.51,40.64],[-93.17,42.57],[-95.95,43.23],[-98.59,43.75],[-101.18,44.4],[-102.33,44.3],[-102.7,43.98],[-102.3,43.12],[-101.78,42.1]]]},"properties":{"DN":15,"VALID":"202307111200","EXPIRE":"202307121200","ISSUE":"202307101730","LABEL":"0.15","LABEL2":"15% Hail Risk","stroke":"#DDAA00","fill":"#FFE066","significant":null}} 3 | ]} -------------------------------------------------------------------------------- /test/data/issues/invalid_coords/invalid_coordinates.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/issues/invalid_coords/invalid_coordinates.dbf -------------------------------------------------------------------------------- /test/data/issues/invalid_coords/invalid_coordinates.json: -------------------------------------------------------------------------------- 1 | {"type":"FeatureCollection", "features": [ 2 | {"type":"Feature","geometry":{"type":"Point","coordinates":[-1.7976931348623157e+308,-1.7976931348623157e+308]},"properties":{"GEO_ID":533064,"X":0,"Y":0,"STRUCTID":"NY148414","ADDRESS":31,"SUFFIX":"","NAME":"KENASTON GDNS","DBH_TRUNK":15,"TREE_POSIT":20,"COMMON_NAM":"WHITE SPRUCE","BOTANICAL_":"Picea glauca"}} 3 | ]} -------------------------------------------------------------------------------- /test/data/issues/invalid_coords/invalid_coordinates.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["WGS 84",DATUM["World Geodetic System 1984 [EPSG ID 6326]",SPHEROID["WGS 84 [EPSG ID 7030]",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Decimal_Degree",0.01745329251994328]] -------------------------------------------------------------------------------- /test/data/issues/invalid_coords/invalid_coordinates.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/issues/invalid_coords/invalid_coordinates.shp -------------------------------------------------------------------------------- /test/data/issues/invalid_coords/invalid_coordinates.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/issues/invalid_coords/invalid_coordinates.shx -------------------------------------------------------------------------------- /test/data/issues/point_shapefile_import_error/points.dbf: -------------------------------------------------------------------------------- 1 | tAFIDN 0 1 -------------------------------------------------------------------------------- /test/data/issues/point_shapefile_import_error/points.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/issues/point_shapefile_import_error/points.shp -------------------------------------------------------------------------------- /test/data/issues/point_shapefile_import_error/points.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/issues/point_shapefile_import_error/points.shx -------------------------------------------------------------------------------- /test/data/issues/polygon_join_error/outer_polygon.json: -------------------------------------------------------------------------------- 1 | {"type":"FeatureCollection", "features": [ 2 | {"type":"Feature","geometry":{"type":"Polygon","coordinates":[[[509957,1064656.8672818756],[510400.90387065226,1065078.2030064156],[511975.11389746604,1065885.4790276308],[512433.02182976605,1066267],[512607,1066267],[512607,1064439],[509957,1064439],[509957,1064656.8672818756]]]},"properties":{"STATE_NAME":"Michigan","FIPS":"26131","POPULATION":6421,"T":3433,"D":1176,"R":2066}} 3 | ]} -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/i_number_double_huge_neg_exp.json: -------------------------------------------------------------------------------- 1 | [123.456e-789] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/i_number_huge_exp.json: -------------------------------------------------------------------------------- 1 | [0.4e00669999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999969999999006] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/i_number_neg_int_huge_exp.json: -------------------------------------------------------------------------------- 1 | [-1e+9999] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/i_number_pos_double_huge_exp.json: -------------------------------------------------------------------------------- 1 | [1.5e+9999] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/i_number_real_neg_overflow.json: -------------------------------------------------------------------------------- 1 | [-123123e100000] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/i_number_real_pos_overflow.json: -------------------------------------------------------------------------------- 1 | [123123e100000] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/i_number_real_underflow.json: -------------------------------------------------------------------------------- 1 | [123e-10000000] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/i_number_too_big_neg_int.json: -------------------------------------------------------------------------------- 1 | [-123123123123123123123123123123] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/i_number_too_big_pos_int.json: -------------------------------------------------------------------------------- 1 | [100000000000000000000] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/i_number_very_big_negative_int.json: -------------------------------------------------------------------------------- 1 | [-237462374673276894279832749832423479823246327846] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/i_object_key_lone_2nd_surrogate.json: -------------------------------------------------------------------------------- 1 | {"\uDFAA":0} -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/i_string_1st_surrogate_but_2nd_missing.json: -------------------------------------------------------------------------------- 1 | ["\uDADA"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/i_string_1st_valid_surrogate_2nd_invalid.json: -------------------------------------------------------------------------------- 1 | ["\uD888\u1234"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/i_string_UTF-16LE_with_BOM.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/json/JSONTestSuite/test_parsing/i_string_UTF-16LE_with_BOM.json -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/i_string_UTF-8_invalid_sequence.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/json/JSONTestSuite/test_parsing/i_string_UTF-8_invalid_sequence.json -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/i_string_UTF8_surrogate_U+D800.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/json/JSONTestSuite/test_parsing/i_string_UTF8_surrogate_U+D800.json -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/i_string_incomplete_surrogate_and_escape_valid.json: -------------------------------------------------------------------------------- 1 | ["\uD800\n"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/i_string_incomplete_surrogate_pair.json: -------------------------------------------------------------------------------- 1 | ["\uDd1ea"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/i_string_incomplete_surrogates_escape_valid.json: -------------------------------------------------------------------------------- 1 | ["\uD800\uD800\n"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/i_string_invalid_lonely_surrogate.json: -------------------------------------------------------------------------------- 1 | ["\ud800"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/i_string_invalid_surrogate.json: -------------------------------------------------------------------------------- 1 | ["\ud800abc"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/i_string_invalid_utf-8.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/json/JSONTestSuite/test_parsing/i_string_invalid_utf-8.json -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/i_string_inverted_surrogates_U+1D11E.json: -------------------------------------------------------------------------------- 1 | ["\uDd1e\uD834"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/i_string_iso_latin_1.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/json/JSONTestSuite/test_parsing/i_string_iso_latin_1.json -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/i_string_lone_second_surrogate.json: -------------------------------------------------------------------------------- 1 | ["\uDFAA"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/i_string_lone_utf8_continuation_byte.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/json/JSONTestSuite/test_parsing/i_string_lone_utf8_continuation_byte.json -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/i_string_not_in_unicode_range.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/json/JSONTestSuite/test_parsing/i_string_not_in_unicode_range.json -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/i_string_overlong_sequence_2_bytes.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/json/JSONTestSuite/test_parsing/i_string_overlong_sequence_2_bytes.json -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/i_string_overlong_sequence_6_bytes.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/json/JSONTestSuite/test_parsing/i_string_overlong_sequence_6_bytes.json -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/i_string_overlong_sequence_6_bytes_null.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/json/JSONTestSuite/test_parsing/i_string_overlong_sequence_6_bytes_null.json -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/i_string_truncated-utf-8.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/json/JSONTestSuite/test_parsing/i_string_truncated-utf-8.json -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/i_string_utf16BE_no_BOM.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/json/JSONTestSuite/test_parsing/i_string_utf16BE_no_BOM.json -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/i_string_utf16LE_no_BOM.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/json/JSONTestSuite/test_parsing/i_string_utf16LE_no_BOM.json -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/i_structure_UTF-8_BOM_empty_object.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_array_1_true_without_comma.json: -------------------------------------------------------------------------------- 1 | [1 true] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_array_a_invalid_utf8.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/json/JSONTestSuite/test_parsing/n_array_a_invalid_utf8.json -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_array_colon_instead_of_comma.json: -------------------------------------------------------------------------------- 1 | ["": 1] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_array_comma_after_close.json: -------------------------------------------------------------------------------- 1 | [""], -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_array_comma_and_number.json: -------------------------------------------------------------------------------- 1 | [,1] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_array_double_comma.json: -------------------------------------------------------------------------------- 1 | [1,,2] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_array_double_extra_comma.json: -------------------------------------------------------------------------------- 1 | ["x",,] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_array_extra_close.json: -------------------------------------------------------------------------------- 1 | ["x"]] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_array_extra_comma.json: -------------------------------------------------------------------------------- 1 | ["",] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_array_incomplete.json: -------------------------------------------------------------------------------- 1 | ["x" -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_array_incomplete_invalid_value.json: -------------------------------------------------------------------------------- 1 | [x -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_array_inner_array_no_comma.json: -------------------------------------------------------------------------------- 1 | [3[4]] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_array_invalid_utf8.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/json/JSONTestSuite/test_parsing/n_array_invalid_utf8.json -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_array_items_separated_by_semicolon.json: -------------------------------------------------------------------------------- 1 | [1:2] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_array_just_comma.json: -------------------------------------------------------------------------------- 1 | [,] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_array_just_minus.json: -------------------------------------------------------------------------------- 1 | [-] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_array_missing_value.json: -------------------------------------------------------------------------------- 1 | [ , ""] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_array_newlines_unclosed.json: -------------------------------------------------------------------------------- 1 | ["a", 2 | 4 3 | ,1, -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_array_number_and_comma.json: -------------------------------------------------------------------------------- 1 | [1,] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_array_number_and_several_commas.json: -------------------------------------------------------------------------------- 1 | [1,,] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_array_spaces_vertical_tab_formfeed.json: -------------------------------------------------------------------------------- 1 | [" a"\f] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_array_star_inside.json: -------------------------------------------------------------------------------- 1 | [*] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_array_unclosed.json: -------------------------------------------------------------------------------- 1 | ["" -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_array_unclosed_trailing_comma.json: -------------------------------------------------------------------------------- 1 | [1, -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_array_unclosed_with_new_lines.json: -------------------------------------------------------------------------------- 1 | [1, 2 | 1 3 | ,1 -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_array_unclosed_with_object_inside.json: -------------------------------------------------------------------------------- 1 | [{} -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_incomplete_false.json: -------------------------------------------------------------------------------- 1 | [fals] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_incomplete_null.json: -------------------------------------------------------------------------------- 1 | [nul] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_incomplete_true.json: -------------------------------------------------------------------------------- 1 | [tru] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_multidigit_number_then_00.json: -------------------------------------------------------------------------------- 1 | 123 -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_number_++.json: -------------------------------------------------------------------------------- 1 | [++1234] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_number_+1.json: -------------------------------------------------------------------------------- 1 | [+1] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_number_+Inf.json: -------------------------------------------------------------------------------- 1 | [+Inf] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_number_-01.json: -------------------------------------------------------------------------------- 1 | [-01] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_number_-1.0..json: -------------------------------------------------------------------------------- 1 | [-1.0.] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_number_-2..json: -------------------------------------------------------------------------------- 1 | [-2.] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_number_-NaN.json: -------------------------------------------------------------------------------- 1 | [-NaN] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_number_.-1.json: -------------------------------------------------------------------------------- 1 | [.-1] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_number_.2e-3.json: -------------------------------------------------------------------------------- 1 | [.2e-3] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_number_0.1.2.json: -------------------------------------------------------------------------------- 1 | [0.1.2] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_number_0.3e+.json: -------------------------------------------------------------------------------- 1 | [0.3e+] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_number_0.3e.json: -------------------------------------------------------------------------------- 1 | [0.3e] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_number_0.e1.json: -------------------------------------------------------------------------------- 1 | [0.e1] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_number_0_capital_E+.json: -------------------------------------------------------------------------------- 1 | [0E+] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_number_0_capital_E.json: -------------------------------------------------------------------------------- 1 | [0E] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_number_0e+.json: -------------------------------------------------------------------------------- 1 | [0e+] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_number_0e.json: -------------------------------------------------------------------------------- 1 | [0e] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_number_1.0e+.json: -------------------------------------------------------------------------------- 1 | [1.0e+] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_number_1.0e-.json: -------------------------------------------------------------------------------- 1 | [1.0e-] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_number_1.0e.json: -------------------------------------------------------------------------------- 1 | [1.0e] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_number_1_000.json: -------------------------------------------------------------------------------- 1 | [1 000.0] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_number_1eE2.json: -------------------------------------------------------------------------------- 1 | [1eE2] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_number_2.e+3.json: -------------------------------------------------------------------------------- 1 | [2.e+3] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_number_2.e-3.json: -------------------------------------------------------------------------------- 1 | [2.e-3] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_number_2.e3.json: -------------------------------------------------------------------------------- 1 | [2.e3] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_number_9.e+.json: -------------------------------------------------------------------------------- 1 | [9.e+] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_number_Inf.json: -------------------------------------------------------------------------------- 1 | [Inf] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_number_NaN.json: -------------------------------------------------------------------------------- 1 | [NaN] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_number_U+FF11_fullwidth_digit_one.json: -------------------------------------------------------------------------------- 1 | [1] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_number_expression.json: -------------------------------------------------------------------------------- 1 | [1+2] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_number_hex_1_digit.json: -------------------------------------------------------------------------------- 1 | [0x1] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_number_hex_2_digits.json: -------------------------------------------------------------------------------- 1 | [0x42] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_number_infinity.json: -------------------------------------------------------------------------------- 1 | [Infinity] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_number_invalid+-.json: -------------------------------------------------------------------------------- 1 | [0e+-1] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_number_invalid-negative-real.json: -------------------------------------------------------------------------------- 1 | [-123.123foo] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_number_invalid-utf-8-in-bigger-int.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/json/JSONTestSuite/test_parsing/n_number_invalid-utf-8-in-bigger-int.json -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_number_invalid-utf-8-in-exponent.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/json/JSONTestSuite/test_parsing/n_number_invalid-utf-8-in-exponent.json -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_number_invalid-utf-8-in-int.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/json/JSONTestSuite/test_parsing/n_number_invalid-utf-8-in-int.json -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_number_minus_infinity.json: -------------------------------------------------------------------------------- 1 | [-Infinity] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_number_minus_sign_with_trailing_garbage.json: -------------------------------------------------------------------------------- 1 | [-foo] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_number_minus_space_1.json: -------------------------------------------------------------------------------- 1 | [- 1] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_number_neg_int_starting_with_zero.json: -------------------------------------------------------------------------------- 1 | [-012] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_number_neg_real_without_int_part.json: -------------------------------------------------------------------------------- 1 | [-.123] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_number_neg_with_garbage_at_end.json: -------------------------------------------------------------------------------- 1 | [-1x] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_number_real_garbage_after_e.json: -------------------------------------------------------------------------------- 1 | [1ea] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_number_real_with_invalid_utf8_after_e.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/json/JSONTestSuite/test_parsing/n_number_real_with_invalid_utf8_after_e.json -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_number_real_without_fractional_part.json: -------------------------------------------------------------------------------- 1 | [1.] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_number_starting_with_dot.json: -------------------------------------------------------------------------------- 1 | [.123] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_number_with_alpha.json: -------------------------------------------------------------------------------- 1 | [1.2a-3] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_number_with_alpha_char.json: -------------------------------------------------------------------------------- 1 | [1.8011670033376514H-308] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_number_with_leading_zero.json: -------------------------------------------------------------------------------- 1 | [012] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_object_bad_value.json: -------------------------------------------------------------------------------- 1 | ["x", truth] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_object_bracket_key.json: -------------------------------------------------------------------------------- 1 | {[: "x"} 2 | -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_object_comma_instead_of_colon.json: -------------------------------------------------------------------------------- 1 | {"x", null} -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_object_double_colon.json: -------------------------------------------------------------------------------- 1 | {"x"::"b"} -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_object_emoji.json: -------------------------------------------------------------------------------- 1 | {🇨🇭} -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_object_garbage_at_end.json: -------------------------------------------------------------------------------- 1 | {"a":"a" 123} -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_object_key_with_single_quotes.json: -------------------------------------------------------------------------------- 1 | {key: 'value'} -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_object_lone_continuation_byte_in_key_and_trailing_comma.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/json/JSONTestSuite/test_parsing/n_object_lone_continuation_byte_in_key_and_trailing_comma.json -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_object_missing_colon.json: -------------------------------------------------------------------------------- 1 | {"a" b} -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_object_missing_key.json: -------------------------------------------------------------------------------- 1 | {:"b"} -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_object_missing_semicolon.json: -------------------------------------------------------------------------------- 1 | {"a" "b"} -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_object_missing_value.json: -------------------------------------------------------------------------------- 1 | {"a": -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_object_no-colon.json: -------------------------------------------------------------------------------- 1 | {"a" -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_object_non_string_key.json: -------------------------------------------------------------------------------- 1 | {1:1} -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_object_non_string_key_but_huge_number_instead.json: -------------------------------------------------------------------------------- 1 | {9999E9999:1} -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_object_repeated_null_null.json: -------------------------------------------------------------------------------- 1 | {null:null,null:null} -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_object_several_trailing_commas.json: -------------------------------------------------------------------------------- 1 | {"id":0,,,,,} -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_object_single_quote.json: -------------------------------------------------------------------------------- 1 | {'a':0} -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_object_trailing_comma.json: -------------------------------------------------------------------------------- 1 | {"id":0,} -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_object_trailing_comment.json: -------------------------------------------------------------------------------- 1 | {"a":"b"}/**/ -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_object_trailing_comment_open.json: -------------------------------------------------------------------------------- 1 | {"a":"b"}/**// -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_object_trailing_comment_slash_open.json: -------------------------------------------------------------------------------- 1 | {"a":"b"}// -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_object_trailing_comment_slash_open_incomplete.json: -------------------------------------------------------------------------------- 1 | {"a":"b"}/ -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_object_two_commas_in_a_row.json: -------------------------------------------------------------------------------- 1 | {"a":"b",,"c":"d"} -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_object_unquoted_key.json: -------------------------------------------------------------------------------- 1 | {a: "b"} -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_object_unterminated-value.json: -------------------------------------------------------------------------------- 1 | {"a":"a -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_object_with_single_string.json: -------------------------------------------------------------------------------- 1 | { "foo" : "bar", "a" } -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_object_with_trailing_garbage.json: -------------------------------------------------------------------------------- 1 | {"a":"b"}# -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_single_space.json: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_string_1_surrogate_then_escape.json: -------------------------------------------------------------------------------- 1 | ["\uD800\"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_string_1_surrogate_then_escape_u.json: -------------------------------------------------------------------------------- 1 | ["\uD800\u"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_string_1_surrogate_then_escape_u1.json: -------------------------------------------------------------------------------- 1 | ["\uD800\u1"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_string_1_surrogate_then_escape_u1x.json: -------------------------------------------------------------------------------- 1 | ["\uD800\u1x"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_string_accentuated_char_no_quotes.json: -------------------------------------------------------------------------------- 1 | [é] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_string_backslash_00.json: -------------------------------------------------------------------------------- 1 | ["\"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_string_escape_x.json: -------------------------------------------------------------------------------- 1 | ["\x00"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_string_escaped_backslash_bad.json: -------------------------------------------------------------------------------- 1 | ["\\\"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_string_escaped_ctrl_char_tab.json: -------------------------------------------------------------------------------- 1 | ["\ "] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_string_escaped_emoji.json: -------------------------------------------------------------------------------- 1 | ["\🌀"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_string_incomplete_escape.json: -------------------------------------------------------------------------------- 1 | ["\"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_string_incomplete_escaped_character.json: -------------------------------------------------------------------------------- 1 | ["\u00A"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_string_incomplete_surrogate.json: -------------------------------------------------------------------------------- 1 | ["\uD834\uDd"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_string_incomplete_surrogate_escape_invalid.json: -------------------------------------------------------------------------------- 1 | ["\uD800\uD800\x"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_string_invalid-utf-8-in-escape.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/json/JSONTestSuite/test_parsing/n_string_invalid-utf-8-in-escape.json -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_string_invalid_backslash_esc.json: -------------------------------------------------------------------------------- 1 | ["\a"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_string_invalid_unicode_escape.json: -------------------------------------------------------------------------------- 1 | ["\uqqqq"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_string_invalid_utf8_after_escape.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/json/JSONTestSuite/test_parsing/n_string_invalid_utf8_after_escape.json -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_string_leading_uescaped_thinspace.json: -------------------------------------------------------------------------------- 1 | [\u0020"asd"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_string_no_quotes_with_bad_escape.json: -------------------------------------------------------------------------------- 1 | [\n] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_string_single_doublequote.json: -------------------------------------------------------------------------------- 1 | " -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_string_single_quote.json: -------------------------------------------------------------------------------- 1 | ['single quote'] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_string_single_string_no_double_quotes.json: -------------------------------------------------------------------------------- 1 | abc -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_string_start_escape_unclosed.json: -------------------------------------------------------------------------------- 1 | ["\ -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_string_unescaped_ctrl_char.json: -------------------------------------------------------------------------------- 1 | ["aa"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_string_unescaped_newline.json: -------------------------------------------------------------------------------- 1 | ["new 2 | line"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_string_unescaped_tab.json: -------------------------------------------------------------------------------- 1 | [" "] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_string_unicode_CapitalU.json: -------------------------------------------------------------------------------- 1 | "\UA66D" -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_string_with_trailing_garbage.json: -------------------------------------------------------------------------------- 1 | ""x -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_structure_U+2060_word_joined.json: -------------------------------------------------------------------------------- 1 | [⁠] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_structure_UTF8_BOM_no_data.json: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_structure_angle_bracket_..json: -------------------------------------------------------------------------------- 1 | <.> -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_structure_angle_bracket_null.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_structure_array_trailing_garbage.json: -------------------------------------------------------------------------------- 1 | [1]x -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_structure_array_with_extra_array_close.json: -------------------------------------------------------------------------------- 1 | [1]] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_structure_array_with_unclosed_string.json: -------------------------------------------------------------------------------- 1 | ["asd] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_structure_ascii-unicode-identifier.json: -------------------------------------------------------------------------------- 1 | aå -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_structure_capitalized_True.json: -------------------------------------------------------------------------------- 1 | [True] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_structure_close_unopened_array.json: -------------------------------------------------------------------------------- 1 | 1] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_structure_comma_instead_of_closing_brace.json: -------------------------------------------------------------------------------- 1 | {"x": true, -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_structure_double_array.json: -------------------------------------------------------------------------------- 1 | [][] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_structure_end_array.json: -------------------------------------------------------------------------------- 1 | ] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_structure_incomplete_UTF8_BOM.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/json/JSONTestSuite/test_parsing/n_structure_incomplete_UTF8_BOM.json -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_structure_lone-invalid-utf-8.json: -------------------------------------------------------------------------------- 1 | � -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_structure_lone-open-bracket.json: -------------------------------------------------------------------------------- 1 | [ -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_structure_no_data.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/json/JSONTestSuite/test_parsing/n_structure_no_data.json -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_structure_null-byte-outside-string.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_structure_number_with_trailing_garbage.json: -------------------------------------------------------------------------------- 1 | 2@ -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_structure_object_followed_by_closing_object.json: -------------------------------------------------------------------------------- 1 | {}} -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_structure_object_unclosed_no_value.json: -------------------------------------------------------------------------------- 1 | {"": -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_structure_object_with_comment.json: -------------------------------------------------------------------------------- 1 | {"a":/*comment*/"b"} -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_structure_object_with_trailing_garbage.json: -------------------------------------------------------------------------------- 1 | {"a": true} "x" -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_structure_open_array_apostrophe.json: -------------------------------------------------------------------------------- 1 | [' -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_structure_open_array_comma.json: -------------------------------------------------------------------------------- 1 | [, -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_structure_open_array_open_object.json: -------------------------------------------------------------------------------- 1 | [{ -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_structure_open_array_open_string.json: -------------------------------------------------------------------------------- 1 | ["a -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_structure_open_array_string.json: -------------------------------------------------------------------------------- 1 | ["a" -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_structure_open_object.json: -------------------------------------------------------------------------------- 1 | { -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_structure_open_object_close_array.json: -------------------------------------------------------------------------------- 1 | {] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_structure_open_object_comma.json: -------------------------------------------------------------------------------- 1 | {, -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_structure_open_object_open_array.json: -------------------------------------------------------------------------------- 1 | {[ -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_structure_open_object_open_string.json: -------------------------------------------------------------------------------- 1 | {"a -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_structure_open_object_string_with_apostrophes.json: -------------------------------------------------------------------------------- 1 | {'a' -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_structure_open_open.json: -------------------------------------------------------------------------------- 1 | ["\{["\{["\{["\{ -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_structure_single_eacute.json: -------------------------------------------------------------------------------- 1 | � -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_structure_single_star.json: -------------------------------------------------------------------------------- 1 | * -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_structure_trailing_#.json: -------------------------------------------------------------------------------- 1 | {"a":"b"}#{} -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_structure_uescaped_LF_before_string.json: -------------------------------------------------------------------------------- 1 | [\u000A""] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_structure_unclosed_array.json: -------------------------------------------------------------------------------- 1 | [1 -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_structure_unclosed_array_partial_null.json: -------------------------------------------------------------------------------- 1 | [ false, nul -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_structure_unclosed_array_unfinished_false.json: -------------------------------------------------------------------------------- 1 | [ true, fals -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_structure_unclosed_array_unfinished_true.json: -------------------------------------------------------------------------------- 1 | [ false, tru -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_structure_unclosed_object.json: -------------------------------------------------------------------------------- 1 | {"asd":"asd" -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_structure_unicode-identifier.json: -------------------------------------------------------------------------------- 1 | å -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_structure_whitespace_U+2060_word_joiner.json: -------------------------------------------------------------------------------- 1 | [⁠] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/n_structure_whitespace_formfeed.json: -------------------------------------------------------------------------------- 1 | [ ] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_array_arraysWithSpaces.json: -------------------------------------------------------------------------------- 1 | [[] ] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_array_empty-string.json: -------------------------------------------------------------------------------- 1 | [""] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_array_empty.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_array_ending_with_newline.json: -------------------------------------------------------------------------------- 1 | ["a"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_array_false.json: -------------------------------------------------------------------------------- 1 | [false] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_array_heterogeneous.json: -------------------------------------------------------------------------------- 1 | [null, 1, "1", {}] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_array_null.json: -------------------------------------------------------------------------------- 1 | [null] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_array_with_1_and_newline.json: -------------------------------------------------------------------------------- 1 | [1 2 | ] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_array_with_leading_space.json: -------------------------------------------------------------------------------- 1 | [1] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_array_with_several_null.json: -------------------------------------------------------------------------------- 1 | [1,null,null,null,2] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_array_with_trailing_space.json: -------------------------------------------------------------------------------- 1 | [2] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_number.json: -------------------------------------------------------------------------------- 1 | [123e65] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_number_0e+1.json: -------------------------------------------------------------------------------- 1 | [0e+1] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_number_0e1.json: -------------------------------------------------------------------------------- 1 | [0e1] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_number_after_space.json: -------------------------------------------------------------------------------- 1 | [ 4] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_number_double_close_to_zero.json: -------------------------------------------------------------------------------- 1 | [-0.000000000000000000000000000000000000000000000000000000000000000000000000000001] 2 | -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_number_int_with_exp.json: -------------------------------------------------------------------------------- 1 | [20e1] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_number_minus_zero.json: -------------------------------------------------------------------------------- 1 | [-0] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_number_negative_int.json: -------------------------------------------------------------------------------- 1 | [-123] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_number_negative_one.json: -------------------------------------------------------------------------------- 1 | [-1] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_number_negative_zero.json: -------------------------------------------------------------------------------- 1 | [-0] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_number_real_capital_e.json: -------------------------------------------------------------------------------- 1 | [1E22] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_number_real_capital_e_neg_exp.json: -------------------------------------------------------------------------------- 1 | [1E-2] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_number_real_capital_e_pos_exp.json: -------------------------------------------------------------------------------- 1 | [1E+2] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_number_real_exponent.json: -------------------------------------------------------------------------------- 1 | [123e45] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_number_real_fraction_exponent.json: -------------------------------------------------------------------------------- 1 | [123.456e78] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_number_real_neg_exp.json: -------------------------------------------------------------------------------- 1 | [1e-2] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_number_real_pos_exponent.json: -------------------------------------------------------------------------------- 1 | [1e+2] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_number_simple_int.json: -------------------------------------------------------------------------------- 1 | [123] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_number_simple_real.json: -------------------------------------------------------------------------------- 1 | [123.456789] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_object.json: -------------------------------------------------------------------------------- 1 | {"asd":"sdf", "dfg":"fgh"} -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_object_basic.json: -------------------------------------------------------------------------------- 1 | {"asd":"sdf"} -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_object_duplicated_key.json: -------------------------------------------------------------------------------- 1 | {"a":"b","a":"c"} -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_object_duplicated_key_and_value.json: -------------------------------------------------------------------------------- 1 | {"a":"b","a":"b"} -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_object_empty.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_object_empty_key.json: -------------------------------------------------------------------------------- 1 | {"":0} -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_object_escaped_null_in_key.json: -------------------------------------------------------------------------------- 1 | {"foo\u0000bar": 42} -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_object_extreme_numbers.json: -------------------------------------------------------------------------------- 1 | { "min": -1.0e+28, "max": 1.0e+28 } -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_object_long_strings.json: -------------------------------------------------------------------------------- 1 | {"x":[{"id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}], "id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"} -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_object_simple.json: -------------------------------------------------------------------------------- 1 | {"a":[]} -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_object_string_unicode.json: -------------------------------------------------------------------------------- 1 | {"title":"\u041f\u043e\u043b\u0442\u043e\u0440\u0430 \u0417\u0435\u043c\u043b\u0435\u043a\u043e\u043f\u0430" } -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_object_with_newlines.json: -------------------------------------------------------------------------------- 1 | { 2 | "a": "b" 3 | } -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_string_1_2_3_bytes_UTF-8_sequences.json: -------------------------------------------------------------------------------- 1 | ["\u0060\u012a\u12AB"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_string_accepted_surrogate_pair.json: -------------------------------------------------------------------------------- 1 | ["\uD801\udc37"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_string_accepted_surrogate_pairs.json: -------------------------------------------------------------------------------- 1 | ["\ud83d\ude39\ud83d\udc8d"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_string_allowed_escapes.json: -------------------------------------------------------------------------------- 1 | ["\"\\\/\b\f\n\r\t"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_string_backslash_and_u_escaped_zero.json: -------------------------------------------------------------------------------- 1 | ["\\u0000"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_string_backslash_doublequotes.json: -------------------------------------------------------------------------------- 1 | ["\""] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_string_comments.json: -------------------------------------------------------------------------------- 1 | ["a/*b*/c/*d//e"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_string_double_escape_a.json: -------------------------------------------------------------------------------- 1 | ["\\a"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_string_double_escape_n.json: -------------------------------------------------------------------------------- 1 | ["\\n"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_string_escaped_control_character.json: -------------------------------------------------------------------------------- 1 | ["\u0012"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_string_escaped_noncharacter.json: -------------------------------------------------------------------------------- 1 | ["\uFFFF"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_string_in_array.json: -------------------------------------------------------------------------------- 1 | ["asd"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_string_in_array_with_leading_space.json: -------------------------------------------------------------------------------- 1 | [ "asd"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_string_last_surrogates_1_and_2.json: -------------------------------------------------------------------------------- 1 | ["\uDBFF\uDFFF"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_string_nbsp_uescaped.json: -------------------------------------------------------------------------------- 1 | ["new\u00A0line"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_string_nonCharacterInUTF-8_U+10FFFF.json: -------------------------------------------------------------------------------- 1 | ["􏿿"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_string_nonCharacterInUTF-8_U+FFFF.json: -------------------------------------------------------------------------------- 1 | ["￿"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_string_null_escape.json: -------------------------------------------------------------------------------- 1 | ["\u0000"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_string_one-byte-utf-8.json: -------------------------------------------------------------------------------- 1 | ["\u002c"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_string_pi.json: -------------------------------------------------------------------------------- 1 | ["π"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_string_reservedCharacterInUTF-8_U+1BFFF.json: -------------------------------------------------------------------------------- 1 | ["𛿿"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_string_simple_ascii.json: -------------------------------------------------------------------------------- 1 | ["asd "] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_string_space.json: -------------------------------------------------------------------------------- 1 | " " -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_string_surrogates_U+1D11E_MUSICAL_SYMBOL_G_CLEF.json: -------------------------------------------------------------------------------- 1 | ["\uD834\uDd1e"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_string_three-byte-utf-8.json: -------------------------------------------------------------------------------- 1 | ["\u0821"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_string_two-byte-utf-8.json: -------------------------------------------------------------------------------- 1 | ["\u0123"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_string_u+2028_line_sep.json: -------------------------------------------------------------------------------- 1 | ["
"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_string_u+2029_par_sep.json: -------------------------------------------------------------------------------- 1 | ["
"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_string_uEscape.json: -------------------------------------------------------------------------------- 1 | ["\u0061\u30af\u30EA\u30b9"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_string_uescaped_newline.json: -------------------------------------------------------------------------------- 1 | ["new\u000Aline"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_string_unescaped_char_delete.json: -------------------------------------------------------------------------------- 1 | [""] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_string_unicode.json: -------------------------------------------------------------------------------- 1 | ["\uA66D"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_string_unicodeEscapedBackslash.json: -------------------------------------------------------------------------------- 1 | ["\u005C"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_string_unicode_2.json: -------------------------------------------------------------------------------- 1 | ["⍂㈴⍂"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_string_unicode_U+10FFFE_nonchar.json: -------------------------------------------------------------------------------- 1 | ["\uDBFF\uDFFE"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_string_unicode_U+1FFFE_nonchar.json: -------------------------------------------------------------------------------- 1 | ["\uD83F\uDFFE"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_string_unicode_U+200B_ZERO_WIDTH_SPACE.json: -------------------------------------------------------------------------------- 1 | ["\u200B"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_string_unicode_U+2064_invisible_plus.json: -------------------------------------------------------------------------------- 1 | ["\u2064"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_string_unicode_U+FDD0_nonchar.json: -------------------------------------------------------------------------------- 1 | ["\uFDD0"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_string_unicode_U+FFFE_nonchar.json: -------------------------------------------------------------------------------- 1 | ["\uFFFE"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_string_unicode_escaped_double_quote.json: -------------------------------------------------------------------------------- 1 | ["\u0022"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_string_utf8.json: -------------------------------------------------------------------------------- 1 | ["€𝄞"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_string_with_del_character.json: -------------------------------------------------------------------------------- 1 | ["aa"] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_structure_lonely_false.json: -------------------------------------------------------------------------------- 1 | false -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_structure_lonely_int.json: -------------------------------------------------------------------------------- 1 | 42 -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_structure_lonely_negative_real.json: -------------------------------------------------------------------------------- 1 | -0.1 -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_structure_lonely_null.json: -------------------------------------------------------------------------------- 1 | null -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_structure_lonely_string.json: -------------------------------------------------------------------------------- 1 | "asd" -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_structure_lonely_true.json: -------------------------------------------------------------------------------- 1 | true -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_structure_string_empty.json: -------------------------------------------------------------------------------- 1 | "" -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_structure_trailing_newline.json: -------------------------------------------------------------------------------- 1 | ["a"] 2 | -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_structure_true_in_array.json: -------------------------------------------------------------------------------- 1 | [true] -------------------------------------------------------------------------------- /test/data/json/JSONTestSuite/test_parsing/y_structure_whitespace_array.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /test/data/kml/Albania.kmz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/kml/Albania.kmz -------------------------------------------------------------------------------- /test/data/msx/mapshaper_snapshot.msx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/msx/mapshaper_snapshot.msx -------------------------------------------------------------------------------- /test/data/msx/mapshaper_snapshot.msx.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/msx/mapshaper_snapshot.msx.zip -------------------------------------------------------------------------------- /test/data/msx/mapshaper_snapshot_2.msx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/msx/mapshaper_snapshot_2.msx -------------------------------------------------------------------------------- /test/data/ne/VERSION: -------------------------------------------------------------------------------- 1 | 2.0.0 -------------------------------------------------------------------------------- /test/data/ne/ne_110m_admin_0_boundary_lines_land.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/ne/ne_110m_admin_0_boundary_lines_land.dbf -------------------------------------------------------------------------------- /test/data/ne/ne_110m_admin_0_boundary_lines_land.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.017453292519943295]] -------------------------------------------------------------------------------- /test/data/ne/ne_110m_admin_0_boundary_lines_land.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/ne/ne_110m_admin_0_boundary_lines_land.shp -------------------------------------------------------------------------------- /test/data/ne/ne_110m_admin_0_boundary_lines_land.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/ne/ne_110m_admin_0_boundary_lines_land.shx -------------------------------------------------------------------------------- /test/data/ne/ne_110m_admin_0_pacific_groupings.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.017453292519943295]] -------------------------------------------------------------------------------- /test/data/ne/ne_110m_admin_0_pacific_groupings.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/ne/ne_110m_admin_0_pacific_groupings.shp -------------------------------------------------------------------------------- /test/data/ne/ne_110m_admin_0_pacific_groupings.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/ne/ne_110m_admin_0_pacific_groupings.shx -------------------------------------------------------------------------------- /test/data/ne/ne_110m_admin_0_scale_rank.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/ne/ne_110m_admin_0_scale_rank.dbf -------------------------------------------------------------------------------- /test/data/ne/ne_110m_admin_0_scale_rank.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.017453292519943295]] -------------------------------------------------------------------------------- /test/data/ne/ne_110m_admin_0_scale_rank.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/ne/ne_110m_admin_0_scale_rank.shp -------------------------------------------------------------------------------- /test/data/ne/ne_110m_admin_0_scale_rank.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/ne/ne_110m_admin_0_scale_rank.shx -------------------------------------------------------------------------------- /test/data/ne/ne_110m_admin_1_states_provinces_lines.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/ne/ne_110m_admin_1_states_provinces_lines.dbf -------------------------------------------------------------------------------- /test/data/ne/ne_110m_admin_1_states_provinces_lines.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] -------------------------------------------------------------------------------- /test/data/ne/ne_110m_admin_1_states_provinces_lines.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/ne/ne_110m_admin_1_states_provinces_lines.shp -------------------------------------------------------------------------------- /test/data/ne/ne_110m_admin_1_states_provinces_lines.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/ne/ne_110m_admin_1_states_provinces_lines.shx -------------------------------------------------------------------------------- /test/data/ne/ne_110m_admin_1_states_provinces_shp.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/ne/ne_110m_admin_1_states_provinces_shp.dbf -------------------------------------------------------------------------------- /test/data/ne/ne_110m_admin_1_states_provinces_shp.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]] -------------------------------------------------------------------------------- /test/data/ne/ne_110m_admin_1_states_provinces_shp.sbn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/ne/ne_110m_admin_1_states_provinces_shp.sbn -------------------------------------------------------------------------------- /test/data/ne/ne_110m_admin_1_states_provinces_shp.sbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/ne/ne_110m_admin_1_states_provinces_shp.sbx -------------------------------------------------------------------------------- /test/data/ne/ne_110m_admin_1_states_provinces_shp.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/ne/ne_110m_admin_1_states_provinces_shp.shp -------------------------------------------------------------------------------- /test/data/ne/ne_110m_admin_1_states_provinces_shp.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/ne/ne_110m_admin_1_states_provinces_shp.shx -------------------------------------------------------------------------------- /test/data/one_point.geojson: -------------------------------------------------------------------------------- 1 | {"type":"FeatureCollection","features":[{"type":"Feature","properties":{"scalerank":2,"featurecla":"waterfall","name":"Niagara Falls","comment":"","name_alt":"","lat_y":43.087653,"long_x":-79.044073,"region":"North America","subregion":""},"geometry":{"type":"Point","coordinates":[-79.04411780507252,43.08771393436908]}}]} -------------------------------------------------------------------------------- /test/data/shapefile/date-property.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "FeatureCollection", 3 | "features": [ 4 | {"type": "Feature","properties": {"date": "20130102"},"geometry": {"type": "Point", "coordinates": [1, 2]}}, 5 | {"type": "Feature","properties": {"date": "20130202"},"geometry": {"type": "Point", "coordinates": [3, 4]}}, 6 | {"type": "Feature","properties": {"date": "20130103"},"geometry": {"type": "Point", "coordinates": [7, 8]}} 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /test/data/shapefile/ignore-properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "FeatureCollection", 3 | "features": [ 4 | {"type": "Feature","properties": {},"geometry": {"type": "Point", "coordinates": [1, 2]}}, 5 | {"type": "Feature","properties": {},"geometry": {"type": "Point", "coordinates": [3, 4]}}, 6 | {"type": "Feature","properties": {},"geometry": {"type": "Point", "coordinates": [7, 8]}} 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /test/data/shapefile/ignore-properties.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/shapefile/ignore-properties.shp -------------------------------------------------------------------------------- /test/data/shapefile/latin1-property.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/shapefile/latin1-property.dbf -------------------------------------------------------------------------------- /test/data/shapefile/latin1-property.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "FeatureCollection", 3 | "features": [ 4 | {"type": "Feature","properties": {"name": "México"},"geometry": {"type": "Point", "coordinates": [3, 4]}} 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /test/data/shapefile/latin1-property.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] -------------------------------------------------------------------------------- /test/data/shapefile/latin1-property.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/shapefile/latin1-property.shp -------------------------------------------------------------------------------- /test/data/shapefile/latin1-property.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/shapefile/latin1-property.shx -------------------------------------------------------------------------------- /test/data/shapefile/nad27/popctr_state1970.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]] 2 | -------------------------------------------------------------------------------- /test/data/shapefile/nad27/popctr_state1970.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/shapefile/nad27/popctr_state1970.shp -------------------------------------------------------------------------------- /test/data/shapefile/nad27/popctr_state1970.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/shapefile/nad27/popctr_state1970.shx -------------------------------------------------------------------------------- /test/data/shapefile/polygons.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "FeatureCollection", 3 | "features": [ 4 | {"type": "Feature","properties": {},"geometry": {"type": "Polygon", "coordinates": [[[0, 0], [0, 1], [1, 1], [1, 0], [0, 0]]]}}, 5 | {"type": "Feature","properties": {},"geometry": {"type": "Polygon", "coordinates": [[[0, 0], [0, 4], [4, 4], [4, 0], [0, 0]], [[1, 1], [3, 1], [3, 3], [1, 3], [1, 1]]]}}, 6 | {"type": "Feature","properties": {},"geometry": {"type": "MultiPolygon", "coordinates": [[[[2, 2], [2, 3], [3, 3], [3, 2], [2, 2]]], [[[4, 4], [4, 5], [5, 5], [5, 4], [4, 4]]]]}} 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /test/data/shapefile/polygons.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/shapefile/polygons.shp -------------------------------------------------------------------------------- /test/data/shapefile/utf8-property.cpg: -------------------------------------------------------------------------------- 1 | UTF-8 -------------------------------------------------------------------------------- /test/data/shapefile/utf8-property.dbf: -------------------------------------------------------------------------------- 1 | _AQ☃CP ηελλο ςορλδ -------------------------------------------------------------------------------- /test/data/shapefile/utf8-property.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "FeatureCollection", 3 | "features": [ 4 | {"type": "Feature","properties": {"☃": "ηελλο ςορλδ"},"geometry": {"type": "Point", "coordinates": [3, 4]}} 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /test/data/shapefile/utf8-property.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] -------------------------------------------------------------------------------- /test/data/shapefile/utf8-property.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/shapefile/utf8-property.shp -------------------------------------------------------------------------------- /test/data/shapefile/utf8-property.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/shapefile/utf8-property.shx -------------------------------------------------------------------------------- /test/data/shplib/3dpoints.dbf: -------------------------------------------------------------------------------- 1 | bAWZN 2 | 0 0 0 0 0 0 0 0 0 0 0 2 2 2 2 0 0 0 3 3 3 3 -------------------------------------------------------------------------------- /test/data/shplib/3dpoints.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/shplib/3dpoints.shp -------------------------------------------------------------------------------- /test/data/shplib/3dpoints.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/shplib/3dpoints.shx -------------------------------------------------------------------------------- /test/data/shplib/anno.aux: -------------------------------------------------------------------------------- 1 | AuxilaryTarget: anno.shp 2 | METADATA_VEC_1_LAYER_TYPE: WHOLE_POLYGONS 3 | -------------------------------------------------------------------------------- /test/data/shplib/anno.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/shplib/anno.dbf -------------------------------------------------------------------------------- /test/data/shplib/anno.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/shplib/anno.shp -------------------------------------------------------------------------------- /test/data/shplib/anno.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/shplib/anno.shx -------------------------------------------------------------------------------- /test/data/shplib/brklinz.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/shplib/brklinz.shp -------------------------------------------------------------------------------- /test/data/shplib/brklinz.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/shplib/brklinz.shx -------------------------------------------------------------------------------- /test/data/shplib/csah.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/shplib/csah.shp -------------------------------------------------------------------------------- /test/data/shplib/csah.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/shplib/csah.shx -------------------------------------------------------------------------------- /test/data/shplib/masspntz.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/shplib/masspntz.shp -------------------------------------------------------------------------------- /test/data/shplib/masspntz.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/shplib/masspntz.shx -------------------------------------------------------------------------------- /test/data/shplib/multipnt.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/shplib/multipnt.dbf -------------------------------------------------------------------------------- /test/data/shplib/multipnt.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/shplib/multipnt.shp -------------------------------------------------------------------------------- /test/data/shplib/multipnt.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/shplib/multipnt.shx -------------------------------------------------------------------------------- /test/data/shplib/pline.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/shplib/pline.dbf -------------------------------------------------------------------------------- /test/data/shplib/pline.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/shplib/pline.shp -------------------------------------------------------------------------------- /test/data/shplib/pline.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/shplib/pline.shx -------------------------------------------------------------------------------- /test/data/shplib/polygon.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/shplib/polygon.dbf -------------------------------------------------------------------------------- /test/data/shplib/polygon.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/shplib/polygon.shp -------------------------------------------------------------------------------- /test/data/shplib/polygon.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/shplib/polygon.shx -------------------------------------------------------------------------------- /test/data/six_counties.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/six_counties.dbf -------------------------------------------------------------------------------- /test/data/six_counties.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]] -------------------------------------------------------------------------------- /test/data/six_counties.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/six_counties.shp -------------------------------------------------------------------------------- /test/data/six_counties.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/six_counties.shx -------------------------------------------------------------------------------- /test/data/text/empty.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/text/empty.csv -------------------------------------------------------------------------------- /test/data/text/empty_fields.csv: -------------------------------------------------------------------------------- 1 | Residence_Addresses_Latitude,Residence_Addresses_Longitude,Residence_Addresses_LatLongAccuracy,County,Voters_FIPS,Precinct 2 | 38.25722,-119.226515,GeoMatch5Digit,MONO,051,BRIDGEPORT 3 | ,,,MONO,051,BRIDGEPORT -------------------------------------------------------------------------------- /test/data/text/empty_fields2.csv: -------------------------------------------------------------------------------- 1 | County,Voters_FIPS,Precinct,Residence_Addresses_Latitude,Residence_Addresses_Longitude,Residence_Addresses_LatLongAccuracy 2 | LOS ANGELES,037,ALTADENA-0046,34.1911,-118.158,GeoMatchRooftop 3 | LOS ANGELES,037,ALTADENA-0048,,, 4 | -------------------------------------------------------------------------------- /test/data/text/empty_fields3.csv: -------------------------------------------------------------------------------- 1 | Residence_Addresses_Latitude,Residence_Addresses_Longitude,Residence_Addresses_LatLongAccuracy,County,Voters_FIPS,Precinct 2 | ,,,LOS ANGELES,037,ALTADENA-0048 3 | 34.1911,-118.158,GeoMatchRooftop,LOS ANGELES,037,ALTADENA-0046 4 | 34.17551,-118.1285,GeoMatchRooftop,LOS ANGELES,037,ALTADENA-0051 5 | -------------------------------------------------------------------------------- /test/data/text/lorem.txt: -------------------------------------------------------------------------------- 1 | lorem ipsum -------------------------------------------------------------------------------- /test/data/text/two_states.csv: -------------------------------------------------------------------------------- 1 | "STATE_NAME","FIPS","STATE","LAT","LONG" 2 | Oregon,41,OR,43.94,-120.55 3 | Washington,53,WA,47.38,-120.00 4 | -------------------------------------------------------------------------------- /test/data/text/two_states.tsv: -------------------------------------------------------------------------------- 1 | "STATE_NAME" "FIPS" "STATE" "LAT" "LONG" 2 | Oregon 41 OR 43.94 -120.55 3 | Washington 53 WA 47.38 -120.00 4 | -------------------------------------------------------------------------------- /test/data/text/utf16.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/text/utf16.txt -------------------------------------------------------------------------------- /test/data/text/utf16_be_bom.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/text/utf16_be_bom.csv -------------------------------------------------------------------------------- /test/data/text/utf16_le_bom.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/text/utf16_le_bom.csv -------------------------------------------------------------------------------- /test/data/text/utf16bom.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/text/utf16bom.txt -------------------------------------------------------------------------------- /test/data/text/utf16le.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/text/utf16le.txt -------------------------------------------------------------------------------- /test/data/text/utf16le_bom.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/text/utf16le_bom.txt -------------------------------------------------------------------------------- /test/data/text/utf8_bom.csv: -------------------------------------------------------------------------------- 1 | election_dt county_name polling_place_id polling_place_name precinct_name house_num street_name city state zip 2 | 11/05/2019 ALAMANCE 1 ALAMANCE CIVITAN CLUB HOUSE COBLE 3328 DOCTOR PICKETT RD BURLINGTON NC 27215 3 | -------------------------------------------------------------------------------- /test/data/text/utf8bom.txt: -------------------------------------------------------------------------------- 1 | NAME 2 | 国语國語 -------------------------------------------------------------------------------- /test/data/three_points.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/three_points.dbf -------------------------------------------------------------------------------- /test/data/three_points.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.017453292519943295]] -------------------------------------------------------------------------------- /test/data/three_points.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/three_points.shp -------------------------------------------------------------------------------- /test/data/three_points.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/three_points.shx -------------------------------------------------------------------------------- /test/data/two_states.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/two_states.dbf -------------------------------------------------------------------------------- /test/data/two_states.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]] -------------------------------------------------------------------------------- /test/data/two_states.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/two_states.shp -------------------------------------------------------------------------------- /test/data/two_states.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/two_states.shx -------------------------------------------------------------------------------- /test/data/two_states_merc_copy.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/two_states_merc_copy.shp -------------------------------------------------------------------------------- /test/data/two_states_mercator.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/two_states_mercator.dbf -------------------------------------------------------------------------------- /test/data/two_states_mercator.prj: -------------------------------------------------------------------------------- 1 | PROJCS["WGS_84_World_Mercator",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Mercator"],PARAMETER["central_meridian",0],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["Meter",1],PARAMETER["standard_parallel_1",0.0]] -------------------------------------------------------------------------------- /test/data/two_states_mercator.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/two_states_mercator.shp -------------------------------------------------------------------------------- /test/data/two_states_mercator.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/data/two_states_mercator.shx -------------------------------------------------------------------------------- /test/debug-test.mjs: -------------------------------------------------------------------------------- 1 | import api from '../mapshaper.js'; 2 | import assert from 'assert'; 3 | var internal = api.internal; 4 | 5 | 6 | describe('debug', function () { 7 | 8 | good("file.shp name='a b'", {files:['file.shp'], name: 'a b'}); 9 | 10 | }); 11 | 12 | function good(str, reference) { 13 | it(str, function() { 14 | var parsed = internal.parseCommands(str); 15 | var target = parsed[0].options; 16 | assert.deepEqual(target, reference); 17 | }) 18 | } -------------------------------------------------------------------------------- /test/densify-test.mjs: -------------------------------------------------------------------------------- 1 | import { 2 | densifyAntimeridianSegment 3 | } from '../src/crs/mapshaper-densify'; 4 | import assert from 'assert'; 5 | 6 | 7 | describe('mapshaper-densify.js', function () { 8 | describe('densifyAntimeridianSegment()', function () { 9 | it('n and s direction yield same points', function () { 10 | var s = densifyAntimeridianSegment([180, 1.1], [180, -1], 0.5); 11 | var n = densifyAntimeridianSegment([180, -1], [180, 1.1], 0.5); 12 | assert.deepEqual(s, [[180, 1], [180, 0.5], [180, 0], [180, -0.5]]) 13 | assert.deepEqual(n, [[180, -0.5], [180, 0], [180, 0.5], [180, 1]]) 14 | }); 15 | 16 | }) 17 | }) -------------------------------------------------------------------------------- /test/dp-test.mjs: -------------------------------------------------------------------------------- 1 | import assert from 'assert'; 2 | import api from '../mapshaper.js'; 3 | 4 | 5 | describe("mapshaper-dp.js", function() { 6 | 7 | 8 | 9 | }) -------------------------------------------------------------------------------- /test/geodesic-test.mjs: -------------------------------------------------------------------------------- 1 | import assert from 'assert'; 2 | import api from '../mapshaper.js'; 3 | var internal = api.internal; 4 | 5 | describe('mapshaper-geodesic.js', function () { 6 | 7 | }) 8 | -------------------------------------------------------------------------------- /test/innerlines-test.mjs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/test/innerlines-test.mjs -------------------------------------------------------------------------------- /test/issue-161-test.mjs: -------------------------------------------------------------------------------- 1 | import api from '../mapshaper.js'; 2 | import assert from 'assert'; 3 | 4 | 5 | describe('issue 161', function () { 6 | 7 | it ('simplification is applied to SVG output', function(done) { 8 | api.applyCommands('-i test/data/two_states.shp -o a.svg -simplify 10% -o b.svg', null, function(err, output) { 9 | assert(output['a.svg'].length > output['b.svg'].length); 10 | done(); 11 | }); 12 | }); 13 | }) 14 | -------------------------------------------------------------------------------- /test/issue-171-test.mjs: -------------------------------------------------------------------------------- 1 | import api from '../mapshaper.js'; 2 | import assert from 'assert'; 3 | 4 | 5 | describe('Issue #171: Invalid GeoJSON output when attribute data contains $&', function () { 6 | it ('test', function(done) { 7 | var geojson = { 8 | type: 'Feature', 9 | properties: {foo: ' $& '} 10 | }; 11 | 12 | var cmd = '-i input.json -o output.json'; 13 | api.applyCommands(cmd, {'input.json': geojson}, function(err, output) { 14 | JSON.parse(output['output.json']); // throws if JSON is invalid 15 | done(); 16 | }); 17 | }); 18 | 19 | }); 20 | -------------------------------------------------------------------------------- /test/issue-193-test.mjs: -------------------------------------------------------------------------------- 1 | import api from '../mapshaper.js'; 2 | import assert from 'assert'; 3 | 4 | 5 | describe('Issue #193: Error parsing a .prj file with "Gauss_Kruger" projection', function () { 6 | it ('reproject to WGS84 without error', function(done) { 7 | 8 | var cmd = '-i test/data/issues/193/gauss_kruger.shp -proj wgs84 -o'; 9 | 10 | api.applyCommands(cmd, {}, function(err, output) { 11 | assert(/WGS84/.test(output['gauss_kruger.prj'])); 12 | done(); 13 | }); 14 | }); 15 | 16 | }); 17 | -------------------------------------------------------------------------------- /test/issue-236-test.mjs: -------------------------------------------------------------------------------- 1 | import fs from 'fs'; 2 | import api from '../mapshaper.js'; 3 | import assert from 'assert'; 4 | import helpers from './helpers'; 5 | 6 | var parseGeoJSON = api.internal.parseGeoJSON, 7 | FileReader = api.internal.FileReader, 8 | StringReader = helpers.Reader; 9 | 10 | describe('Issue #236: Failing to export GeoJson files', function () { 11 | it ('Feature collection with crs property', function() { 12 | 13 | var file = 'test/data/issues/236/point.geojson'; 14 | var reader = new FileReader(file); 15 | var features = []; 16 | var contents = fs.readFileSync(file, 'utf8'); 17 | var target = JSON.parse(contents).features; 18 | parseGeoJSON(reader, function(feat) {features.push(feat)}); 19 | assert.deepEqual(features, target); 20 | }); 21 | 22 | }); 23 | -------------------------------------------------------------------------------- /test/issue-339-test.mjs: -------------------------------------------------------------------------------- 1 | import api from '../mapshaper.js'; 2 | import assert from 'assert'; 3 | 4 | 5 | describe('Issue #339 (no .prj output after -proj +proj=stere)', function () { 6 | 7 | it ('.prj is generated', async function() { 8 | var cmd = '-i test/data/three_points.shp -proj +proj=stere -o'; 9 | var output = await api.applyCommands(cmd, {}); 10 | var prj = output['three_points.prj'] 11 | assert(prj.indexOf('Stereographic') > -1); 12 | }); 13 | 14 | }); 15 | -------------------------------------------------------------------------------- /test/issue-485-test.mjs: -------------------------------------------------------------------------------- 1 | import api from '../mapshaper.js'; 2 | import assert from 'assert'; 3 | 4 | 5 | describe('Issue #485 (Error importing files with * wildcard)', function () { 6 | 7 | it('match files with *', function(done) { 8 | var cmd = '-i test/data/issues/485_wildcard/* -o'; 9 | api.applyCommands(cmd, {}, function(err, out) { 10 | var json = JSON.parse(out['three_points.json']); 11 | assert.equal(json.features.length, 3); 12 | done(); 13 | }) 14 | }); 15 | }); 16 | -------------------------------------------------------------------------------- /test/issue-538-test.mjs: -------------------------------------------------------------------------------- 1 | import api from '../mapshaper.js'; 2 | import assert from 'assert'; 3 | 4 | 5 | describe('Issue #538 (Holes can disappear in GeoJSON output and after -explode)', function () { 6 | 7 | it('test', function(done) { 8 | var cmd = '-i test/data/issues/538_missing_holes/multipolygon.json -explode -o'; 9 | api.applyCommands(cmd, {}, function(err, out) { 10 | var json = JSON.parse(out['multipolygon.json']); 11 | assert.equal(json.geometries[0].coordinates.length, 1) 12 | assert.equal(json.geometries[1].coordinates.length, 2) // second polygon contains a hol 13 | done(); 14 | }) 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /test/issue-clean-errors.mjs: -------------------------------------------------------------------------------- 1 | import assert from 'assert'; 2 | import api from '../mapshaper.js'; 3 | var internal = api.internal, 4 | geom = api.geom; 5 | 6 | describe('Clean errors', function () { 7 | 8 | }) 9 | -------------------------------------------------------------------------------- /test/polyline-buffer-test.mjs: -------------------------------------------------------------------------------- 1 | import api from '../mapshaper.js'; 2 | import assert from 'assert'; 3 | var internal = api.internal; 4 | 5 | describe('mapshaper-polyline-buffer.js', function () { 6 | describe('addBufferVertex', function () { 7 | var a = [[1, 1], [3, 3], [1, 5], [3, 7], [2, 8]]; 8 | it('remove intersections with backtracking == 10', function () { 9 | var arr = a.concat(); 10 | internal.addBufferVertex(arr, [2, 1], 10); 11 | var expect = [[1, 1], [2, 2], [2, 1]]; 12 | assert.deepEqual(arr, expect); 13 | }) 14 | 15 | it('remove intersections with backtracking == 1', function () { 16 | var arr = a.concat(); 17 | internal.addBufferVertex(arr, [2, 1], 1); 18 | var expect = [[1, 1], [3, 3], [1, 5], [2, 6], [2, 1]]; 19 | assert.deepEqual(arr, expect); 20 | }) 21 | 22 | }) 23 | }) 24 | -------------------------------------------------------------------------------- /test/simplify-fast-test.mjs: -------------------------------------------------------------------------------- 1 | import assert from 'assert'; 2 | import api from '../mapshaper.js'; 3 | 4 | 5 | describe('mapshaper-simplify-fast.js', function () { 6 | 7 | it('"-points inner" converts collapsed polygon to null geometry', function () { 8 | var shp = [[[0]]]; 9 | var arcs = new api.internal.ArcCollection([[[0, 0], [0, 0], [0, 0], [0, 0]]]); 10 | var simple = api.internal.simplifyPolygonFast(shp, arcs, 1); 11 | assert.equal(simple.shape, null); 12 | }) 13 | 14 | it('"-points inner" converts collapsed polygon to null geometry 2', function () { 15 | var shp = [[[0]]]; 16 | var arcs = new api.internal.ArcCollection([[[0, 0], [0, 1], [1, 0], [0, 0]]]); 17 | var simple = api.internal.simplifyPolygonFast(shp, arcs, 1); 18 | assert.equal(simple.shape, null); 19 | }) 20 | 21 | 22 | }) 23 | -------------------------------------------------------------------------------- /test/stash-test.mjs: -------------------------------------------------------------------------------- 1 | import api from '../mapshaper.js'; 2 | import assert from 'assert'; 3 | var internal = api.internal; 4 | 5 | describe('mapshaper-stash.js', function () { 6 | it('tests', function() { 7 | internal.stashVar('foo', 'bar'); 8 | assert.throws(function() { 9 | internal.stashVar('foo', 'baz'); 10 | }) 11 | assert.equal(internal.getStashedVar('foo'), 'bar'); 12 | internal.clearStash(); 13 | assert.equal(internal.getStashedVar('foo'), null); 14 | // assert.throws(function() { 15 | // internal.getStashedVar('foo'); 16 | // }); 17 | 18 | }) 19 | 20 | }) 21 | -------------------------------------------------------------------------------- /test/stringify-test.mjs: -------------------------------------------------------------------------------- 1 | import api from '../mapshaper.js'; 2 | import assert from 'assert'; 3 | 4 | 5 | describe('mapshaper-stringify.js', function () { 6 | describe('getFormattedStringify', function () { 7 | it('Numerical arrays in an approved list are formatted with spaces', function () { 8 | var obj = { 9 | bbox: [-1,0,1,2] 10 | }; 11 | var stringify = api.internal.getFormattedStringify(['bbox']); 12 | assert.equal(stringify(obj), '{\n "bbox": [-1, 0, 1, 2]\n}'); 13 | }) 14 | }) 15 | }) 16 | -------------------------------------------------------------------------------- /test/svg-properties-test.mjs: -------------------------------------------------------------------------------- 1 | import { mightBeExpression } from '../src/svg/svg-properties'; 2 | import api from '../mapshaper.js'; 3 | import assert from 'assert'; 4 | 5 | 6 | describe('svg-properties.js', function () { 7 | describe('mightBeExpression()', function () { 8 | it('lists of numbers are not expressions', function() { 9 | assert(!mightBeExpression('1,2,3')); 10 | }); 11 | 12 | it('division', function() { 13 | var str = 'foo / 3'; 14 | assert(mightBeExpression('foo / 3')); 15 | }); 16 | 17 | }) 18 | }) 19 | -------------------------------------------------------------------------------- /test/symbol-utils-test.mjs: -------------------------------------------------------------------------------- 1 | 2 | import { findArcCenter } from '../src/symbols/mapshaper-symbol-utils'; 3 | import api from '../mapshaper.js'; 4 | import assert from 'assert'; 5 | 6 | 7 | describe('mapshaper-symbol-utils.js', function () { 8 | 9 | describe('findArcCenter()', function () { 10 | it('tests', function () { 11 | findArcCenter([0, 0], [10, 0], 90 * Math.PI / 180); 12 | }) 13 | }) 14 | }); 15 | -------------------------------------------------------------------------------- /test/symbols-test.mjs: -------------------------------------------------------------------------------- 1 | import api from '../mapshaper.js'; 2 | import assert from 'assert'; 3 | 4 | 5 | describe('mapshaper-symbols.js', function () { 6 | 7 | 8 | }); 9 | -------------------------------------------------------------------------------- /test/topojson-presimplify-test.mjs: -------------------------------------------------------------------------------- 1 | import assert from 'assert'; 2 | import api from '../mapshaper.js'; 3 | var topojson = api.internal.topojson; 4 | 5 | describe('topojson-presimplify.js', function () { 6 | describe('getPresimplifyFunction(100000)', function () { 7 | var fromZ = topojson.getPresimplifyFunction(100000); 8 | it('Infinity -> 0', function () { 9 | assert.equal(fromZ(Infinity), 0); 10 | }) 11 | 12 | it('0 -> 0', function() { 13 | assert.equal(fromZ(0), 0); 14 | }) 15 | 16 | it('1 -> 100', function() { 17 | assert.equal(fromZ(100), 10); 18 | }); 19 | 20 | it('5 -> 500', function() { 21 | assert.equal(fromZ(500), 50); 22 | }); 23 | }) 24 | }) 25 | -------------------------------------------------------------------------------- /test/undershoots-test.mjs: -------------------------------------------------------------------------------- 1 | import api from '../mapshaper.js'; 2 | import assert from 'assert'; 3 | 4 | var ArcCollection = api.internal.ArcCollection; 5 | 6 | describe('mapshaper-undershoots.js', function () { 7 | 8 | describe('getDirectedArcPresenceTest()', function () { 9 | it('test 1', function () { 10 | var arcs = [~1, 4, 5, 0]; 11 | var test = api.internal.getDirectedArcPresenceTest(arcs, 6); 12 | assert(test(~1)); 13 | assert(test(4)); 14 | assert(test(0)); 15 | assert(!test(1)); 16 | assert(!test(~0)); 17 | assert(!test(3)); 18 | }) 19 | }) 20 | }); 21 | -------------------------------------------------------------------------------- /www/assets/SourceSansPro-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/www/assets/SourceSansPro-Regular.woff -------------------------------------------------------------------------------- /www/assets/SourceSansPro-Semibold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/www/assets/SourceSansPro-Semibold.woff -------------------------------------------------------------------------------- /www/assets/iosevka-light.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/www/assets/iosevka-light.woff2 -------------------------------------------------------------------------------- /www/basemap.js: -------------------------------------------------------------------------------- 1 | window.mapboxParams = { 2 | js: 'https://api.mapbox.com/mapbox-gl-js/v2.11.1/mapbox-gl.js', 3 | css: 'https://api.mapbox.com/mapbox-gl-js/v2.11.1/mapbox-gl.css', 4 | key: 'pk.eyJ1IjoiZ3JhbW1hdGEiLCJhIjoiY2wxMzI4b3dqMDNhMjNpcDhzcmU0aGh5diJ9.m1lacx48pTYls-X3FVhG9g', 5 | styles: [{ 6 | name: 'Map', 7 | icon: 'images/thumb-map.jpg', 8 | url: 'mapbox://styles/grammata/cl0ymri0f000214lc1mgtweqk' 9 | }, { 10 | name: 'Satellite', 11 | icon: 'images/thumb-satellite.jpg', 12 | dark: true, 13 | url: 'mapbox://styles/grammata/cl0ymvkkl004115mlgf5o442n' 14 | }] 15 | }; 16 | -------------------------------------------------------------------------------- /www/images/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/www/images/close.png -------------------------------------------------------------------------------- /www/images/close2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/www/images/close2.png -------------------------------------------------------------------------------- /www/images/eye.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/www/images/eye.png -------------------------------------------------------------------------------- /www/images/eye2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/www/images/eye2.png -------------------------------------------------------------------------------- /www/images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/www/images/icon.png -------------------------------------------------------------------------------- /www/images/slider_handle_v1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/www/images/slider_handle_v1.png -------------------------------------------------------------------------------- /www/images/thumb-map.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/www/images/thumb-map.jpg -------------------------------------------------------------------------------- /www/images/thumb-satellite.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbloch/mapshaper/e9e138e8f4280e9781955c23a2f8ff44e8c87646/www/images/thumb-satellite.jpg -------------------------------------------------------------------------------- /www/manifest.js: -------------------------------------------------------------------------------- 1 | /* This file can contain files and import options; see mapshaper-gui; example: 2 | mapshaper.manifest = { 3 | files: [], 4 | quick_view: true, 5 | commands: "" 6 | }; 7 | */ --------------------------------------------------------------------------------