chadrockey / TGC-Designer-Tools

Tools to support course creation and Lidar/Terrain Creation in The Golf Club 2019.
Apache License 2.0
44 stars 27 forks source link

Multipolygon sand traps unsupported #95

Closed mocinigolf closed 2 years ago

mocinigolf commented 2 years ago

I am working on designing a course that has mounds within the bunker area on some holes and the OSM police told me to make them into multipolygon shapes. However, when I import the features with this tool, the sand traps or any other multipolygonal area is not recognized and therefore not imported.

Is there something I'm missing or is this a current shortcoming of this tool? Any help would be greatly appreciated. Thank you!

zekefarwell commented 2 years ago

If this tool can't process commonly used multipolygon geometry from OSM that's a problem. This explains why I often come across golf course features that should be multipolygons instead mapped as a single contorted polygon. Please fix this so users of this tool aren't incentivised to enter low quality data into OSM.

chadrockey commented 2 years ago

@mocinigolf TGC can’t handle anything inside a bunker (maybe a bush/3d plant). There’s a ranking to how it prioritizes surfaces. Sand > Green > Fairway > Rough. You can’t put a lower item into the middle of a higher one.

green inside of fairway? Perfect. Sand inside of rough? No problem. Sand inside of green? Yes that too.

rough inside of bunker? No. Fairway inside of green? No

There’s no way to do what you want with the import because TGC splines don’t support this. You’ll have to use the old style brush tools to paint the bunkers and mounds in. I recommend setting the outside of the bunker spline to fairway or rough to help you paint, then deleting it.

chadrockey commented 2 years ago

@zekefarwell that sounds like a great idea! Would be really cool to see. I’m looking forward to a pull request.

zekefarwell commented 2 years ago

If I had any interest in golf simulators I might be motivated to work on a PR. However, I do not. I'm an OpenStreetMap contributor that has become aware of TGC-Designer-Tools only because I've spent time (along with many others) cleaning up bad data entered into OSM by users of this tool.

Mashin6 commented 2 years ago

I have feeling that this would be a relatively easy fix for the multipolygon support. Just take all the tags from multipolygon object and apply/copy them to all outer polygons. Then delete all inner polygons. That should pretty much simulate the current behavior.

@chadrockey I think as an author of the code you have a moral obligation to fix it or bring it to the state where it doesn't cause damage elsewhere. It is unethical to make public a broken code and publish misleading online tutorials that send hoards of people towards non-profit community project where they cause serious damage and then just pull your hands off and ask others fix it for you.