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

Confusing results using search_tiles_in_roi and get_tile_bbox_proj #27

Open
danielFlemstrom opened this issue Sep 1, 2022 · 1 comment

Comments

@danielFlemstrom
Copy link

When searching tiles, it seems like we need to swap x and y to get the correct tile (We get AF instead of EU otherwise).
Further, when searching, we can specify CRS while the bbox for tiles is given in ?? metres??? or something ?

Is this a bug or should I use some other function to get the tile bbox in e.g EPSG:3006 ?

Output from the experiment with and without swapped x-y for EPSG3006 and EPSG4326:

 ??       left    lower     right   upper
             west,   south,    east,   north
            13.31,   59.09    14.11,   59.44
           403050, 6551299   449522  6589385
 -------  Non Swapped ---------------------
['AF300M_E096N066T6']
EPSG: 4326
ODC [[13.31, 59.09], [14.11, 59.44]]
EQ7 (9600000.0, 6600000.0, 10200000.0, 7200000.0)

['AF300M_E102N054T6']
EPSG: 3006
ODC [[403050.0, 6550350.0], [449550.0, 6590250.0]]
EQ7 (10200000.0, 5400000.0, 10800000.0, 6000000.0)

 -------   Swapped ---------------------
['EU300M_E048N024T6']
EPSG: 4326
ODC [[59.09, 13.31], [59.44, 14.11]]
EQ7 (4800000.0, 2400000.0, 5400000.0, 3000000.0)

['EU300M_E048N024T6']
EPSG: 3006
ODC [[6550350, 403050], [6590250, 449550]]
EQ7 (4800000.0, 2400000.0, 5400000.0, 3000000.0)
@bbauerma
Copy link
Collaborator

bbauerma commented Sep 8, 2022

I'm not completely sure, if I got your problem right. But I'll have a try (let me know otherwise):

I assume you want to work over southern Sweden. So ['EU300M_E048N024T6'] is the correct output.

e7g = Equi7Grid(300)
e7g.search_tiles_in_roi(bbox=[(13.31, 59.09), (14.11, 59.44)])
['EU300M_E048N024T6']

As this is covered by the CI's test_search_tiles_lon_lat_extent(), I'm curious:
a) which plattform are you working on?
b) have you followed the installation in README.rst?
c) can you run the test, e.g. via python setup.py test ?

Last year, there was one issue with GDAL2 vs GDAL3, when the order of axis has changed. I assume this issue is connected.

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