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

Tool won't process lidar #107

Closed MyronBedford closed 1 year ago

MyronBedford commented 1 year ago

I have selected the course directory and imported the course but when I'm processing lidar it runs for 10 seconds then comes up with this error,

Exception in Tkinter callback Traceback (most recent call last): File "tkinter__init.py", line 1705, in call__ File "tgc_gui.py", line 521, in runLidar File "lidar_map_api.py", line 345, in generate_lidar_previews cv2.error: OpenCV(4.0.0) C:\projects\opencv-python\opencv\modules\imgproc\src\color.cpp:181: error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor'

pobee10 commented 1 year ago

Having same issue - cant process any Lidar - any ideas?

MyronBedford commented 1 year ago

The weird part is that it worked literally the day before. I have made multiple attempts but have messed up at other places so I've had to restart but suddenly it just stopped processing

pobee10 commented 1 year ago

I am at a loss - the error is referencing back to the python code

chadrockey commented 1 year ago

There’s an issue with Mapquest potentially when trying to get the satellite data, so you know your EPSG is correct. If it’s not fixed by the end of this week, I may release a new version to handle Mapquest being down. Let’s hang tight.

pobee10 commented 1 year ago

You're the man. open.mapquestapi.com seems unresponsive so hopefully a server side error

MyronBedford commented 1 year ago

Does that mean that I have to install a new version of the tool or will it update the old one?

upsdsp commented 1 year ago

Any update? Still getting the same error. Thanks for your time.

chadrockey commented 1 year ago

MapQuest API appears to be very much broken: https://twitter.com/mysterywisc/status/1587519231188410370?s=20&t=eBNwyb8APj1r-GEY6yQG-w

https://twitter.com/LrakWortep/status/1587458337691832320?s=20&t=eBNwyb8APj1r-GEY6yQG-w

https://twitter.com/nopanen/status/1588214935967834115?s=20&t=eBNwyb8APj1r-GEY6yQG-w

I'll think about what to do, but without the MapQuest feature EPSG verification is extremely difficult.

upsdsp commented 1 year ago

Bummer. Wish I knew more to offer help.

pobee10 commented 1 year ago

Is Mapquest the only service that can accomplish? Googles API won’t work or bing?

On Fri, Nov 4, 2022 at 4:32 PM upsdsp @.***> wrote:

Bummer. Wish I knew more to offer help.

— Reply to this email directly, view it on GitHub https://github.com/chadrockey/TGC-Designer-Tools/issues/107#issuecomment-1304194523, or unsubscribe https://github.com/notifications/unsubscribe-auth/A36AHZLDXHAAMX5UDJBDABTWGVXE7ANCNFSM6AAAAAARTRTABI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

pobee10 commented 1 year ago

Chad - totally willing to compensate/donate to get this back up and running if possible. Such a great tool. Wondering if google could replace based on the below?

https://developers.google.com/maps/documentation/geocoding/overview

On Fri, Nov 4, 2022 at 7:05 PM Patrick oberlies @.***> wrote:

Is Mapquest the only service that can accomplish? Googles API won’t work or bing?

On Fri, Nov 4, 2022 at 4:32 PM upsdsp @.***> wrote:

Bummer. Wish I knew more to offer help.

— Reply to this email directly, view it on GitHub https://github.com/chadrockey/TGC-Designer-Tools/issues/107#issuecomment-1304194523, or unsubscribe https://github.com/notifications/unsubscribe-auth/A36AHZLDXHAAMX5UDJBDABTWGVXE7ANCNFSM6AAAAAARTRTABI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

Hiblet commented 1 year ago

I would chuck into a donation pot too. I have made about 40 courses for PGA2k21 with this awesome tool, and I am now completely poked. Thanks Chad!

Hiblet commented 1 year ago

Update: I got an image back on the left showing Lidar, but nothing on the right, ie no mapquest image. I got an error in the front end (ie not DOS box, but the GUI) saying "Could not get sat preview: HTTP Error 403: Forbidden". This unblocks me though, because I am pulling my EPSG from the LAZ itself, ie I can trust it, so I can select area and continue. WOO!

MyronBedford commented 1 year ago

I'm making a lidar for TGC 2019 and I'm coming up with the same error, I'll see if it works though.

pobee10 commented 1 year ago

If you know you have the right EPSG, if you draw the box around the left side LiDar - will it still process?

On Tue, Nov 8, 2022 at 11:53 AM MyronBedford @.***> wrote:

I'm making a lidar for TGC 2019 and I'm coming up with the same error, I'll see if it works though.

— Reply to this email directly, view it on GitHub https://github.com/chadrockey/TGC-Designer-Tools/issues/107#issuecomment-1307524329, or unsubscribe https://github.com/notifications/unsubscribe-auth/A36AHZPQIZBNOXTZZYGUGQDWHKAQDANCNFSM6AAAAAARTRTABI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

Hiblet commented 1 year ago

Yes, I have done a run. Once you have selected an area of data in the Accept screen, business as usual.

MyronBedford commented 1 year ago

Yes it will process lidar. I'm having a problem where when it loads the course preview it doesn't show any holes. just the trees.

pobee10 commented 1 year ago

That may be due to busy servers at OSM. Have to run the tool in evenings (eastern time) or weekends

On Tue, Nov 8, 2022 at 4:06 PM MyronBedford @.***> wrote:

Yes it will process lidar. I'm having a problem where when it loads the course preview it doesn't show any holes. just the trees.

— Reply to this email directly, view it on GitHub https://github.com/chadrockey/TGC-Designer-Tools/issues/107#issuecomment-1307824750, or unsubscribe https://github.com/notifications/unsubscribe-auth/A36AHZMNXO642IFXYMBJON3WHK6EJANCNFSM6AAAAAARTRTABI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

MyronBedford commented 1 year ago

It exported but the elevation is way out of whack. there is a big hole that covers half the course and cliffs everywhere even though I didn't edit the mask at all.

pobee10 commented 1 year ago

I actually just did one from scratch and it worked with elevation looking good. It was from Lidar in which the EPSG was in the file and no override was needed in the tool.

On Tue, Nov 8, 2022 at 7:08 PM MyronBedford @.***> wrote:

It exported but the elevation is way out of whack. there is a big hole that covers half the course and cliffs everywhere even though I didn't edit the mask at all.

— Reply to this email directly, view it on GitHub https://github.com/chadrockey/TGC-Designer-Tools/issues/107#issuecomment-1308006061, or unsubscribe https://github.com/notifications/unsubscribe-auth/A36AHZM6FLXFZX62BEYBIHTWHLTQBANCNFSM6AAAAAARTRTABI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

chadrockey commented 1 year ago

@MyronBedford EPSG is likely wrong. The reason this was such an important feature was to confirm that the EPSG is using the right units and course is in the right place. OSM not showing up because the EPSG is wrong.

I’m still looking into solutions, but instead of returning garbage data, they return 403 finally, a real error code.

MyronBedford commented 1 year ago

The thing is though is that when I receive the screen to select the area for my course there's this black square exactly where the elevation started going crazy. I have seen this even at my first attempt before mapquest shut down.

MyronBedford commented 1 year ago

And part of the course is just fine and has the proper elevation.

chadrockey commented 1 year ago

@MyronBedford Can you open a new issue where you list the files used by your course? It seems as if there may be mixed files from different years or sources/a missing one.

goffst commented 1 year ago

Hello, I'm trying to do my first course and I'm not very successful yet. Should I wait until this issue is resolved?

Not sure I've even got the right epsg. I think it is 2236 for East Florida.

Thanks

goffst commented 1 year ago

I tried using the epsg with the 403 error from mapquest. It makes all the files and I exported the course file. Once I load up the TGC simulator and edit the course, I can see the course, all the holes, greens and sandtraps. However, I cannot play any holes. It looks like the terrain loaded but it doesn't have any holes. Any suggestions?

goffst commented 1 year ago

I finally got it to work. I wasn't tagging the hole correctly.

The only thing that doesn't show up is the water around the holes

Hiblet commented 1 year ago

@goffst Check your OSM tag for the water feature. Only "golf" tags are pulled, so you would need golf:lateral_water_hazard set on the feature. I have seen some lakes with inner/outer lines, and these don't come in.

Don't stress it too much, if the water does not come in you can still use the height of the land to figure out how the water sits. Make a large water pane, lower it till it just breaches the land where you expect it to be, and it should be close the right shape.

goffst commented 1 year ago

thanks for your help. Got the water hazards. Is there any reason why I only have red tees? I made all the tees and the tags seem right.

MyronBedford commented 1 year ago

I'm pretty sure that when you make a course in TGC 2019 you only get given one set of teeboxes. Just go into the teebox you have and click add teebox and you'll get another set of teeboxes. From there just move them to where the teebox should be.

chadrockey commented 1 year ago

Fix with released mapquest version released: https://github.com/chadrockey/TGC-Designer-Tools/releases/tag/v0.3.3