The config file seems to be ignored by osm2world when exporting to obj

I discovered osm2world today and I love the idea and the results I have seen so far.

I only want to export buildings to obj (I also have 3D printing in mind), but my config file seems to be ignored. Here is what I do:

wget -O extract.osm "https://overpass-api.de/api/map?bbox=7.44198,46.94575,7.44421,46.94702"
docker run -v $(pwd):/data osm2world --input /data/extract.osm --output /data/output.obj --config /data/config.properties 

The contents of config.properties is:

createTerrain=true
renderBuildings=true
# rest is false
renderForest=false
renderTrees=false
renderTerrain=false
renderWater=false
renderBarriers=false
renderBridges=false
renderRailways=false
renderPowerlines=false
renderStreetFurniture=false
renderUnderground=false
drawBuildingWindows=false
useBuildingColors=false

What am I doing wrong?


As you can see, I run osm2world in Docker. For reference, this is the Dockerfile I created to build the container with docker build -t osm2world .:

# Use Ubuntu as base image
FROM ubuntu:latest

# Avoid prompts from apt
ENV DEBIAN_FRONTEND=noninteractive

# Install OpenJDK and required packages
RUN apt-get update && apt-get install -y \
    openjdk-17-jdk \
    wget \
    unzip \
    && rm -rf /var/lib/apt/lists/*

# Set working directory
WORKDIR /osm2world

# Download and install OSM2World
RUN wget -O osm2world.zip https://osm2world.org/download/files/latest/OSM2World-latest-bin.zip 
RUN unzip osm2world.zip \
    && rm osm2world.zip

# Set the entry point to run osm2world
ENTRYPOINT ["java", "-jar", "OSM2World.jar"]

``

The options renderBuildings, renderForest, etc. do not exist.

The only options in your file current OSM2World versions recognize are createTerrain and useBuildingColors. So these will be the only ones which have any effect.

What you can do is:

implicitWindowImplementation = NONE
explicitWindowImplementation = NONE

useBuildingColors = false

excludeWorldModule = RoadModule;RailwayModule;AerowayModule;ParkingModule;TreeModule;StreetFurnitureModule;TrafficSignModule;BicycleParkingModule;WaterModule;PoolModule;GolfModule;SportsModule;CliffModule;BarrierModule;PowerModule;MastModule;BridgeModule;TunnelModule;IndoorModule

This is not a very elegant solution and may be subject to change in future versions, but it should work for 0.4.0 and for the latest build at the time of this post.

Hi Tobias, thank you for your quick reply, this works! It removed all the objects that I wanted. The green bounding box is still there, but that’s okay, Thank you!

image