Re: [GRASS-user] Polar projection
Dear Ken, I am afraid I do have the same problem, - the command does not make a grid to the pole. Should have tested before responding, sorry. So I think you should proceed with a bug report, Jon On 1 Jan 2021, at 17:12, Ken Mankoff wrote: Hi Jón, I work regularly in EPSG:3413, but the same issue applies. "d.grid -g 1:0" doesn't make a grid to the pole. Does it for you? I'd like to submit a bug report as per the suggestion from Markus, but am not sure what the bug is if this command works for you when the pole is included in the view. -k. On 2020-12-31 at 09:23 -08, Jón Eiríksson wrote... This has worked for me: (Thu Dec 31 17:22:11 2020) g.proj -p -PROJ_INFO- name : Stereographic proj : stere datum : wgs84 ellps : wgs84 lat_0 : 90 lat_ts : 70 lon_0 : -45 k : 1 x_0: 0 y_0: 0 no_defs: defined towgs84: 0.000,0.000,0.000 -PROJ_EPSG- epsg : 3413 -PROJ_UNITS unit : meter units : meters meters : 1 (Thu Dec 31 17:22:11 2020) Command finished (0 sec) Jon On 31 Dec 2020, at 16:26, Markus Neteler wrote: Hi Ken, On Thu, Dec 31, 2020 at 3:06 AM Ken Mankoff wrote: Dear GRASS List, Can someone suggest what setup to use (EPSG code? proj4 code?) to have the projection centered on the N. pole? I'm looking to create a graphic similar to this image in the Raster Gallery: https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgrass.osgeo.org%2F%2Fimages%2Fgallery%2Fraster%2Fday_on_earth_N.pngdata=04%7C01%7Cjeir%40hi.is%7Cbab065ba5fa94867219a08d8ae786727%7C09fa5f0e211846568529677ed8fdbe78%7C0%7C0%7C637451179441104707%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=zcVbgCptTcrREvuVucAfEWdb%2BPH2Qsl6DktIkru94jE%3Dreserved=0 If I set up a polar projection based on https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fspatialreference.org%2Fref%2Fsr-org%2F8243%2Fdata=04%7C01%7Cjeir%40hi.is%7Cbab065ba5fa94867219a08d8ae786727%7C09fa5f0e211846568529677ed8fdbe78%7C0%7C0%7C637451179441104707%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=QrsQH1MA6ehd%2BcPpLwwQ6190ki6shHnr7UptJsF50EU%3Dreserved=0 using: grass -c ./G g.proj -c proj4="+proj=stere +lat_0=90 +lat_ts=45 +lon_0=-170 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs" Things mostly work, but d.grid -g 1:0 color=red does not show latitude lines on most of the graphic (see attached). I managed to generate it with Preparation of a 10 degree grid: # EPSG:4326 GRASS :~ > g.region -dp projection: 3 (Latitude-Longitude) zone: 0 datum: wgs84 ellipsoid: wgs84 north: 90N south: 90S west: 180W east: 180E nsres: 1 ewres: 1 rows: 180 cols: 360 cells: 64800 GRASS :~ > v.mkgrid grid=36,18 map=grid_10deg # download "Natural Earth I with Shaded Relief, Water, and Drainages" from https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.naturalearthdata.com%2Fdownloads%2F10m-raster-data%2F10m-natural-earth-1%2Fdata=04%7C01%7Cjeir%40hi.is%7Cbab065ba5fa94867219a08d8ae786727%7C09fa5f0e211846568529677ed8fdbe78%7C0%7C0%7C637451179441104707%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=BmlSMFy8mUpdUQxbZw10dM7Rzzq4Vztpc33Ha8dx75M%3Dreserved=0 GRASS :~ > r.import in=NE1_HR_LC_SR_W_DR.tif output=natural_earth_global_landcover GRASS :~ > g.region raster=natural_earth_global_landcover.1 GRASS :~ > r.composite r=natural_earth_global_landcover.1 g=natural_earth_global_landcover.2 b=natural_earth_global_landcover.3 out=natural_earth_global_landcover.rgb GRASS :~ > exit # WGS 84 / Arctic Polar Stereographic https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fepsg.io%2F3995data=04%7C01%7Cjeir%40hi.is%7Cbab065ba5fa94867219a08d8ae786727%7C09fa5f0e211846568529677ed8fdbe78%7C0%7C0%7C637451179441104707%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=67g63WlKT3zJfzmTuPxNAciU9Uq65N%2F6ypc%2FpjntWT8%3Dreserved=0 grass78 -c epsg:3995 ~/grassdata/arctic_polar_stereographic GRASS :~ > g.proj -w PROJCS["WGS 84 / Arctic Polar Stereographic", GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4326"]], PROJECTION["Polar_Stereographic"], PARAMETER["latitude_of_origin",71], PARAMETER["central_meridian",0], PARAMETER["false_easting",0], PARAMETER["false_northing",0], UNIT["metre",1,
Re: [GRASS-user] Polar projection
Hi Markus, On 2020-12-31 at 08:26 -08, Markus Neteler wrote... > On Thu, Dec 31, 2020 at 3:06 AM Ken Mankoff wrote: >> d.grid -g 1:0 color=red >> >> does not show latitude lines on most of the graphic (see attached). > > I managed to generate it with > > Preparation of a 10 degree grid [in EPSG:4326]: > v.mkgrid grid=36,18 map=grid_10deg > > [v.proj from 4326 to polar (3995 or 3413)] > > The resulting map looks as attached (hope I didn't forget to copy a > command here). Indeed, d.grid doesn't looks as expected Your command list was helpful. Yes, things work fine when importing a grid generated in EPSG:4326 to EPSG:3995. Oddly, importing to EPSG:3413 has a different issue (included in the same bug report for now). > d.grid 10 -w .. is incomplete. Worth a bug report, IMO. https://github.com/OSGeo/grass/issues/1224 Thanks, -k. ___ grass-user mailing list grass-user@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Polar projection
Hi Jón, I work regularly in EPSG:3413, but the same issue applies. "d.grid -g 1:0" doesn't make a grid to the pole. Does it for you? I'd like to submit a bug report as per the suggestion from Markus, but am not sure what the bug is if this command works for you when the pole is included in the view. -k. On 2020-12-31 at 09:23 -08, Jón Eiríksson wrote... > This has worked for me: > > (Thu Dec 31 17:22:11 2020) > g.proj -p > -PROJ_INFO- > name : Stereographic > proj : stere > datum : wgs84 > ellps : wgs84 > lat_0 : 90 > lat_ts : 70 > lon_0 : -45 > k : 1 > x_0: 0 > y_0: 0 > no_defs: defined > towgs84: 0.000,0.000,0.000 > -PROJ_EPSG- > epsg : 3413 > -PROJ_UNITS > unit : meter > units : meters > meters : 1 > (Thu Dec 31 17:22:11 2020) Command finished (0 sec) > > Jon > > > > > On 31 Dec 2020, at 16:26, Markus Neteler wrote: > >> Hi Ken, >> >> On Thu, Dec 31, 2020 at 3:06 AM Ken Mankoff wrote: >>> >>> Dear GRASS List, >>> >>> Can someone suggest what setup to use (EPSG code? proj4 code?) to >>> have the projection centered on the N. pole? I'm looking to create >>> a graphic similar to this image in the Raster Gallery: >>> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgrass.osgeo.org%2F%2Fimages%2Fgallery%2Fraster%2Fday_on_earth_N.pngdata=04%7C01%7Cjeir%40hi.is%7Cc4ce599d0faf40d3408608d8ada8dff2%7C09fa5f0e211846568529677ed8fdbe78%7C0%7C0%7C637450288118244590%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=1b0EG%2B%2ByT0LjNGOp55l%2FwYiVKSNfAeUvd%2BZS12dCWZg%3Dreserved=0 >>> >>> If I set up a polar projection based on >>> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fspatialreference.org%2Fref%2Fsr-org%2F8243%2Fdata=04%7C01%7Cjeir%40hi.is%7Cc4ce599d0faf40d3408608d8ada8dff2%7C09fa5f0e211846568529677ed8fdbe78%7C0%7C0%7C637450288118244590%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=I7u9KAIJ0geqmtTPZv1vUg3kiAtqtASajvhxzCwFmy4%3Dreserved=0 >>> >>> using: >>> >>> grass -c ./G >>> g.proj -c proj4="+proj=stere +lat_0=90 +lat_ts=45 +lon_0=-170 +k=1 >>> +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs" >>> >>> Things mostly work, but >>> >>> d.grid -g 1:0 color=red >>> >>> does not show latitude lines on most of the graphic (see attached). >> >> I managed to generate it with >> >> Preparation of a 10 degree grid: >> >> # EPSG:4326 >> GRASS :~ > g.region -dp >> projection: 3 (Latitude-Longitude) >> zone: 0 >> datum: wgs84 >> ellipsoid: wgs84 >> north: 90N >> south: 90S >> west: 180W >> east: 180E >> nsres: 1 >> ewres: 1 >> rows: 180 >> cols: 360 >> cells: 64800 >> GRASS :~ > v.mkgrid grid=36,18 map=grid_10deg >> # download "Natural Earth I with Shaded Relief, Water, and Drainages" >> from >> https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.naturalearthdata.com%2Fdownloads%2F10m-raster-data%2F10m-natural-earth-1%2Fdata=04%7C01%7Cjeir%40hi.is%7Cc4ce599d0faf40d3408608d8ada8dff2%7C09fa5f0e211846568529677ed8fdbe78%7C0%7C0%7C637450288118244590%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=at%2BPzc3vGV%2FmxVhg%2BxltDODIC52rrl%2Bd39ZTtta7uDA%3Dreserved=0 >> GRASS :~ > r.import in=NE1_HR_LC_SR_W_DR.tif >> output=natural_earth_global_landcover >> GRASS :~ > g.region raster=natural_earth_global_landcover.1 >> GRASS :~ > r.composite r=natural_earth_global_landcover.1 >> g=natural_earth_global_landcover.2 b=natural_earth_global_landcover.3 >> out=natural_earth_global_landcover.rgb >> GRASS :~ > exit >> >> # WGS 84 / Arctic Polar Stereographic >> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fepsg.io%2F3995data=04%7C01%7Cjeir%40hi.is%7Cc4ce599d0faf40d3408608d8ada8dff2%7C09fa5f0e211846568529677ed8fdbe78%7C0%7C0%7C637450288118244590%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=JwnkjczUnnrbi%2F%2BnQGepiYo4eB02S5%2BQUWSMK3rRFDs%3Dreserved=0 >> grass78 -c epsg:3995 ~/grassdata/arctic_polar_stereographic >> GRASS :~ > g.proj -w >> PROJCS["WGS 84 / Arctic Polar Stereographic", >> GEOGCS["WGS 84", >> DATUM["WGS_1984", >> SPHEROID["WGS 84",6378137,298.257223563, >> AUTHORITY["EPSG","7030"]], >> AUTHORITY["EPSG","6326"]], >> PRIMEM["Greenwich",0, >> AUTHORITY["EPSG","8901"]], >> UNIT["degree",0.0174532925199433, >> AUTHORITY["EPSG","9122"]], >> AUTHORITY["EPSG","4326"]], >> PROJECTION["Polar_Stereographic"], >> PARAMETER["latitude_of_origin",71], >> PARAMETER["central_meridian",0], >> PARAMETER["false_easting",0], >>
Re: [GRASS-user] Polar projection
This has worked for me: (Thu Dec 31 17:22:11 2020) g.proj -p -PROJ_INFO- name : Stereographic proj : stere datum : wgs84 ellps : wgs84 lat_0 : 90 lat_ts : 70 lon_0 : -45 k : 1 x_0: 0 y_0: 0 no_defs: defined towgs84: 0.000,0.000,0.000 -PROJ_EPSG- epsg : 3413 -PROJ_UNITS unit : meter units : meters meters : 1 (Thu Dec 31 17:22:11 2020) Command finished (0 sec) Jon On 31 Dec 2020, at 16:26, Markus Neteler wrote: Hi Ken, On Thu, Dec 31, 2020 at 3:06 AM Ken Mankoff wrote: Dear GRASS List, Can someone suggest what setup to use (EPSG code? proj4 code?) to have the projection centered on the N. pole? I'm looking to create a graphic similar to this image in the Raster Gallery: https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgrass.osgeo.org%2F%2Fimages%2Fgallery%2Fraster%2Fday_on_earth_N.pngdata=04%7C01%7Cjeir%40hi.is%7Cc4ce599d0faf40d3408608d8ada8dff2%7C09fa5f0e211846568529677ed8fdbe78%7C0%7C0%7C637450288118244590%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=1b0EG%2B%2ByT0LjNGOp55l%2FwYiVKSNfAeUvd%2BZS12dCWZg%3Dreserved=0 If I set up a polar projection based on https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fspatialreference.org%2Fref%2Fsr-org%2F8243%2Fdata=04%7C01%7Cjeir%40hi.is%7Cc4ce599d0faf40d3408608d8ada8dff2%7C09fa5f0e211846568529677ed8fdbe78%7C0%7C0%7C637450288118244590%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=I7u9KAIJ0geqmtTPZv1vUg3kiAtqtASajvhxzCwFmy4%3Dreserved=0 using: grass -c ./G g.proj -c proj4="+proj=stere +lat_0=90 +lat_ts=45 +lon_0=-170 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs" Things mostly work, but d.grid -g 1:0 color=red does not show latitude lines on most of the graphic (see attached). I managed to generate it with Preparation of a 10 degree grid: # EPSG:4326 GRASS :~ > g.region -dp projection: 3 (Latitude-Longitude) zone: 0 datum: wgs84 ellipsoid: wgs84 north: 90N south: 90S west: 180W east: 180E nsres: 1 ewres: 1 rows: 180 cols: 360 cells: 64800 GRASS :~ > v.mkgrid grid=36,18 map=grid_10deg # download "Natural Earth I with Shaded Relief, Water, and Drainages" from https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.naturalearthdata.com%2Fdownloads%2F10m-raster-data%2F10m-natural-earth-1%2Fdata=04%7C01%7Cjeir%40hi.is%7Cc4ce599d0faf40d3408608d8ada8dff2%7C09fa5f0e211846568529677ed8fdbe78%7C0%7C0%7C637450288118244590%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=at%2BPzc3vGV%2FmxVhg%2BxltDODIC52rrl%2Bd39ZTtta7uDA%3Dreserved=0 GRASS :~ > r.import in=NE1_HR_LC_SR_W_DR.tif output=natural_earth_global_landcover GRASS :~ > g.region raster=natural_earth_global_landcover.1 GRASS :~ > r.composite r=natural_earth_global_landcover.1 g=natural_earth_global_landcover.2 b=natural_earth_global_landcover.3 out=natural_earth_global_landcover.rgb GRASS :~ > exit # WGS 84 / Arctic Polar Stereographic https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fepsg.io%2F3995data=04%7C01%7Cjeir%40hi.is%7Cc4ce599d0faf40d3408608d8ada8dff2%7C09fa5f0e211846568529677ed8fdbe78%7C0%7C0%7C637450288118244590%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=JwnkjczUnnrbi%2F%2BnQGepiYo4eB02S5%2BQUWSMK3rRFDs%3Dreserved=0 grass78 -c epsg:3995 ~/grassdata/arctic_polar_stereographic GRASS :~ > g.proj -w PROJCS["WGS 84 / Arctic Polar Stereographic", GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4326"]], PROJECTION["Polar_Stereographic"], PARAMETER["latitude_of_origin",71], PARAMETER["central_meridian",0], PARAMETER["false_easting",0], PARAMETER["false_northing",0], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AXIS["Easting",SOUTH], AXIS["Northing",SOUTH], AUTHORITY["EPSG","3995"]] GRASS :~ > g.region n=293 s=-250 w=-425 e=431 nsres=1 ewres=1 -p GRASS :~ > v.proj location=latlong_wgs84 mapset=PERMANENT input=grid_10deg GRASS :~ > r.proj location=latlong_wgs84 mapset=PERMANENT input=natural_earth_global_landcover.rgb GRASS :~ > d.mon wx0 GRASS :~ > d.rast natural_earth_global_landcover.rgb GRASS :~ > d.vect grid_10deg type=boundary The resulting map looks as attached (hope I didn't forget to copy a command here). Indeed,
Re: [GRASS-user] polar projection with grid lines
Le Sun, 28 May 2017 08:29:48 -0400, Ken Mankoffa écrit : > Hi List, > > I'm trying to set up a polar projection and draw some grid lines. I'm > having trouble a) getting the grid lines to the pole and b) rotating > it so a different longitude is the center longitude. I'm using the > following code: > > grass72 -e -c epsg:3413 ./tmp > grass72 ./tmp/PERMANENT > > xy0=$(m.proj -i coordinates=0,40) # set corners to 40° N > xy1=$(m.proj -i coordinates=180,40) > x0=$(echo ${xy0} | cut -d"|" -f1) > y0=$(echo ${xy0} | cut -d"|" -f2) > x1=$(echo ${xy1} | cut -d"|" -f1) > y1=$(echo ${xy1} | cut -d"|" -f2) > > g.region s=${y0} n=${y1} w=${x1} e=${x0} > > d.mon start=wx0 > d.erase > d.grid -w size=10:0 > > > The d.grid manual suggests calling 2x near the poles, but even doing > that (e.g. d.grid -w size=1 direction=east-west) does not improve > where the grid lines are drawn. Also, if I wanted Russia, not > Greenland, pointing "down" on the map, how do I rotate this > projection? > Can't help you with you grid problems right now, but for "rotating" your projection, you would have to create a new location with modified projection parameters. Just change the lon_0 value to whatever meridian you want as central: Original EPSG 3413 : +proj=stere +lat_0=90 +lat_ts=70 +lon_0=-45 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs <> Centered on Novosibirsk: +proj=stere +lat_0=90 +lat_ts=70 +lon_0=83 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs <> You can then create the new location using the "custom PROJ.4 parameters" option for defining the projection and pasting the above definition. Moritz ___ grass-user mailing list grass-user@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/grass-user