Конвертер пространственных данных GeoJSON ↔ WKT

ДанныеРазработчик
Реклама · УДАЛИТЬ?
[iotools_geojson_wkt_converter]
Реклама · УДАЛИТЬ?

Гид

GeoJSON ↔ WKT Spatial Data Converter

Конвертер пространственных данных GeoJSON ↔ WKT

Convert geometries back and forth between GeoJSON и WKT (Well-Known Text) without ever wondering whether your coordinates got swapped. Paste either format, pick a direction (or let auto-detect do it), and watch the geometry render on a live OpenStreetMap preview so you can verify the shape before it goes into your database, map tile, or GIS pipeline.

Как использовать

  1. Paste a GeoJSON geometry, Feature, FeatureCollection, or a WKT string into the input box.
  2. Оставить Направление на Автоопределение, or pick the explicit direction if your input is ambiguous.
  3. Choose a coordinate precision if you want to trim long decimals; the default keeps the full value.
  4. Переключать Pretty-print GeoJSON for indented JSON output, and Uppercase WKT for canonical type keywords.
  5. Используйте Swap & Round-trip to feed the current output back as input — useful for sanity-checking a conversion.

Возможности

  • Двунаправленное преобразование – GeoJSON → WKT and WKT → GeoJSON in a single tool.
  • Full geometry coverage – Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon, and GeometryCollection.
  • Z, M, and ZM coordinates – parses 3D and measured WKT (POINT Z, POINT ZM) and preserves the extra ordinates in the GeoJSON output.
  • EMPTY geometry support – round-trips POINT EMPTY, POLYGON EMPTY, etc. without errors.
  • Feature and FeatureCollection input – unwraps a single Feature or collapses a FeatureCollection into a GeometryCollection.
  • Live OpenStreetMap preview – renders the geometry via Leaflet so you can spot a swapped latitude/longitude immediately.
  • Настройка точности – round to anywhere between 4 and 8 decimal places, or keep full precision.
  • Автоматическое распознавание ввода – sniffs the first character to choose between JSON parsing and WKT tokenisation.
  • Копирование и загрузка – grab the converted text in one click for use in PostGIS, Shapely, Mapbox, or any other GIS tool.

Часто задаваемые вопросы

  1. Why do GeoJSON and WKT order coordinates as longitude before latitude?

    Both formats follow the mathematical convention that the X axis comes before the Y axis, and in the EPSG:4326 reference system X maps to longitude and Y maps to latitude. The OGC and IETF specifications (RFC 7946 for GeoJSON and OGC 06-103r4 for WKT) codified this ordering to keep geometry libraries interoperable. Human-friendly labels like "lat, lon" reverse this order, which is the single most common cause of points landing in the wrong hemisphere.

  2. What is the difference between a Polygon and a MultiPolygon?

    A Polygon is one continuous filled area with an exterior boundary and zero or more interior holes, expressed in WKT as POLYGON ((outer ring), (hole), ...). A MultiPolygon is a set of separate Polygons treated as a single feature — useful when a single country or region is made of several disconnected landmasses. In GeoJSON the nesting deepens by one level for MultiPolygon: coordinates becomes [polygon][ring][point] instead of [ring][point].

  3. What does it mean for a polygon ring to be closed?

    A linear ring is closed when its first and last coordinate pairs are identical. GeoJSON RFC 7946 requires every polygon ring to be closed, and WKT validators typically enforce the same rule. If you build a ring from a list of vertices, always re-append the first vertex at the end before serialising.

  4. What are the Z and M dimensions in WKT?

    Z is an elevation (or any third spatial axis), M is a measure (often time, distance along a route, or a sensor reading). WKT marks them with a suffix on the type — POINT Z (1 2 3), POINT M (1 2 3), POINT ZM (1 2 3 4). GeoJSON allows optional third and fourth values inside each coordinate array but does not formally distinguish Z from M; the recommended convention is [lon, lat, elevation].

  5. When should I use a GeometryCollection?

    A GeometryCollection holds heterogeneous geometries — say, a Point and a Polygon — as one entity. It is helpful for grouping related features that do not share a type, but many GIS systems (notably PostGIS spatial indexes and some web mapping libraries) handle simpler types more efficiently, so prefer MultiPoint, MultiLineString, or MultiPolygon when every part shares the same geometry type.

Хотите убрать рекламу? Откажитесь от рекламы сегодня

Установите наши расширения

Добавьте инструменты ввода-вывода в свой любимый браузер для мгновенного доступа и более быстрого поиска

в Расширение Chrome в Расширение края в Расширение Firefox в Расширение Opera

Табло результатов прибыло!

Табло результатов — это интересный способ следить за вашими играми, все данные хранятся в вашем браузере. Скоро появятся новые функции!

Реклама · УДАЛИТЬ?
Реклама · УДАЛИТЬ?
Реклама · УДАЛИТЬ?

новости с техническими моментами

Примите участие

Помогите нам продолжать предоставлять ценные бесплатные инструменты

Купи мне кофе
Реклама · УДАЛИТЬ?