[Qgis-user] Project file format

Hugh Kelley hghklly at gmail.com
Tue Nov 16 10:10:50 PST 2021


Paul,

as far as the re-ordering of xml elements, I had a similar question about
version control a while ago and Alexandre Neto helpfully suggested using
this plug in which orders elements in a deterministic way to minimize
reordering.

Hope it helps and thanks again to Alex for the original suggestion.

https://plugins.qgis.org/plugins/trackable_project_files/


On Tue, Nov 16, 2021, 12:52 PM Paul Wittle <paul.wittle at dorsetcouncil.gov.uk>
wrote:

> Hi,
>
>
>
> I know people will probably ask “why?” in relation to this question but
> I’ve got a Powershell script that I use to create copies of some QGIS
> projects because I want to change the data source of a couple of layers
> between dev and test. Rather than do this in QGIS it is done as part of an
> automation hence using Powershell; I’ve had mixed results trying to load
> the QGIS project standalone and so Powershell felt simpler.
>
>
>
> Anyway; the issue I’m getting is that Powershell is adding a space between
> the last />. So <title/> will become <title />. Is there a way to set QGIS
> so that the project files are saved with the spaces?
>
>
>
> The other issue I’m getting is that the attributes in the elements seem to
> be moving depending on who saves it. This is when using QGIS; not
> Powershell.
>
>
>
> So I save the project using QGIS and I get:
>
> <qgis projectname=”” saveDateTime=”” saveUser=”” version=””
> saveUserFull=””>
>
>
>
> Someone else saves it on their device using QGIS and we get:
>
> <qgis projectname=”” saveUser=”” saveUserFull=”” version=””
> saveDateTime=””>
>
>
>
> Is this expected as I would have thought that QGIS would have kept this
> consistent?
>
>
>
> The version is "3.16.0-Hannover" for all the users.
>
>
>
> The reason I’m asking is that the files are in source control and given it
> is XML I would have expected it to be easy to identify what someone changed
> but due to the issues above it tends to claim that almost everything was
> changed. This is just because all the attributes are reordered and the
> spaces are being added to the end of elements as well. I can live with it
> but I thought I’d ask if there is a setting I can use that will ensure that
> projects save consistently really?
>
>
>
> Any tips would be appreciated but if it is too technical a question they
> my apologises.
>
> Paul
> This e-mail and any files transmitted with it are intended solely for the
> use of the individual or entity to whom they are addressed. It may contain
> unclassified but sensitive or protectively marked material and should be
> handled accordingly. Unless you are the named addressee (or authorised to
> receive it for the addressee) you may not copy or use it, or disclose it to
> anyone else. If you have received this transmission in error please notify
> the sender immediately. All traffic may be subject to recording and/or
> monitoring in accordance with relevant legislation. Any views expressed in
> this message are those of the individual sender, except where the sender
> specifies and with authority, states them to be the views of Dorset
> Council. Dorset Council does not accept service of documents by fax or
> other electronic means. Virus checking: Whilst all reasonable steps have
> been taken to ensure that this electronic communication and its attachments
> whether encoded, encrypted or otherwise supplied are free from computer
> viruses, Dorset Council accepts no liability in respect of any loss, cost,
> damage or expense suffered as a result of accessing this message or any of
> its attachments. For information on how Dorset Council processes your
> information, please see www.dorsetcouncil.gov.uk/data-protection
> _______________________________________________
> 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/20211116/af8069ce/attachment.html>


More information about the Qgis-user mailing list