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
[Bug] r.proj from EPSG:3031 to EPSG:4326 returns one grid cell #3655
Comments
I tried but could not reproduce this. See below. I did not use the dataset you mention because I did not manage to create a user login at Earthdata that is necessary for downloading. So instead I used old data I already had, using the same projections. It is of course not an exact attempt. Also, my locations were created many years ago and perhaps if we are dealing with problems in how projection systems are defined and managed that could be a problem. Can you reproject the grid using just GDAL (
Input data: Polar Stereographic, 1 km cell size
Output project: LatLong 4326
Reprojection:
|
I downloaded the dataset, followed the exact same steps described, and I can reproduce the behavior you observe @mankoff. System info:
|
Yes. With |
Same issue when using GRASS 7.8.8 from I've reproduced this without BedMachine. I apologize for the non-minimal example before. I include an MWE below and I will edit the original post with this simplified code. Set up 4326 mapset grass --text -c EPSG:4326 ./G_4326
g.region res=1 -pa w=-180 e=180 s=-90 n=90 -pas # 1° x 1°
exit 3031 mapset grass -c EPSG:3031 ./G_3031
# 500 m resolution, matching BedMachine boundaries
bound=3333250
g.region res=500 w=-${bound} e=${bound} s=-${bound} n=${bound} -ps
r.mapcalc "foo = 42"
exit Reproject grass ./G_4326/PERMANENT
r.proj location=./G_3031 mapset=PERMANENT input=foo # output: 1 column! |
I note this is sensitive. If I change |
I have downloaded the BedMachine dataset and could reproduce the error. EDIT: |
I may have found a solution to this. It involves using the -n option: From the r.proj manual (https://grass.osgeo.org/grass84/manuals/r.proj.html):
I tried and worked for me using the 500 m region as source and a LonLat region as target:
|
Describe the bug
I'm trying to reproject an Antarctic dataset on EPSG:3031 to EPSG:4326. I can successfully do Greenland EPSG:3413 to EPSG:4326, but the same commands for Antarctica return 1 grid cell and report
To Reproduce
Set up 4326 mapset
3031 mapset
Reproject
grass ./G_4326/PERMANENT r.proj location=./G_3031 mapset=PERMANENT input=foo # output: 1 column!
Expected behavior
The input dataset spans all longitudes and covers Antarctica. I'd expect the output dataset to do this, reprojected into EPSG:4326.
Screenshots
Screenshots come from earlier (see first version of this issue under the
edit
item above) using BedMachine. The currentg.region
matches that from BedMachine.3031:
4326:
System description (please complete the following information):
version=8.3.2
date=2024
revision=exported
build_date=2024-03-08
build_platform=x86_64-pc-linux-gnu
build_off_t_size=8
libgis_revision=8.3.2
libgis_date=2024-03-08T09:26:59+00:00
proj=9.3.1
gdal=3.8.4
geos=3.12.1
sqlite=3.37.2
The text was updated successfully, but these errors were encountered: