All Projects → tyrasd → Osmtogeojson

tyrasd / Osmtogeojson

Licence: mit
convert osm to geojson

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Osmtogeojson

Kepler
The open source full-stack geosocial network platform
Stars: ✭ 125 (-74.65%)
Mutual labels:  geojson, openstreetmap
Mapbox Gl Js
Interactive, thoroughly customizable maps in the browser, powered by vector tiles and WebGL
Stars: ✭ 8,017 (+1526.17%)
Mutual labels:  geojson, openstreetmap
Vector Datasource
Tilezen vector tile service - OpenStreetMap data in several formats
Stars: ✭ 427 (-13.39%)
Mutual labels:  geojson, openstreetmap
GpsPrune
GpsPrune is a map-based application for viewing, editing and converting coordinate data from GPS systems.
Stars: ✭ 46 (-90.67%)
Mutual labels:  geojson, openstreetmap
osm-static-maps
Openstreetmap static maps is a nodejs lib, CLI and server open source inspired on google static map service
Stars: ✭ 130 (-73.63%)
Mutual labels:  geojson, openstreetmap
Mapbox Gl Native Android
Interactive, thoroughly customizable maps in native Android powered by vector tiles and OpenGL
Stars: ✭ 135 (-72.62%)
Mutual labels:  geojson, openstreetmap
Osm2geojson
Convert OSM and Overpass JSON to GeoJSON
Stars: ✭ 25 (-94.93%)
Mutual labels:  geojson, openstreetmap
Mapboxstatic.swift
Static map snapshots with overlays in Swift or Objective-C on iOS, macOS, tvOS, and watchOS
Stars: ✭ 162 (-67.14%)
Mutual labels:  geojson, openstreetmap
osm-geojson
🔰 Get GeoJSON of a OpenStreetMap's relation from the API.
Stars: ✭ 42 (-91.48%)
Mutual labels:  geojson, openstreetmap
Mapbox Gl Native
Interactive, thoroughly customizable maps in native Android, iOS, macOS, Node.js, and Qt applications, powered by vector tiles and OpenGL
Stars: ✭ 4,091 (+729.82%)
Mutual labels:  geojson, openstreetmap
Navit
The open source (GPL v2) turn-by-turn navigation software for many OS
Stars: ✭ 368 (-25.35%)
Mutual labels:  openstreetmap
Orb
Types and utilities for working with 2d geometry in Golang
Stars: ✭ 378 (-23.33%)
Mutual labels:  geojson
Overpass Turbo
A web based data mining tool for OpenStreetMap using the Overpass API.
Stars: ✭ 435 (-11.76%)
Mutual labels:  openstreetmap
Go Geom
Package geom implements efficient geometry types for geospatial applications.
Stars: ✭ 456 (-7.51%)
Mutual labels:  geojson
Blendergis
Blender addons to make the bridge between Blender and geographic data
Stars: ✭ 4,642 (+841.58%)
Mutual labels:  openstreetmap
Fmm
Fast map matching, an open source framework in C++
Stars: ✭ 359 (-27.18%)
Mutual labels:  openstreetmap
Privacy Redirect
A simple web extension that redirects Twitter, YouTube, Instagram & Google Maps requests to privacy friendly alternatives.
Stars: ✭ 342 (-30.63%)
Mutual labels:  openstreetmap
Geolib
Zero dependency library to provide some basic geo functions
Stars: ✭ 3,675 (+645.44%)
Mutual labels:  geojson
Timezone Boundary Builder
A tool to extract data from Open Street Map (OSM) to build the boundaries of the world's timezones.
Stars: ✭ 469 (-4.87%)
Mutual labels:  openstreetmap
Osrm Backend
Open Source Routing Machine - C++ backend
Stars: ✭ 4,716 (+856.59%)
Mutual labels:  openstreetmap

osmtogeojson

Converts OSM data to GeoJSON. Try the demo!

This code is used in and maintained by the overpass turbo project.

Build Status

Usage

command line tool

Installation:

  $ npm install -g osmtogeojson

Usage:

$ osmtogeojson file.osm > file.geojson

Supported command line options are shown with:

$ osmtogeojson --help

When working with extra large data files (≳ 100 MB) it is recommended to run the programm with a little extra memory to avoid process out of memory errors. The easiest way to do this is by running the command as node <path-to-osmtogeojson> and setting the --max_old_space_size=… parameter to the available memory size in MB (osmtogeojson typically needs about 4-5 times the input data size). On a Unix system, you can use the following command:

$ node --max_old_space_size=8192 `which osmtogeojson` large.osm > large.geojson

nodejs library

Installation:

$ npm install osmtogeojson

Usage:

var osmtogeojson = require('osmtogeojson');
osmtogeojson(osm_data);

browser library

<script src='osmtogeojson.js'></script>

osmtogeojson(osm_data);

API

osmtogeojson( data, options )

Converts OSM data into GeoJSON.

  • data: the OSM data. Either as a XML DOM or in OSM JSON.
  • options: optional. The following options can be used:
    • flatProperties: If true, the resulting GeoJSON feature's properties will be a simple key-value list instead of a structured json object (with separate tags and metadata). default: false
    • uninterestingTags: Either a blacklist of tag keys or a callback function. Will be used to decide if a feature is interesting enough for its own GeoJSON feature.
    • polygonFeatures: Either a json object or callback function that is used to determine if a closed way should be treated as a Polygon or LineString. read more

The result is a javascript object of GeoJSON data:

GeoJSON

The GeoJSON produced by this library will include exactly one GeoJSON-feature for each of the following OSM objects (that is everything that is also visible in overpass turbo's map view):

  • all unconnected or interesting tagged nodes (POIs)
  • all ways (except uninteresting multipolygon outlines)
  • all multipolygons (simple multipolygons with exactly one closed outer way are present via their outer way)

All data is given as a FeatureCollection. Each Feature in the collection has an id property that is formed from the type and id of the original OSM object (e.g. node/123) and has the member properties containing the following data:

  • type: the OSM data type
  • id: the OSM id
  • tags: a collection of all tags
  • meta: metainformaton about the feature (e.g. version, timestamp, user, etc.)
  • relations: an array of relations the feature is member of. Each relation is encoded as an object literal containing the following properties: role (membership role), rel (the relation's id) and reltags (contains all tags of the relation)
  • tainted: this flag is set when the feature's geometry is incomplete (e.g. missing nodes of a way or missing ways of a multipolygon)

If the option flatProperties is set to true, the properties object will not contain any nested object literals, but directly provide a concise id, meta data and the tags of the respective OSM object.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].