DevTools Logo

GeoJSON to TopoJSON & WKT Converter

GeoJSON to TopoJSON & WKT Converter

Convert GeoJSON locally into compact TopoJSON topology or standards-friendly WKT

GeoJSON input

Paste a GeoJSON FeatureCollection and choose optional TopoJSON quantization. The converter generates compact topology, WKT geometry strings, and a simple [minX, minY, maxX, maxY] bounding box without uploading your data.

    Examples

    Point round-trip plus WKT

    Input
    convertGeoJsonJson('{"type":"FeatureCollection","features":[{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[10,20]}}]}')
    Output
    { wkt: "Feature 1: POINT (10 20)", bbox: [10, 20, 10, 20] }

    The point survives topology conversion exactly and renders as WKT with its bbox.

    Quantized polygon

    Input
    convertGeoJsonJson(polygonRaw, 1000).topology
    Output
    { transform present, round-trip error < 0.01 }

    Quantization adds a topology transform while keeping coordinates within tolerance.

    About this tool

    GeoJSON TopoJSON Converter bridges formats with convertGeoJson(collection, quantization = 0) and convertGeoJsonJson(raw, quantization): parseGeoJson validates a FeatureCollection, topojson-server builds the Topology, and topojson-client converts it back to a FeatureCollection for round-trip checks.

    Each conversion returns { topology, feature, wkt, bbox }: WKT renders Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon, and GeometryCollection with Feature N: prefixes, while bbox is the [minX, minY, maxX, maxY] sweep over every finite coordinate.

    Quantization is strict and deterministic: 0 means no transform, values below 2 throw, and N >= 2 emits a quantized transform that bounds round-trip error — identical inputs always produce identical TopoJSON strings via formatGeoJsonResult.

    How to use this tool

    1. Paste GeoJSON

      Provide a FeatureCollection string or object with valid feature geometries.

    2. Set quantization

      Keep 0 for exact arcs or pass an integer >= 2 for smaller topology output.

    3. Verify round-trip

      Compare topologyToFeature output coordinates and the WKT plus bbox summary.

    Use cases

    Shrinking map payloads

    Quantize shared arcs before serving TopoJSON to web maps.

    Validating imports

    Catch non-JSON, non-FeatureCollection, and bad-geometry uploads with explicit errors.

    Previewing geometry

    Read WKT lines and bbox extents without opening a GIS client.

    Common mistakes

    Mistake:Passing quantization 1 for light compression.

    Fix:Only 0 or integers >= 2 are valid — 1 throws a quantization error by design.

    Mistake:Expecting quantized coordinates to match exactly.

    Fix:Quantization rounds positions, so assert within tolerance instead of deep equality.

    Mistake:Feeding a bare Feature or Geometry.

    Fix:The converter requires a FeatureCollection with a features array — wrap single features first.

    Frequently asked questions

    What does this tool do?

    It converts a FeatureCollection with convertGeoJsonJson into TopoJSON via topojson-server, converts back with topojson-client, and reports WKT plus a [minX, minY, maxX, maxY] bbox.

    How does quantization affect output?

    Quantization 0 keeps exact arcs with no transform, integers >= 2 add a transform that bounds round-trip error, and 1 or negative values throw a quantization error.

    Is my map data uploaded or stored?

    No. Validation, topology building, WKT rendering, and bbox math run entirely in your browser.

    Why a FeatureCollection or JSON error?

    Only valid JSON FeatureCollection objects with a features array convert — bare Features and malformed JSON throw before any topology work.

    References & standards

    .env Secret Safety Linter

    Validate .env syntax and spot likely leaked credentials or placeholder secrets.

    .htaccess Generator

    Build an Apache .htaccess — HTTPS redirects, rewrites, error pages, security headers, and basic auth

    2D Fluid Dynamics & Particle Physics Sandbox

    A physics playground with two engines sharing one canvas. The fluid mode runs a real Eulerian Navier-Stokes solver — semi-Lagrangian advection, explicit diffusion, Jacobi pressure projection and vorticity confinement — that you paint with dye and velocity using mouse or touch. The particle mode is a damped Verlet N-body engine with gravity wells, Coulomb attractors and repulsors, spring links, wall restitution and elastic circle collisions. Particle counts adapt to the device (100k target on WebGL2 desktop, 2k-5k on CPU fallback), and every configuration exports as runnable code: a Matter.js world, a PixiJS ticker setup, or a standalone vanilla Canvas engine.

    AI Function Calling Schema Generator

    Generate function calling JSON schemas from TypeScript interfaces

    Algorithm Arena & Data Structure Visualizer

    Interactive arena for algorithms and data structures: eight sorting algorithms racing on one seeded input, six pathfinding algorithms walking generated mazes, and BST, AVL, Red-Black, B-tree, heap and trie operations replayed step by step with rotations highlighted. Every run shows the Big-O table and the phase-highlighted reference implementation in four languages, and compared values can be played as pitch (sonification) through the shared audio engine. Everything runs client-side; inputs never leave the browser.

    Ansible Playbook Generator

    Build an Ansible playbook — hosts, vars, and tasks with modules — as YAML