Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception in thread "main" java.lang.IllegalStateException: cannot calculate outlines before cut information is set #184

Open
nikhilanayak opened this issue Sep 18, 2021 · 2 comments

Comments

@nikhilanayak
Copy link

I'm trying to export a map file as a .obj file, but I'm getting this error. Here's the full stracktrace:

Exception in thread "main" java.lang.IllegalStateException: cannot calculate outlines before cut information is set
	at org.osm2world.core.world.network.AbstractNetworkWaySegmentWorldObject.calculateXZGeometry(AbstractNetworkWaySegmentWorldObject.java:116)
	at org.osm2world.core.world.network.AbstractNetworkWaySegmentWorldObject.getOutlinePolygonXZ(AbstractNetworkWaySegmentWorldObject.java:538)
	at org.osm2world.core.world.network.AbstractNetworkWaySegmentWorldObject.getOutlinePolygonXZ(AbstractNetworkWaySegmentWorldObject.java:47)
	at org.osm2world.core.world.modules.PowerModule$PhotovoltaicPlant.getGroundObstacles(PowerModule.java:934)
	at org.osm2world.core.world.modules.PowerModule$PhotovoltaicPlant.<init>(PowerModule.java:834)
	at org.osm2world.core.world.modules.PowerModule.applyToArea(PowerModule.java:147)
	at org.osm2world.core.world.modules.common.AbstractModule.applyTo(AbstractModule.java:37)
	at org.osm2world.core.world.creation.WorldCreator.addRepresentationsTo(WorldCreator.java:28)
	at org.osm2world.core.ConversionFacade.createRepresentations(ConversionFacade.java:276)
	at org.osm2world.console.Output.output(Output.java:104)
	at org.osm2world.console.OSM2World.executeArgumentsGroup(OSM2World.java:215)
	at org.osm2world.console.OSM2World.main(OSM2World.java:144)

This happening on MacOSX (intel) with java 8.

@twobob
Copy link

twobob commented Oct 31, 2021

same. on PC.


java.lang.IllegalStateException: cannot calculate outlines before cut information is set
        at org.osm2world.core.world.network.AbstractNetworkWaySegmentWorldObject.calculateXZGeometry(AbstractNetworkWaySegmentWorldObject.java:116)
        at org.osm2world.core.world.network.AbstractNetworkWaySegmentWorldObject.getOutlinePolygonXZ(AbstractNetworkWaySegmentWorldObject.java:538)
        at org.osm2world.core.world.network.AbstractNetworkWaySegmentWorldObject.getOutlinePolygonXZ(AbstractNetworkWaySegmentWorldObject.java:47)
        at org.osm2world.core.world.modules.PowerModule$PhotovoltaicPlant.getGroundObstacles(PowerModule.java:934)
        at org.osm2world.core.world.modules.PowerModule$PhotovoltaicPlant.<init>(PowerModule.java:834)
        at org.osm2world.core.world.modules.PowerModule.applyToArea(PowerModule.java:147)
        at org.osm2world.core.world.modules.common.AbstractModule.applyTo(AbstractModule.java:37)
        at org.osm2world.core.world.creation.WorldCreator.addRepresentationsTo(WorldCreator.java:28)
        at org.osm2world.core.ConversionFacade.createRepresentations(ConversionFacade.java:276)
        at org.osm2world.viewer.model.Data.loadOSMData(Data.java:65)
        at org.osm2world.viewer.control.actions.AbstractLoadOSMAction$LoadOSMThread.run(AbstractLoadOSMAction.java:84)

D:\REPOS\osm-to-world>java --version
openjdk 11.0.11 2021-04-20
OpenJDK Runtime Environment AdoptOpenJDK-11.0.11+9 (build 11.0.11+9)
OpenJDK 64-Bit Server VM AdoptOpenJDK-11.0.11+9 (build 11.0.11+9, mixed mode)

@keaukraine
Copy link

keaukraine commented Jan 28, 2023

Also happened to me on Ubuntu under WLS.

