Friday, 13 February 2015

coordinate system - Creating custom CRS in QGIS



I am trying to define a custom CRS in QGIS 3.4 to work on some data in Central Asia. I want to use the Albers Equal Area Conic but change the parameters so that the transformation works best for my study area.


I first tried to go via "Settings" --> "Custom CRS". I defined the name and the +projstring as +proj=aea +lat_1=21 +lat_2=49 +lat_0=37 +lon_0=87 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs. But when I click "Ok", nothing happens.


I don't get an error message or any feedback, there's just no response. (I tried QGIS 3.10 as well, but the same problem occurred.) This looks like a bug to me or is there something I missed?


If this cannot be reproduced, I could also go the Python way, but I'm not so familiar with that. I've read through some documentation and found the following pieces of code but I'm not sure if they are in the right order or if something is missing:


my_crs = QgsCoordinateReferenceSystem()
my_crs.createFromProj4("+proj=aea +lat_1=21 +lat_2=49 +lat_0=37 +lon_0=87 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs")
my_crs.saveAsUserCrs("Albers_Central_Asia")

Answer






  1. add new profile. : Settings -> User Profiles -> New profile




  2. use new profile and try creating custom projections.




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...