6

I have my custom CRS in table "spatial_ref_sys" in database. When I load layer from schema "public", QGIS create this CRS. But if layer from other schema, it's not. What I need to solve this problem?

Svetlana
  • 133
  • 4
  • do you have another spatial_ref_sys table under you "other schema" ? do you have any specific Privileges on the public schema's table ? – Hugo Roussaffa Oct 29 '17 at 14:55
  • I try to create view of spatial_ref_sys table in other schema, but it doesn't work. What specific privilegies did you say about? – Svetlana Oct 29 '17 at 15:09
  • because you can revoke privilege to read public schema but by default it's allow, so if you didnot create specific privilege on public schema, it's may not a privilege error. – Hugo Roussaffa Oct 29 '17 at 18:47
  • did you remove the spatial_ref_sys you create on the "other schema" ? how do you create the "other schema" ? on the postgis doc 5.8.3. The Schema Search Path link you can read that The system determines which table is meant by following a search path, which is a list of schemas to look in. The first matching table in the search path is taken to be the one wanted. So, if you don't have a table "spatial_ref_sys" on you "other schema" QGIS should get the spatial ref entry from the public.spatial_ref_sys table. – Hugo Roussaffa Oct 29 '17 at 20:33
  • @HugoRoussaffa-GeoDatup I didn't create specific privilege, but anyway I'm log in as superuser. Also I tried to move "spatial_ref_sys" and extension "postgis" on "other schema". QGIS defines srid of CRS from database in postgis dialog window , but when I add a layer, it without any CRS. – Svetlana Oct 31 '17 at 12:08
  • can you give us the output of those command : \d yourTable and also this one SELECT * from spatial_ref_sys WHERE spatial_ref_sys.srid = Find_SRID('OtherShema', 'yourTable', 'GeometryColum'); ? – Hugo Roussaffa Oct 31 '17 at 12:58
  • @HugoRoussaffa-GeoDatup
    1. What informantion do you need from this query? It's just a structure of table, isn't it?
    2. This command execution is succefull. I got a string with CRS, which I add in "spatial_ref_sys" table and assignied this table
    – Svetlana Oct 31 '17 at 17:32
  • Just want to be sure that your table and Spatial_ref_sys are greatly construct. But, nevertheless, I decided to try on my own, and QGIS does not create the custom CRS (as the table is under public schema or not). So, can you give us more detail on how you did that ? you can see this old answer that you need to recreate the CRS under QGIS. I don"t know how QGIS define the matching between the custom CRS in QGIS and the Custom SRID in postgis... it's a question to ask ! – Hugo Roussaffa Oct 31 '17 at 20:33
  • @HugoRoussaffa-GeoDatup Hm, I didn't define any specific parametres. QGIS did it himself. If I find causes, I will write you. Thank you! – Svetlana Nov 01 '17 at 13:56

0 Answers0