[Qgis-user] CSV Import records missing on map

Peter Devanney peter at devanney.ca
Sat Oct 2 05:10:46 PDT 2021


Andrea, Garth

Thanks for the suggestions and tips.

I would have shared the file or some of the data but was unable to get in
touch with the data owner for permission in a timely manner.

I thought I would share the workaround and experience in case anyone else
runs into this.

Based on Garth's comments I updated the DMS to ensure it used the specific
characters mentioned above ( "The degree symbol ° fails while º works.
Under Mac OS X 10.13 the first is Option-Shift-8, the second is Option-0
(opt-zero)."). QGIS still would only successfully assign geometry
attributes to a few of the imported records and none to others.

In the end I used the Microsoft support site VBA code to do the conversion
in Excel from DMS to D.D and then 100% records imported ok as a delimited
text file into QGIS.

I did have to change the degree symbol from Option-0 to Option-Shift-8 and
the seconds symbol from a double single quote to proper double quotes or I
could have changed it in the VBA script as well.

If I had been a better Python text wrangler I probably could have dealt
with modifying a N45 00 00.0 to 45° 00' 00.0 " programmatically without
going through the data and adding the ° ' and " manually but at least I
have a solution. There are not too many records.

Thanks again for the suggestions.

Peter

On Mon, Sep 27, 2021 at 3:56 PM Garth Fletcher <garth at jacqcad.com> wrote:

> CVS import of DMS coords is touchy in my experience.
> The degree symbol ° fails while º works.
>   Under Mac OS X 10.13 the first is Option-Shift-8, the second is
> Option-0 (opt-zero).
> Also, it seems to want ' for minutes and ' ' for seconds, i.e., a single
> ' and two separate '.
> It rejects a normal " double quotes, and I'm sure will reject "smart"
> quotes, i.e., the ones
> that lean in different directions.
>
> Since I figured those quirks out I have not had any problems with DMS
> notation.
>
> --
> Garth Fletcher
>
> _______________________________________________
> 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/20211002/c8ca728c/attachment.html>


More information about the Qgis-user mailing list