Re: [Qgis-user] Error - Qgis files getting corrupted after saving

2023-08-23 Thread Hugh Kelley via QGIS-User
Glad it worked out!

As long as you rename every file in the shapefile renaming shoukd be fine.
Renaming just the .shp file will cause problems.

You might consider:
 http://switchfromshapefile.org/

Thanks to whoever on this list shared that originally.




On Wed, Aug 23, 2023, 2:20 AM Gómez Sánchez, Sandra <
sgome...@eservicios.indra.es> wrote:

> Hello Hugh,
>
> Thank you very much for your answer, the problem has been solved I will
> post here what was causing the issue, for you to know,
>
> When we were modifying the data inside qgis we were not exporting it but
> mashing the previous one by saving, and then changing the name of the file
> outside qgis, instead we exported the shp file from qgis and gave the file
> a new name from there, and the corruption of the file disappeared.
>
> Have a nice day! 
>
> [image: Opsait] 
>
>
> Sandra Gómez Sánchez
> --
> *De:* Hugh Kelley 
> *Enviado:* lunes, 21 de agosto de 2023 14:55
> *Para:* Gómez Sánchez, Sandra 
> *Cc:* qgis-user 
> *Asunto:* Re: [Qgis-user] Error - Qgis files getting corrupted after
> saving
>
> Hi Sandra,
>
> When you say "data" are you referring to spatial data saved in something
> like a shapefile geopackage etc, or the actual qgis file ending in .qgz or
> .qgs?
>
> If it is the actual qgis file itself that you are seeing corrupted, I
> would not expect a qgis file created by a newer version to be backwards
> compatible with and older version of qgis. I often see people using older
> versions run into weird problems when opening a file created by a newer
> version. Perhaps others will say otherwise but I don't expect this to a
> problem that can be solved. All users should be on a common version for the
> best experience.
>
> If its spatial data you're seeing corrupted that is something that should
> be solvable anf sharing what file type is being used might get you helpful
> suggestions.
>
> As a note, because opening and saving a qgis file with a different version
> can cause problems across versions, like loosing symbology settings, I
> backup my qgis work at least once a day so that I have something recent to
> fall back to if an issue like this occurs.
>
> Best,
>
> Hugh
>
> On Mon, Aug 21, 2023, 8:43 AM Gómez Sánchez, Sandra via QGIS-User <
> qgis-user@lists.osgeo.org> wrote:
>
> Hello there,
>
> I am facing an issue with the saving files from Qgis and importing them to
> another software.
>
> On this case, we are changing data inside Qgis and then import that data
> into Keycom.
>
> The thing is, we have 2 colleagues which are using Qgis 3.28.8 and 3.32.0
> versions and after they change the data inside qgis, and they save that
> data, the files get corrupted;
>
> I have been trying with my own qgis, which is 3.28.2 and in mine works
> perfect; I have changed their raw data and when I import that data on
> keycom it works, I have also sended them my own data (ready for import) to
> them, and they are able to import it, but once they put that data on their
> Qgis it gets corrupted and we can't work with it, we have checked the steps
> they are taking but they are doing the same as me,
>
> We did a silly test in which I sended them my data, they imported it into
> keycom, it worked, then they changed one single value inside Qgis and it
> got corrupted; so we know that the issue is located into the "saving" form
> from Qgis;
>
> We can open the files from Qgis again and they don't show signs of
> corruption inside, is just when we try to import them into keycom when the
> error is shown, so we are kinda lost here,
>
> is there any issue / feature we have to check for?
>
> Thank you very much,
>
> Sandra
>
> [image: Opsait] 
>
>
> Sandra Gómez Sánchez
>
> --
>
> Este correo electrónico y, en su caso, cualquier fichero anexo al mismo,
> contiene información de carácter confidencial exclusivamente dirigida a su
> destinatario o destinatarios. Si no es vd. el destinatario indicado, queda
> notificado que la lectura, utilización, divulgación y/o copia sin
> autorización está prohibida en virtud de la legislación vigente. En el caso
> de haber recibido este correo electrónico por error, se ruega notificar
> inmediatamente esta circunstancia mediante reenvío a la dirección
> electrónica del remitente.
> Evite imprimir este mensaje si no es estrictamente necesario.
>
> This email and any file attached to it (when applicable) contain(s)
> confidential information that is exclusively addressed to its recipient(s).
> If you are not the indicated recipient, you are informed that reading,
> using, disseminating and/or copying it without authorisation is forbidden
> in accordance with the legislation in effect. If you have received this
> email by mistake, please immediately notify the sender of the situation by
> resending it to their email address.
> Avoid printing this message if it is not absolutely necessary.
> 

[Qgis-user] QGIS is great! (and fixed the broken geotagging in my Insta360 photos)

2023-08-23 Thread Adam Nielsen via QGIS-User
Hi all,

This isn't a request for help, I just wanted to give a big thanks to
everyone involved in the development of QGIS.  I have never used a
program that seems to be able to cater to everything I might want to do.

I recently purchased an Insta360 camera, with the goal of going walking
and having it collect a bunch of 360 degree photos, that I could turn
into my own private Google Street View.

Unfortunately having just loaded the photos in using the "import
geotagged photos" tool, it turns out that in their infinite wisdom, the
Insta360 developers thought it would be sufficient to just use the GPS
coordinates of the first photo taken.  So now I have 400 photos at the
exact same GPS coordinate, making the camera entirely unsuitable for
Street View photography!  (Funny how you find all the complaints on
Google only AFTER you've bought a product.)

However I was also recording my track using the GPS Logger app on my
phone.  I wondered whether perhaps there was a way to somehow apply
that GPS track against the photos.

As it turned out, the .gpx export from the app includes a track_points
table, which has one row every second with the current GPS coordinates.
This means there is a timestamp in that table, with GPS coordinates,
for every timestamp in the photo table!  Unfortunately one is UTC and
the other is local time, but a little maths should be able to solve
that.

In the end I worked out that I could create a virtual layer, which uses
an SQL query to join the two tables together and pick the GPS
coordinates out of the GPS track but the rest of the data from the
photos table.  This worked perfectly and now I have a proper layer with
each of the 400 photos at the correct location!

This was another feature I never thought I would need but QGIS provided
the means to get it done.

In case anyone else ever needs to do something similar, here is the
query I used:

  SELECT
"photos"."fid",
"photo",
"filename",
"directory",
"ele" AS "altitude",
"direction",
"rotation",
X("track_points"."geometry") AS "longitude",
Y("track_points"."geometry") AS "latitude",
"timestamp",
"track_points"."geometry" AS "geometry"
  FROM "photos"
  JOIN "track_points"
ON unixepoch("track_points"."time") = unixepoch("photos"."timestamp") - 
36000;
-- (36000 converts UTC+10 into UTC)

To use it, create a new virtual layer, import the geotagged photos
layer (and call it "photos") then add the "track_points" layer from the
.gpx file (and call it "track_points") then click the Test button and
it should come back as OK.  Then you can add the layer.

Just be aware that it's quite slow and makes QGIS freeze for a few
minutes - you just have to leave it alone and it will eventually come
back to life.  The first thing I did was to quickly hide the new virtual
layer seconds after I added it (to stop it from rendering and freezing
QGIS), then I exported the virtual layer to a new layer in a temporary
.gpkg file.  This way I could remove the slow virtual layer and continue
working with the faster temporary .gpkg file.

Anyway, I just wanted to say thanks for all the effort everyone has put
into such a fantastic program!

Cheers,
Adam.
___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Error - Qgis files getting corrupted after saving

2023-08-23 Thread Gómez Sánchez , Sandra via QGIS-User
Hello Hugh,

Thank you very much for your answer, the problem has been solved I will post 
here what was causing the issue, for you to know,

When we were modifying the data inside qgis we were not exporting it but 
mashing the previous one by saving, and then changing the name of the file 
outside qgis, instead we exported the shp file from qgis and gave the file a 
new name from there, and the corruption of the file disappeared.

Have a nice day! 

[Opsait]


Sandra Gómez Sánchez


De: Hugh Kelley 
Enviado: lunes, 21 de agosto de 2023 14:55
Para: Gómez Sánchez, Sandra 
Cc: qgis-user 
Asunto: Re: [Qgis-user] Error - Qgis files getting corrupted after saving

Hi Sandra,

When you say "data" are you referring to spatial data saved in something like a 
shapefile geopackage etc, or the actual qgis file ending in .qgz or .qgs?

If it is the actual qgis file itself that you are seeing corrupted, I would not 
expect a qgis file created by a newer version to be backwards compatible with 
and older version of qgis. I often see people using older versions run into 
weird problems when opening a file created by a newer version. Perhaps others 
will say otherwise but I don't expect this to a problem that can be solved. All 
users should be on a common version for the best experience.

If its spatial data you're seeing corrupted that is something that should be 
solvable anf sharing what file type is being used might get you helpful 
suggestions.

As a note, because opening and saving a qgis file with a different version can 
cause problems across versions, like loosing symbology settings, I backup my 
qgis work at least once a day so that I have something recent to fall back to 
if an issue like this occurs.

Best,

Hugh

On Mon, Aug 21, 2023, 8:43 AM Gómez Sánchez, Sandra via QGIS-User 
mailto:qgis-user@lists.osgeo.org>> wrote:
Hello there,

I am facing an issue with the saving files from Qgis and importing them to 
another software.

On this case, we are changing data inside Qgis and then import that data into 
Keycom.

The thing is, we have 2 colleagues which are using Qgis 3.28.8 and 3.32.0 
versions and after they change the data inside qgis, and they save that data, 
the files get corrupted;

I have been trying with my own qgis, which is 3.28.2 and in mine works perfect; 
I have changed their raw data and when I import that data on keycom it works, I 
have also sended them my own data (ready for import) to them, and they are able 
to import it, but once they put that data on their Qgis it gets corrupted and 
we can't work with it, we have checked the steps they are taking but they are 
doing the same as me,

We did a silly test in which I sended them my data, they imported it into 
keycom, it worked, then they changed one single value inside Qgis and it got 
corrupted; so we know that the issue is located into the "saving" form from 
Qgis;

We can open the files from Qgis again and they don't show signs of corruption 
inside, is just when we try to import them into keycom when the error is shown, 
so we are kinda lost here,

is there any issue / feature we have to check for?

Thank you very much,

Sandra

[Opsait]


Sandra Gómez Sánchez



Este correo electrónico y, en su caso, cualquier fichero anexo al mismo, 
contiene información de carácter confidencial exclusivamente dirigida a su 
destinatario o destinatarios. Si no es vd. el destinatario indicado, queda 
notificado que la lectura, utilización, divulgación y/o copia sin autorización 
está prohibida en virtud de la legislación vigente. En el caso de haber 
recibido este correo electrónico por error, se ruega notificar inmediatamente 
esta circunstancia mediante reenvío a la dirección electrónica del remitente.
Evite imprimir este mensaje si no es estrictamente necesario.

This email and any file attached to it (when applicable) contain(s) 
confidential information that is exclusively addressed to its recipient(s). If 
you are not the indicated recipient, you are informed that reading, using, 
disseminating and/or copying it without authorisation is forbidden in 
accordance with the legislation in effect. If you have received this email by 
mistake, please immediately notify the sender of the situation by resending it 
to their email address.
Avoid printing this message if it is not absolutely necessary.
___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user



Este correo electrónico y, en su caso, cualquier fichero anexo al mismo, 
contiene información de carácter confidencial exclusivamente dirigida a su 
destinatario o destinatarios. Si no es vd. el destinatario indicado, queda 
notificado que la lectura,