-
Notifications
You must be signed in to change notification settings - Fork 4
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
Objects not square #9
Comments
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 GitHub<#9>, or unsubscribe<https://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.edu<http://Touchterrain.geol.iastate.edu>
|
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 outlinepolyft = Map.draw_last_feature # get last outline |
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 GitHub<#9 (comment)>, or unsubscribe<https://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.edu<http://Touchterrain.geol.iastate.edu>
|
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 GitHub<#9 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AEYDF5LHWEJJ4SPBMZ2NFOTWVL76XANCNFSM6AAAAAAUOHUVQ4>.
You are receiving this because you commented.Message ID: ***@***.***>
|
I'm so sorry I stalled out on this. I'll look at it today. |
Here ya go. Cell In[22], line 4 |
Sorry, I’m not explaining this well enough:
- create your box
- In the cell below add this line at the end: print(args["polygon”])
- the full cell code should now be;
# 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"])
- run that cell and send me what it outputs, sth like this:
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 GitHub<#9 (comment)>, or unsubscribe<https://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.edu<http://Touchterrain.geol.iastate.edu>
|
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 outlinepolyft = Map.draw_last_feature # get last outline Got it! |
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 GitHub<#9 (comment)>, or unsubscribe<https://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.edu<http://Touchterrain.geol.iastate.edu>
|
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 GitHub<#9 (comment)>, or unsubscribe<https://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.edu<http://touchterrain.geol.iastate.edu/>
Chris Harding
Associate Professor
Department of Geological & Atmospheric Sciences
Touchterrain.geol.iastate.edu<http://Touchterrain.geol.iastate.edu>
|
Awesome. Thanks so much Chris I'll give it a whirl. |
Looks like it's working well now. Thanks so much! |
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.
The text was updated successfully, but these errors were encountered: