Code Monkey home page Code Monkey logo

jpstools's Introduction

jpsTools

tool for converting osm-data into jupedsim geometry files

Requirements:

  • Python3
  • shapely
  • pyproj
  • matplotlib
  • lxml

How to:

  • Download openstreetmap data for a specific area. In terms of being able to manually edit the data I recommend using JOSM (JavaOpenStreetMap-Editor)
  • Save the data of your choice as an .osm file
  • Run jpsTools.osmImport.main() with command-line argmuents [1] the folder of your osm file and [2] the filename e.g. 'resources/ Meckesheim.osm' [3] 'handle' if you want jpsTools to translate ways by attributes polygons and define transitions. leave [3] empty if you only want to convert a finished and edited .osm file.

Configurations

  • inside jpsTools.osmImport.main() modify or define as many filterTags and unhandleTags as you want. Depending on your the local osm community and their 'dialects' tagging might differ
  • filterTags describe which elements to load and handle from your osm file. If an osm element contains the key-value pair it will be used.
  • unhandleTags are currently used for nodes, which aren't supposed to be adjusted. e.g. Tag: 'elevator'='yes', it is not our aim to merge paths on either side of an elevator.
  • Check what tags you want to translate by playing around with your downloaded elements in JOSM
  • The tag 'width' = XX describes the width of an element in meters. If you know the shapes of you environment you can add the tag to any element and jpsTools will use the value to buffer its size.
  • Closed ways (first node equals last node) tagged 'area'='yes' are defined as areas and will not be adjusted in size.

jpstools's People

Contributors

bsmoehring avatar chraibi avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

jupedsim

jpstools's Issues

String convert?

I have a question to this line,
which gives me a SyntaxError: invalid syntax

Do you mean to convert i to a str? (str(i))

obstacles

handling obstacles not implemented yet

exit transitions

how to recognize exit transitions to the outside (end of the simulation)?

linestring transitions

what if a transition consists of more than two points?
required: algorithm to connect end points of the linestring with a single line and adjust the relevant polygons

how to manually adjust geometries?

  • output to could be written as osm-readable xmls. we can than easily an manually adjust them in josm
    advantage: if we later compile a josm plugin the whole process stays inside a single tool

  • own interface
    advantage: we can easily specify the allowed tools and constraints

-geojson:
advantage: standard format. accessible from e.g. QGIS

translate goals

define closed areas as goals in josm

tags:
area=yes
jupedsim=goal

Howto

Could you please explain what you mean with "Define input and output"?

It is possible to make a small video for this HowTo?

double tagged geometries

need a method to handle geometries within another geometry.

Example: A path (highway=footway) can be inside a polygon (indoor=corridor, area=yes).
We need to decide about which object to choose.

Module missing?

  from pyproj import Proj
ModuleNotFoundError: No module named 'pyproj'

Something missing?

add consistency checks

  • are all polygons valid?
  • connecting points connected to relevant ways/polys?
  • original ways inside the equivalent poly?
    ...

transitions not always determined

sometimes transitions between rooms are smaller than they should be:

image

sometimes transitions aren't recognized at all. happened if one room has multiple transition with another room
Screenshot from 2018-01-30 12-17-16
image

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.