ChHarding / TouchTerrain_jupyter_docker

Image for running Touchterrain standalone via a jupyter notebook
19 stars 4 forks source link

Objects not square #9

Open ultrasouls opened 1 year ago

ultrasouls commented 1 year ago

I'm having another weird problem. My objects are a little 'unsquare' when rendering now. I assumed that it was just a rounding error of sorts in the rectangle I selected, but I tried a few times and still got models that were slightly off. Please see picture provided.

I was using the rectangle tool to select the area (as I usually do).

It's not a huge deal since I can just go square them up in a CAD, but figured you would want to know.

image

ChHarding commented 1 year ago

That happens when the box is slightly rotated, basically the top and bottom sides are not perfectly East-West aligned. The little steps are basically stair step patterns (as we still dealing with essential pixels each represented by 2 triangles) but I’ve added some code a while ago that by default chops off one of the triangles.). Did you do this by digitizing a rectangle in Geemap? [cid:9FAB75EB-C856-4CB1-8F8F-5B0D1A8DD55B]

This is related to the way Geemap defines the box. I used it here but also printed out the coordinates, As you can see there’s a pattern of the same exact lat and long numbers repeating. Can you do something similar for your area? Just add args[“polygon”] as the last line and copy paste what it prints out.

On Feb 1, 2023, at 15:31, ultrasouls @.**@.>> wrote:

I'm having another weird problem. My objects are a little 'unsquare' when rendering now. I assumed that it was just a rounding error of sorts in the rectangle I selected, but I tried a few times and still got models that were slightly off. Please see picture provided.

It's not a huge deal since I can just go square them up in a CAD, but figured you would want to know.

[image]https://user-images.githubusercontent.com/79469833/216167891-b4a44bc4-fa34-4769-8d91-d308f66854d9.png

— Reply to this email directly, view it on GitHubhttps://github.com/ChHarding/TouchTerrain_jupyter_docker/issues/9, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEYDF5LHC3OT5NHSBJKVHADWVLI3HANCNFSM6AAAAAAUOHUVQ4. You are receiving this because you are subscribed to this thread.Message ID: @.***>

Chris Harding Associate Professor Department of Geological & Atmospheric Sciences Touchterrain.geol.iastate.eduhttp://Touchterrain.geol.iastate.edu

ultrasouls commented 1 year ago

Perhaps some of your last reply got cut off. When you said "I used it here but also printed out the coordinates"...

Yes, I was using a rectangle in geemaps.

As far as "Just add args["polygon"] , where do you want me to add it?

BTW, the next block of code after displaying the geemap is:

make and store a GeoJSON polygon from (last) digitized outline

polyft = Map.draw_last_feature # get last outline args["polygon"] = Polygon(polyft.getInfo()['geometry']['coordinates'])

ChHarding commented 1 year ago

Put this line

print(args["polygon”])

After this line:

args["polygon"] = Polygon(polyft.getInfo()['geometry']['coordinates’])

And send me what that prints out

On Feb 1, 2023, at 18:48, ultrasouls @.**@.>> wrote:

Perhaps some of your last reply got cut off. When you said "I used it here but also printed out the coordinates"...

Yes, I was using a rectangle in geemaps.

As far as "Just add args["polygon"] , where do you want me to add it?

BTW, the next block of code after displaying the geemap is:

make and store a GeoJSON polygon from (last) digitized outline

polyft = Map.draw_last_feature # get last outline args["polygon"] = Polygon(polyft.getInfo()['geometry']['coordinates'])

— Reply to this email directly, view it on GitHubhttps://github.com/ChHarding/TouchTerrain_jupyter_docker/issues/9#issuecomment-1412985929, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEYDF5LHWEJJ4SPBMZ2NFOTWVL76XANCNFSM6AAAAAAUOHUVQ4. You are receiving this because you commented.Message ID: @.***>

Chris Harding Associate Professor Department of Geological & Atmospheric Sciences Touchterrain.geol.iastate.eduhttp://Touchterrain.geol.iastate.edu

ChHarding commented 1 year ago

I’m still waiting on the info about this. I have a hunch what it could be related to.

On Feb 2, 2023, at 12:30, Harding, Chris [GE AT] @.**@.>> wrote:

Put this line

print(args["polygon”])

After this line:

args["polygon"] = Polygon(polyft.getInfo()['geometry']['coordinates’])

And send me what that prints out

On Feb 1, 2023, at 18:48, ultrasouls @.**@.>> wrote:

Perhaps some of your last reply got cut off. When you said "I used it here but also printed out the coordinates"...

Yes, I was using a rectangle in geemaps.

As far as "Just add args["polygon"] , where do you want me to add it?

BTW, the next block of code after displaying the geemap is:

make and store a GeoJSON polygon from (last) digitized outline

polyft = Map.draw_last_feature # get last outline args["polygon"] = Polygon(polyft.getInfo()['geometry']['coordinates'])

— Reply to this email directly, view it on GitHubhttps://github.com/ChHarding/TouchTerrain_jupyter_docker/issues/9#issuecomment-1412985929, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEYDF5LHWEJJ4SPBMZ2NFOTWVL76XANCNFSM6AAAAAAUOHUVQ4. You are receiving this because you commented.Message ID: @.***>

ultrasouls commented 1 year ago

I'm so sorry I stalled out on this. I'll look at it today.

ultrasouls commented 1 year ago

Here ya go.

Cell In[22], line 4 print(args["polygon”]) ^ SyntaxError: unterminated string literal (detected at line 4)

ChHarding commented 1 year ago

Sorry, I’m not explaining this well enough:

make and store a GeoJSON polygon from (last) digitized outline

polyft = Map.draw_last_feature # get last outline args["polygon"] = Polygon(polyft.getInfo()['geometry']['coordinates']) print("Got it!") print(args["polygon"])

Got it! {"coordinates": [[[-119.492798, 48.361724], [-119.00528, 48.361724], [-119.00528, 48.463275], [-119.492798, 48.463275], [-119.492798, 48.361724]]], "type": "Polygon"} I need to verify what the lat/lon coordinates for you box are.

Cheers

Chris

On Feb 13, 2023, at 09:12, ultrasouls @.**@.>> wrote:

Here ya go.

Cell In[22], line 4 print(args["polygon”]) ^ SyntaxError: unterminated string literal (detected at line 4)

— Reply to this email directly, view it on GitHubhttps://github.com/ChHarding/TouchTerrain_jupyter_docker/issues/9#issuecomment-1428109869, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEYDF5M3VIBISRB5DOP3VW3WXJFNRANCNFSM6AAAAAAUOHUVQ4. You are receiving this because you commented.Message ID: @.***>

Chris Harding Associate Professor Department of Geological & Atmospheric Sciences Touchterrain.geol.iastate.eduhttp://Touchterrain.geol.iastate.edu

ultrasouls commented 1 year ago

Here ya go! Note that I had deleted and downloaded the new container in Docker, so this isn't the same exact model I had done before (because I had to redraw it in geemaps). That said, it looks like it still had one of the sides that isn't perfectly square.

make and store a GeoJSON polygon from (last) digitized outline

polyft = Map.draw_last_feature # get last outline args["polygon"] = Polygon(polyft.getInfo()['geometry']['coordinates']) print("Got it!") print(args["polygon"])

Got it! {"coordinates": [[[-99.22591, 29.602426], [-99.151743, 29.602426], [-99.151743, 29.66032], [-99.22591, 29.66032], [-99.22591, 29.602426]]], "type": "Polygon"}

ChHarding commented 1 year ago

Thanks! Can confirm the problem :)

On Feb 13, 2023, at 13:02, ultrasouls @.**@.>> wrote:

Here ya go! Note that I had deleted and downloaded the new container in Docker, so this isn't the same exact model I had done before (because I had to redraw it in geemaps). That said, it looks like it still had one of the sides that isn't perfectly square.

make and store a GeoJSON polygon from (last) digitized outline

polyft = Map.draw_last_feature # get last outline args["polygon"] = Polygon(polyft.getInfo()['geometry']['coordinates']) print("Got it!") print(args["polygon"])

Got it! {"coordinates": [[[-99.22591, 29.602426], [-99.151743, 29.602426], [-99.151743, 29.66032], [-99.22591, 29.66032], [-99.22591, 29.602426]]], "type": "Polygon"}

— Reply to this email directly, view it on GitHubhttps://github.com/ChHarding/TouchTerrain_jupyter_docker/issues/9#issuecomment-1428492281, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEYDF5M7LSN255EBEJPT3V3WXKAK3ANCNFSM6AAAAAAUOHUVQ4. You are receiving this because you commented.Message ID: @.***>

Chris Harding Associate Professor Department of Geological & Atmospheric Sciences Touchterrain.geol.iastate.eduhttp://Touchterrain.geol.iastate.edu

ChHarding commented 1 year ago

Hi!

I (hopefully) fixed that bug. I had to make some assumptions regarding the order in which geemap stores its points and apparently that changed recently. Give it a try.

Cheers

Chris

On Feb 13, 2023, at 14:04, Harding, Chris [GE AT] @.**@.>> wrote:

Thanks! Can confirm the problem :)

On Feb 13, 2023, at 13:02, ultrasouls @.**@.>> wrote:

Here ya go! Note that I had deleted and downloaded the new container in Docker, so this isn't the same exact model I had done before (because I had to redraw it in geemaps). That said, it looks like it still had one of the sides that isn't perfectly square.

make and store a GeoJSON polygon from (last) digitized outline

polyft = Map.draw_last_feature # get last outline args["polygon"] = Polygon(polyft.getInfo()['geometry']['coordinates']) print("Got it!") print(args["polygon"])

Got it! {"coordinates": [[[-99.22591, 29.602426], [-99.151743, 29.602426], [-99.151743, 29.66032], [-99.22591, 29.66032], [-99.22591, 29.602426]]], "type": "Polygon"}

— Reply to this email directly, view it on GitHubhttps://github.com/ChHarding/TouchTerrain_jupyter_docker/issues/9#issuecomment-1428492281, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEYDF5M7LSN255EBEJPT3V3WXKAK3ANCNFSM6AAAAAAUOHUVQ4. You are receiving this because you commented.Message ID: @.***>

Chris Harding Associate Professor Department of Geological & Atmospheric Sciences Touchterrain.geol.iastate.eduhttp://touchterrain.geol.iastate.edu/

Chris Harding Associate Professor Department of Geological & Atmospheric Sciences Touchterrain.geol.iastate.eduhttp://Touchterrain.geol.iastate.edu

ultrasouls commented 1 year ago

Awesome. Thanks so much Chris I'll give it a whirl.

ultrasouls commented 1 year ago

Looks like it's working well now. Thanks so much!