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

Cant upload a local image as a layer #18

Closed
TarekElDick opened this issue Oct 4, 2023 · 10 comments
Closed

Cant upload a local image as a layer #18

TarekElDick opened this issue Oct 4, 2023 · 10 comments

Comments

@TarekElDick
Copy link

TarekElDick commented Oct 4, 2023

Can't upload a local image as a layer using both the bounds and rotation and/or the corners.

Instead the image appears as the entire map.

@TarekElDick
Copy link
Author

I'm trying to overlay an aerial image above my property to increase quality of the labeling.

@TarekElDick
Copy link
Author

image

@rbrundritt
Copy link
Member

I'm not able to reproduce this. Ensure that when passing in bounding box information the coordinates are in the format of "west,south,east,west". Also ensure the decimal place of the numbers is a period and not a comma (some language settings use commas) as this will likely result and very large numbers that cover the whole globe.

@TarekElDick
Copy link
Author

I'm not able to reproduce this. Ensure that when passing in bounding box information the coordinates are in the format of "west,south,east,west". Also ensure the decimal place of the numbers is a period and not a comma (some language settings use commas) as this will likely result and very large numbers that cover the whole globe.

For the load local image as a layer using corners. I input something like this
image

Which still breaks the map
image

Based on the format you provided they should be in Based on the coordinates provided, the format you're asking for is "west, south, east, north." Using this format I get.

West: -73.486264
South: 45.460890
East: -73.484160
North: 45.461978

Therefore, the combined format is:
-73.486264, 45.460890, -73.484160, 45.461978

So using that we can get.
image

Which doesn't work
image

@rbrundritt
Copy link
Member

It looks like when using corners you have latitude/longitude reversed. In GIS the common standard is "longitude, latitude" as longitude is often associated with X in the terms of (x,y).

I tried the bounding box coordinates you provided and they correctly showed that layer on the map. Note that the Azure Maps Aerial imagery always renders behind other layers. The primary reason for this is that includes vector labels that power the accessibility (screen reader describes the map as it moves). Note that your bounding box is really small (size of a residential property), so you need to zoom in more to see it. In my test, I was barely able to see the image at this bounding box when zoomed out as much as your last image.

@TarekElDick
Copy link
Author

Apologies I forgot to mention my mistake earlier. I appreciate the time you have taken to debug my issue. I would like to share my entire workflow to portray my problem and frustration in making an image show up as a layer over the satellite imagery.

  1. First off the location of the image.
    LON, LAT : -73.48521244444444, 45.46143425
    LAT, LON: 45.46143425, -73.48521244444444

screenshot

  1. Default Annotation Task Initial View
    Default Annotation Task Initial

Bounds : −73.488767, 45.460392, −73.481074, 45.462793
Corners:
Top left: -73.488684, 45.462793
Top Right: -73.481309, 45.462748
Bottom Left: -73.488767, 45.460807
Bottom Right: -73.481074, 45.460392

The image is saved locally on my machine, with a filename and type of : screenshot.png. Original image was of type JPEG but I saved a screenshot of it to see if PNG would work for me.

  1. Attempt to upload image using corners

image

  1. Result, the entire map is my image lol.

image

  1. Attempt to upload image using bounds and rotation.
    image

  2. Result , nothing shows up

image

Again I thank you again and I hope you may help me in my task and find my mistake.

Do I need to host the image on a server before being able to upload it ?
Do I need to use different filenames and/or image types ?

Can I see how it looks like when you attempt to recreate my behavior ?

@rbrundritt
Copy link
Member

Well, this was a frustrating one to debug as it worked fine for me yesterday but had the issue today when I used the information you provided in your last post. The culprit... is that you are using a dash instead of hyphen as a negative sign, and the browsers parseFloat doesn't recognize it as a negative sign, and thus returned NaN, and this tool is failing over to a global bounding box as a result. I'll add some code to handle this odd scenario.

@TarekElDick
Copy link
Author

OMG thank you so much when using bounds and rotation it works now but for corners it still seems to be finicky for me even after using the correct (-) keyboard input.

@rbrundritt
Copy link
Member

Ok, think I got it this time. I overlooked a past pull request and missed a mistake that was checked in. Crazy enough the code still worked in some cases, but not in other. Should be corrected now.

@TarekElDick
Copy link
Author

Can confirm it is working now, thanks !

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

2 participants