[Qgis-user] QGIS ignore the cpg files when loading shapefiles ?

kimaidou kimaidou at gmail.com
Fri Dec 29 05:42:59 PST 2017


Hi,

Some comments about this issue :

* we should add an project option for this too, wich overrides the QGIS
setting
* there is a way to create an option file read by the server, where you can
add the options you like. See the doc in [1]

Basically:

* create a file somewhere in the server, e.g.

/svr/qgis/config/QGIS/QGIS2.ini

* Add some variables in this file, for example

[svg]
searchPathsForSVG=/srv/data/mysvg|/home/data/other_svg

* Set the env variable to tell QGIS Server where to read the config file

FcgidInitialEnv QGIS_OPTIONS_PATH "/srv/qgis/config/"


Regards
Michaël

[1]
https://docs.qgis.org/2.18/it/docs/user_manual/working_with_ogc/server/config.html#environment-variables



2017-12-29 14:31 GMT+01:00 Andrea Peri <aperi2007 at gmail.com>:

> Hi,
> I confirm .
> The setting is at application level , not at project level.
>
> I have my desktop set to "ignore setting", but when move to qgis-server it
> don't use the cpg file.
>
> So now I'm now changing manually all the layers one by one in my project
> qgis from System to the effective charset of every single shapefile to use
> them on qgis-server.
>
> A.
>
>
> 2017-12-29 13:58 GMT+01:00 Richard Duivenvoorde <rdmailings at duif.net>:
>
>> On 29-12-17 13:12, Tobias Wendorff wrote:
>> > Am Fr, 29.12.2017, 13:02 schrieb Richard Duivenvoorde:
>> >>
>> >> So the project is leading
>> >
>> > Then the setting is in the wrong place. In QGIS3, it's an application
>> > wide setting, not a project setting.
>>
>> Hi Tobias,
>>
>> Sorry. You are right. I was just echoing my interpretation of Paolo's
>> email.
>>
>> It seems a indeed an application setting:
>>  /qgis/ignoreShapeEncoding
>> used here:
>>
>> https://github.com/qgis/QGIS/blob/master/src/providers/ogr/q
>> gsogrprovider.cpp#L433
>>
>> In desktop defaulting to true:
>> https://github.com/qgis/QGIS/blob/master/src/app/qgsoptions.cpp#L644
>>
>> I'm not familiar with how the settings/environment are created for the
>> server.
>>
>> Depending the view on being it a project setting, or a application
>> setting, it should be, or NOT be in the project file.
>> BUT if not be in the project file, there is maybe a way (via custom
>> settings?) to put this kind of stuff in the environment?
>>
>> In 3.0 and 2.18 I changed the value to false, but could not find
>> anything in the project file.
>>
>> I think we should try to define this clearly:
>> - should we define it a project or a application
>> (?? is one server one application??) setting
>> - where does the 'settings' come from for a freshly started qgisserver.
>> (as normally you do not use the same server machine on which you run
>> desktop)
>>
>> Regards,
>>
>> Richard Duivenvoorde
>> _______________________________________________
>> Qgis-user mailing list
>> Qgis-user at lists.osgeo.org
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>>
>
>
>
> --
> -----------------
> Andrea Peri
> . . . . . . . . .
> qwerty àèìòù
> -----------------
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20171229/24f4247c/attachment.html>


More information about the Qgis-user mailing list