GithubHelp home page GithubHelp logo

convertosmtoinetobstacles's Introduction

ConvertOsmToInetObstacles

This script extracts INET/OMNeT++ obstacles from an OpenStreetMap (OSM) map.

Description

The purpose of obstacles in INET framework is to simulate real world objects such as walls, trees, buildings and hills. More specifically, they are used to absorb and reflect radio waves, reducing signal quality and decreasing the chance of a successful reception. Using this script, you are able to extract the obstacles (buildings, pavements...) of any OSM map and then use them on the INET framework. In case you make use of the veins_inet project, you can set the margin variable too. Differently, please ignore this parameter and set it to 0.

Usage

Extract INET obstacles from an OSM using the default margin of the veins_inet project.

./ConvertOsmToInetObstacles.sh <osm-net-filename> <osm-poly-filename> <destination-filename>

Extract INET obstacles from an OSM map using a custom margin.

./ConvertOsmToInetObstacles.sh <osm-net-filename> <osm-poly-filename> <destination-filename> <margin>

Example

In this example, we will download an OSM map using the osmWebWizard.py tool which comes along with the SUMO road traffic simulator and then we will extract the INET obstacles.

Download the map

  1. Run the osmWebWizard.py.
  2. Select the area that you want to download.
  3. Press the Generate Scenario button.
  4. Find the downloaded OSM map to the same folder from which you have run the osmWebWizard.py.

Extract the INET obstacles from the map

  1. Open the terminal.
  2. Navigate to the folder which contains the ConvertOsmToInetObstacles.sh script.
  3. Run the following command.
./ConvertOsmToInetObstacles.sh path/to/the/downloaded/map/osm.net.xml path/to/the/downloaded/map/osm.poly.xml obstacles.xml
  1. In the current folder you will find the obstacles.xml file, which you can use to the INET project.
  2. Done!

More information

https://inet.omnetpp.org/docs/tutorials/wireless/doc/step11.html

convertosmtoinetobstacles's People

Contributors

panagis avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.