kea@TUF-F15:~/osm2world$ sh osm2world.sh -i ~/maps/map2.osm -o ~/maps/out/map2.obj
osm2world.sh: 9: [[: not found
No --config parameter, using default style (standard.properties).

Relation r7604241 is incomplete, missing members: 'outer': Way 165261228, 'inner': Way 527443779
Relation r1725469 is incomplete, missing members: 'outer': Way 127453541, 'inner': Way 127453515
Relation r10319358 is incomplete, missing members: 'outer': Way 1072038285, 'outer': Way 367234975, 'outer': Way 111692863, 'outer': Way 111692885, 'outer': Way 111692870, 'outer': Way 182796151, 'outer': Way 111692873, 'outer': Way 182796150, 'outer': Way 111692880, 'outer': Way 121898324, 'outer': Way 123964327, 'outer': Way 1016521102, 'outer': Way 124243286, 'outer': Way 892388042, 'outer': Way 755551235, 'outer': Way 1072045137, 'outer': Way 191824283, 'outer': Way 1072045136, 'outer': Way 191824282, 'outer': Way 367234962, 'outer': Way 191824285, 'outer': Way 1072045135, 'outer': Way 191824286, 'outer': Way 1072045134, 'outer': Way 191824281, 'outer': Way 1072045133, 'outer': Way 191824288, 'outer': Way 1072045132, 'outer': Way 191824287, 'outer': Way 1072045131, 'outer': Way 191824290, 'outer': Way 1072045130, 'outer': Way 191824289, 'outer': Way 367234965, 'outer': Way 191824284, 'outer': Way 367234968, 'outer': Way 191824279, 'outer': Way 368301558, 'outer': Way 191824836, 'outer': Way 191824839, 'outer': Way 367234964, 'outer': Way 432946389, 'outer': Way 755551195, 'outer': Way 432946364, 'outer': Way 755551242
Relation r2985897 is incomplete, missing members: 'outer': Way 39273157
Relation r5071 is incomplete, missing members: 'outer': Way 15523438, 'inner': Way 126146475, 'inner': Way 429080619, 'inner': Way 126146518, 'inner': Way 429080618, 'inner': Way 126146516, 'inner': Way 138931596, 'inner': Way 910878806, 'inner': Way 910878805
Relation r5676442 is incomplete, missing members: 'outer': Way 381225328, 'outer': Way 381225330, 'outer': Way 381225329, 'outer': Way 381225331
Relation r5676428 is incomplete, missing members: 'outer': Way 381224162, 'outer': Way 126146506, 'outer': Way 381224161
Exception in thread "main" java.lang.IllegalStateException: cannot calculate outlines before cut information is set
        at org.osm2world.core.world.network.AbstractNetworkWaySegmentWorldObject.calculateXZGeometry(AbstractNetworkWaySegmentWorldObject.java:116)
        at org.osm2world.core.world.network.AbstractNetworkWaySegmentWorldObject.getOutlinePolygonXZ(AbstractNetworkWaySegmentWorldObject.java:538)
        at org.osm2world.core.world.network.AbstractNetworkWaySegmentWorldObject.getOutlinePolygonXZ(AbstractNetworkWaySegmentWorldObject.java:47)
        at org.osm2world.core.world.modules.PowerModule$PhotovoltaicPlant.getGroundObstacles(PowerModule.java:947)
        at org.osm2world.core.world.modules.PowerModule$PhotovoltaicPlant.<init>(PowerModule.java:847)
        at org.osm2world.core.world.modules.PowerModule.applyToArea(PowerModule.java:157)
        at org.osm2world.core.world.modules.common.AbstractModule.applyTo(AbstractModule.java:37)
        at org.osm2world.core.world.creation.WorldCreator.addRepresentationsTo(WorldCreator.java:40)
        at org.osm2world.core.ConversionFacade.createRepresentations(ConversionFacade.java:301)
        at org.osm2world.core.ConversionFacade.createRepresentations(ConversionFacade.java:265)
        at org.osm2world.console.Output.output(Output.java:104)
        at org.osm2world.console.OSM2World.executeArgumentsGroup(OSM2World.java:210)
        at org.osm2world.console.OSM2World.main(OSM2World.java:144)

I'm using OpenJDK 16:

kea@TUF-F15:~/osm2world$ java --version
openjdk 16.0.1 2021-04-20
OpenJDK Runtime Environment (build 16.0.1+9-Ubuntu-120.04)
OpenJDK 64-Bit Server VM (build 16.0.1+9-Ubuntu-120.04, mixed mode, sharing)

Cannot attach problematic map2.osm file but it is exported with default parameters from https://www.openstreetmap.org/export with this bounding box:

<bounds minlat="41.8729000" minlon="12.4478000" maxlat="41.8926000" maxlon="12.4745000"/>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants