QGIS - Add Custom Projection/ Coordinate System to default projections list (srs.db) permanently
Вставка
- Опубліковано 10 лис 2024
- You can add your custom Projection system in two different ways.
1. Add from GUI: Go to settings then Custom Projections and add your projection parameters there. Thus created projection will be user defined and will not appear in some cases. eg. while adding WMS layer with custom projections.
2. Add your projection to database from file manager: You can open srs.db in sqlite and use insert query
eg: INSERT into 'tbl_srs' VALUES(8848, 'Lambert Confirmal Conic Nepal', 'merc', '', '+proj=lcc +lat_1=27 +lat_2=29.75 +lat_0=28.37803361 +lon_0=84 +x_0=500000 +y_0=500000 +a=6377276.345 +b=6356075.41314024 +units=m +no_defs',8848,'EPSG','8848',0,0,null,null)
Here most important thing is
a. parameter: ie. '+proj=lcc +lat_1=27 +lat_2=29.75 +lat_0=28.37803361 +lon_0=84 +x_0=500000 +y_0=500000 +a=6377276.345 +b=6356075.41314024 +units=m +no_defs ' and
b. The srs name in desctiption field ie. 'Lambert Confirmal Conic Nepal'
c. srid (spatial reference system id eg. 4326 for WGS 1984): ie. 8848 in this query. You can add same value for auth_id.