Categories

GeoJSON to OSM Converter

Convert GeoJSON format to OpenStreetMap (OSM) XML format

Key Facts

Category
Format Conversion
Input Types
textarea, number, checkbox
Output Type
text
Sample Coverage
4
API Ready
Yes

Overview

The GeoJSON to OSM Converter is a specialized utility designed to transform geographic data from GeoJSON format into the OpenStreetMap (OSM) XML schema, enabling seamless integration of custom spatial features into mapping projects.

When to Use

  • When you need to import custom geographic shapes or points into OpenStreetMap editors like JOSM.
  • When migrating spatial data from web-based GIS applications to desktop mapping environments.
  • When preparing custom vector layers for offline map rendering or specialized OSM-based analysis.

How It Works

  • Paste your GeoJSON data into the input field.
  • Define custom starting IDs for nodes and ways to prevent conflicts with existing map data.
  • Toggle the 'Pretty Print' option to ensure the resulting XML is clean and human-readable.
  • Click the convert button to generate your OSM XML file for immediate download or use.

Use Cases

Converting custom building footprints from municipal GIS data into OSM format.
Transforming GPS-tracked paths into OSM ways for map contribution.
Standardizing proprietary spatial data for use in open-source mapping projects.

Examples

1. Importing Custom Building Footprints

GIS Technician
Background
A technician has a set of building footprints in GeoJSON format that need to be uploaded to an OpenStreetMap local instance.
Problem
The data is in the wrong format for the OSM editor and lacks the required XML structure.
How to Use
Paste the GeoJSON into the input area and set the Way Start ID to -1000 to avoid conflicts.
Example Config
nodeStartId: -1, wayStartId: -1000, prettyPrint: true
Outcome
A clean OSM XML file ready to be imported into JOSM for final verification and upload.

Try with Samples

json, xml

Related Hubs

FAQ

What is the difference between GeoJSON and OSM XML?

GeoJSON is a lightweight format for encoding geographic data structures, while OSM XML is a specific schema used by OpenStreetMap to represent nodes, ways, and relations.

Why should I set custom Node and Way IDs?

Setting unique negative IDs helps prevent ID collisions when merging your converted data into an existing OSM dataset.

Does this tool support complex relations?

The tool primarily maps standard GeoJSON geometries to OSM nodes and ways; complex relations may require manual adjustment in an OSM editor.

Can I use this for large datasets?

Yes, but for extremely large files, ensure your browser has sufficient memory to process the XML transformation.

Is the output compatible with JOSM?

Yes, the generated OSM XML follows standard formatting compatible with JOSM and other OpenStreetMap-compliant software.

API Documentation

Request Endpoint

POST /en/api/tools/geojson-to-osm

Request Parameters

Parameter Name Type Required Description
geojsonInput textarea Yes -
nodeStartId number No -
wayStartId number No -
prettyPrint checkbox No -

Response Format

{
  "result": "Processed text content",
  "error": "Error message (optional)",
  "message": "Notification message (optional)",
  "metadata": {
    "key": "value"
  }
}
Text: Text

AI MCP Documentation

Add this tool to your MCP server configuration:

{
  "mcpServers": {
    "elysiatools-geojson-to-osm": {
      "name": "geojson-to-osm",
      "description": "Convert GeoJSON format to OpenStreetMap (OSM) XML format",
      "baseUrl": "https://elysiatools.com/mcp/sse?toolId=geojson-to-osm",
      "command": "",
      "args": [],
      "env": {},
      "isActive": true,
      "type": "sse"
    }
  }
}

You can chain multiple tools, e.g.: `https://elysiatools.com/mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp`, max 20 tools.

If you encounter any issues, please contact us at [email protected]