Is there a way to put the gps coordinates onto a photo?

8 views
Skip to first unread message

mark

unread,
Sep 21, 2022, 11:31:50 AM9/21/22
to
Is there a way to put the gps coordinates onto a photo?

I have Windows 10 and Android 11.
I am working on a project with multiple very large apartment complexes.
I have a paper colored apartment complex map for each complex.
The map does not seem to be online so it's a paper handout.
At each complex I'm expected to visit a set of given units each day for
various reasons and all they give me is this paper map to find each unit.

That works. But it's inefficient.
They do this to everyone, not just to me.

We're expected to use the paper map with hundreds of apartments and dozens
of buildings, where the numbering system for buildings usually makes sense
but not for the apartments. Sometimes we even need to visit parking spaces
as we have vehicles parked which we have to put notices on where the
numbers make no sense on purpose for security reasons.

Once I find a given location, I've been using OSMand+ to save the current
position. First off I'm surprised that OSMAnd+ doesn't have a "Save Current
Location" option which I thought almost all map programs would have had.

These apartments all have individual outside entrances so it's not like a
hotel where you go down a long hallway to serially find the door number you
need.

So what I do is establish my current location & long press the blue dot.

When I get to the right apartment door I step outside the entrance on the
ground floor and press as close as I can on the blue location dot which
pops up a "Looking up address" OSMAnd+ menu which usually gives the same
address for all locations. Then I press the "Add" star and change the name
to "Complex Bathroom" or "Complex Pool" or more commonly "ComplexBldgApt"
such as "RedwoodApts Bldg15 Apt489" or "RedwoodApts Lot15 Spot489" or
something like that.

Once I've renamed the current pressed location, I hit Save and then I can
navigate walking after that where OSM can talk me through the steps even
when the phone is in my pocket and my hands are full.

Having to fatfinger the location isn't as accurate as having a "Save
Current Location" button would be but it's definitely good enough for
government work as they say.

When I need to navigate to a given spot I first point the phone north with
a compass app because moving compass navigation directions aren't so easy
when walking and then I orient the OSM map toward that heading to get my
initial bearings of which way to start walking and about how far it will
be. Usually I'm carrying tools or supplies so my hands are almost always
full.

That's all I need but I'm working with others from the local work to future
group where everyone else wastes time trying to find the building & apt.

What I want is take a jpeg picture of the paper colored apartment complex
map which I can then hand to each person whose phone can then point to the
location.

All of that brings me to my question of how to make that jpeg gps map.

Is there a way to put the gps coordinates onto a photo?

Guglielmo Marconi

unread,
Sep 21, 2022, 12:13:59 PM9/21/22
to
In article <tgfap2$59l$1...@gioia.aioe.org> , mark <ma...@mark.edu> wrote:
>Is there a way to put the gps coordinates onto a photo?
>


Hi Mark, happy to help here.

First, you need to pull your fucking head out of your ass.

Once your head is out your of your ass, take your camera and
snap a photo of the coordinates on your GPS receiver. Voila!

G Marconi

Jeff Liebermann

unread,
Sep 21, 2022, 12:34:42 PM9/21/22
to
On Wed, 21 Sep 2022 17:31:47 +0200, mark <ma...@mark.edu> wrote:

>Is there a way to put the gps coordinates onto a photo?

Will this work for you?
<http://www.learnbydestroying.com/jeffl/crud/Irfanview%20Insert%20Text.jpg>

Install Irfanview viewer and plugs:
<https://www.irfanview.com>

Open a picture.

Hit "e" on the keyboard. That should bring up the EXIF data.

Highlight the EXIF data you want to insert using the mouse and the
shift or control key.

Right click the mouse and select "Copy selected lines to Clipboard" or
hit "alt-S"

Exit EXIF info window.

One the picture, use the mouse frame an area where you want the text
to appear.

On the menu line above the picture, select:
Edit -> Insert Text (ctrl-T)

Hit <ctrl-V> to paste the text from the clipboard into the Text box.

It should look something like this screen dump:
<http://www.learnbydestroying.com/jeffl/crud/Ifranview%20Insert%20Text%20Screen.jpg>

Play with the options. Hit OK.

Save the picture and you're done.


--
Jeff Liebermann je...@cruzio.com
PO Box 272 http://www.LearnByDestroying.com
Ben Lomond CA 95005-0272
Skype: JeffLiebermann AE6KS 831-336-2558

curmudgeon

unread,
Sep 21, 2022, 11:29:24 PM9/21/22
to
I don't know if a georeferencing program exists on Windows or on Android
for jpeg images but what you need for your jpeg is similar to what common
georeferencing software does for a PDF to establish the coordinates for
every point on the grid of the jpeg.
https://www.usgs.gov/faqs/what-geopdfr

Once you associate the coordinate grid onto that jpeg file, the map program
will be able to navigate based on those reference points.

Those talking about exif data don't understand how navigation works.

It's common to georeference a PDF but a google search finds you can
georeference an image also if you know what you're doing.
https://mdl.library.utoronto.ca/technology/tutorials/how-georeference-images-arcgis

mark

unread,
Sep 22, 2022, 1:16:20 PM9/22/22
to
curmudgeon <curmu...@spam.edu> wrote:
curmudgeon <curmu...@spam.edu> wrote:

>> Is there a way to put the gps coordinates onto a photo?
>
> I don't know if a georeferencing program exists on Windows or on Android
> for jpeg files but what you need for your jpeg is similar to what common
> georeferencing software does for a PDF to establish the coordinates for
> every point on the grid of the jpeg.
> https://www.usgs.gov/faqs/what-geopdfr

Based on that reference, it looks like I need to find a program for Windows
which will georeference the digital image so that the georeferenced
digitial image can then be distributed to the team to be used for map app
navigation on their phones.

> Once you associate the coordinate grid onto that jpeg file, the map program
> will be able to navigate based on those reference points.
>
> Those talking about exif data don't understand how navigation works.

They got hung up on it being an image and they didn't read the rest of the
question because the question has nothing to do with exif data.

> It's common to georeference a PDF but a google search finds you can
> georeference an image also if you know what you're doing.
> https://mdl.library.utoronto.ca/technology/tutorials/how-georeference-images-arcgis

It may be impossible to georeference the jpeg but I can convert it to a pdf
using windows irfanview conversion plugins.

Once I have the georeferenced pdf, any good map navigatation program on the
phone should be able to navigate using that georeferenced pdf as it's map.

If I convert the digital image to a pdf, do you know of a windows program
that can georeference that pdf?

Bernd Rose

unread,
Sep 23, 2022, 12:59:17 PM9/23/22
to
On Thu, 22nd Sep 2022 19:16:17 +0200, mark wrote:

> curmudgeon <curmu...@spam.edu> wrote:
[...]
> looks like I need to find a program for Windows which will georeference
> the digital image
[...]
>> It's common to georeference a PDF but a google search finds you can
>> georeference an image also if you know what you're doing.
>> https://mdl.library.utoronto.ca/technology/tutorials/how-georeference-images-arcgis
>
> It may be impossible to georeference the jpeg but I can convert it to a pdf
> using windows irfanview conversion plugins.

Georeferencing images predates georeferencing of *.pdf files by decades.
An excellent free GIS program for Windows (and other operating systems)
capable of georeferencing is QGIS:

https://www.qgis.org

Here is a tutorial:

http://www.qgistutorials.com/en/docs/3/georeferencing_basics.html

F-Up set to sgs-n
Bernd

curmudgeon

unread,
Sep 25, 2022, 3:28:40 AM9/25/22
to
Jeff Liebermann wrote at Wed, 21 Sep 2022 09:34:38 -0700 :

>>Is there a way to put the gps coordinates onto a photo?
>
> Will this work for you?
> <http://www.learnbydestroying.com/jeffl/crud/Irfanview%20Insert%20Text.jpg>
>
> Install Irfanview viewer and plugs:
> <https://www.irfanview.com>
>
> Open a picture.
>
> Hit "e" on the keyboard. That should bring up the EXIF data.
>
> Highlight the EXIF data you want to insert using the mouse and the
> shift or control key.
>
> Right click the mouse and select "Copy selected lines to Clipboard" or
> hit "alt-S"
>
> Exit EXIF info window.
>
> One the picture, use the mouse frame an area where you want the text
> to appear.
>
> On the menu line above the picture, select:
> Edit -> Insert Text (ctrl-T)
>
> Hit <ctrl-V> to paste the text from the clipboard into the Text box.
>
> It should look something like this screen dump:
> <http://www.learnbydestroying.com/jeffl/crud/Ifranview%20Insert%20Text%20Screen.jpg>
>
> Play with the options. Hit OK.
>
> Save the picture and you're done.

What the OP needs to do is assign a gps coordinate to each pixel in his/her
raster images using XYZ tile layers for each zoom level.

He/she probably will want to gather the coordinates for a few ground
control points from OpenStreetMap. Using those selected ground control
points he/she should use the free Windows QGIS version 3.20 or newer tools
which have a built-in OpenStreetMap based nominatim geocoder to warp the
image to his/her chosen coordinate reference system.

Most likely he/she will choose the EPSG 3857 Pseudo Mercator as his/her
target coordinate reference system with the polynomial 2 transformation
type and LZW compression settings.

A good tutorial for georeferencing JPG images with Windows QGIS3 is here.
http://www.qgistutorials.com/en/docs/3/advanced_georeferencing.html

Lawrence Aracabia

unread,
Sep 25, 2022, 3:59:54 AM9/25/22
to
Guglielmo Marconi <GMar...@the.GPS-HelpGroup> wrote:

> take your camera and snap a photo of the coordinates on your GPS receiver.

That can't work.

But the op can download Google satellite image map tiles & OSM map tiles.
https://github.com/AliFlux/MapTilesDownloader

I would think those tiles would come with the georeferences already.

But that free MapTilesDownloader utility from Ali Ashraf requires Python.
Is Python on Android?

Erholt Rhein

unread,
Oct 1, 2022, 7:27:44 PM10/1/22
to
The way I would add gps coordinates to every pixel in an image would be to
use the free Adobe Acrobat product to turn the image into a geospatial pdf.
https://acrobatusers.com/tutorials/print/how-create-geospatial-pdf/

People do it all the time for navigating airport terminals for example.
https://support.foreflight.com/hc/en-us/articles/360036971113-How-do-I-create-a-geospatial-PDF-

Firefighters & emergency responders use EGP to add geospatial coordinates.
https://www.nwcg.gov/publications/pms936-1/create-incident/geospatial-pdf

But I'd use Adobe Acrobat since it's easy to edit the image as a PDF.
https://acrobatusers.com/tutorials/how-create-geospatial-pdf/

Most governments recommend navigation in the geoPDF in Android/iOS Avenza.
https://idfg.idaho.gov/blog/2012/12/geospatial-pdf-how-create-geospatially-aware-pdf

Avenza is limited to 3 active maps (although they can be combined).
https://www.avenzamaps.com/maps/how-it-works.html

If you need more than 3 active maps, use Android/iOS Paper Maps instead.
https://www.paper-maps.com/

An easy way to test how geopdfs work is to download them from the usgs.
https://ngmdb.usgs.gov/topoview/viewer/#

Zoom to the 24K/7.5-minute quadrangle of interest & download the geopdf.
You can even choose historical geopdfs from the 1800's and 1900's.

An example is this Grand Canyon geopdf to use in either of those two apps.
https://prd-tnm.s3.amazonaws.com/StagedProducts/Maps/USTopo/PDF/AZ/AZ_King_Arthur_Castle_20210820_TM_geo.pdf

mark

unread,
Oct 2, 2022, 1:37:17 PM10/2/22
to
On Fri, 23 Sep 2022 18:59:37 +0200, Bernd Rose wrote:

> Georeferencing images predates georeferencing of *.pdf files by decades.
> An excellent free GIS program for Windows (and other operating systems)
> capable of georeferencing is QGIS:
>
> https://www.qgis.org
>
> Here is a tutorial:
>
> http://www.qgistutorials.com/en/docs/3/georeferencing_basics.html

So far I've been failing at everything I do but there's more to try.

The main problem with QGIS is it won't work with the HP Stream 11 laptop.
Nothing you can do that is below super human will get it to install.

But I found a portable GIS version 6 that installs onto a removable drive.
https://portablegis.xyz/
https://download.astuntechnology.com/home/ (login=pgis,password=pgis)
https://download.astuntechnology.com/home/portablegis_setup_v60.exe

Do you think the tutorial will work with pgis instead?

mark

unread,
Oct 2, 2022, 1:37:18 PM10/2/22
to
On Sat, 1 Oct 2022 23:27:41 -0000 (UTC), Erholt Rhein wrote:

> But I'd use Adobe Acrobat since it's easy to edit the image as a PDF.
> https://acrobatusers.com/tutorials/how-create-geospatial-pdf/

So far I'm failing miserably to create a geospatial PDF using Acrobat.
https://get.adobe.com/reader/

From these instructions it will only work with Acrobat 9 & above
https://acrobatusers.com/tutorials/interacting-geospatial-pdfs/
https://helpx.adobe.com/acrobat/using/geospatial-pdfs.html

But I think it needs the Acrobat Writer and not the Acrobat Reader.
https://acrobatusers.com/tutorials/acrobat-and-reader-9-and-geospatial/

I found the latest full offline Adobe Acrobat Reader installer here.
https://get.adobe.com/reader/enterprise/
https://ardownload2.adobe.com/pub/adobe/reader/win/AcrobatDC/2200220191/AcroRdrDC2200220191_en_US.exe

Does anyone know if the reader can create the geospatial PDFs?
Or just the writer?

mark

unread,
Oct 2, 2022, 1:37:22 PM10/2/22
to
Lawrence Aracabia <Lawrence...@Aracabia.com> wrote:

> But the op can download Google satellite image map tiles & OSM map tiles.
> https://github.com/AliFlux/MapTilesDownloader
>
> I would think those tiles would come with the georeferences already.

I wasn't able to get that OSM tile downloader to work on Windows 10.

But I found a way to download the apartment OSM map tile as an osm file.
https://blog.richmond.edu/sal/2017/10/30/downloading-open-street-map-osm-data/

From Windows you use the OSM web interface to export *.osm tiles.
https://www.openstreetmap.org/export#map=18/{latitude}/{longitude}

Then I converted that exported *.osm file to a series of SHP files.
http://mygeodata.cloud/

These SHP files are actually of a bunch of formats inside a zip archive.
amenity_polygons-polygon.cpg
amenity_polygons-polygon.dbf
amenity_polygons-polygon.prj
amenity_polygons-polygon.shp
amenity_polygons-polygon.shx
buildings-polygon.cpg
buildings-polygon.dbf
buildings-polygon.prj
buildings-polygon.shp
buildings-polygon.shx
landcover-polygon.cpg
landcover-polygon.dbf
landcover-polygon.prj
landcover-polygon.shp
landcover-polygon.shx
roads-line.cpg
roads-line.dbf
roads-line.prj
roads-line.shp
roads-line.shx

If anyone knows what to do next, please let me know.

curmudgeon

unread,
Oct 2, 2022, 11:44:52 PM10/2/22
to
mark wrote at Sun, 2 Oct 2022 17:37:17 -0000 (UTC) :

> But I found a way to download the apartment OSM map tile as an osm file.
> https://blog.richmond.edu/sal/2017/10/30/downloading-open-street-map-osm-data/
>
> From Windows you use the OSM web interface to export *.osm tiles.
> https://www.openstreetmap.org/export#map=18/{latitude}/{longitude}
>
> Then I converted that exported *.osm file to a series of SHP files.
> http://mygeodata.cloud/
>
> If anyone knows what to do next, please let me know.

I've never done it but the OSM wiki says you can edit a local copy of an
OSM map using either a JavaScript ID editor or a Java OSM editor (JOSM).
https://wiki.openstreetmap.org/wiki/Edit_maps

I'd suggest the more powerful Java OSM (JOSM) editor over Javascript ID.
https://wiki.openstreetmap.org/wiki/JOSM

The Windows 10 JOSM installer should be located at their home page.
https://josm.openstreetmap.de/

curmudgeon

unread,
Oct 2, 2022, 11:45:51 PM10/2/22
to
mark wrote at Sun, 2 Oct 2022 17:37:07 -0000 (UTC) :

> But I found a portable GIS version 6 that installs onto a removable drive.
> https://portablegis.xyz/
> https://download.astuntechnology.com/home/ (login=pgis,password=pgis)
> https://download.astuntechnology.com/home/portablegis_setup_v60.exe
>
> Do you think the tutorial will work with pgis instead?

They don't tell you at that portable gis https://portablegis.xyz/ web site
that you first need to install Microsoft Visual C++ onto your system drive
before any of the PGIS QGIS 3.4.7-Madeira Desktop Packages buttons will
work on your laptop removable drives.

curmudgeon

unread,
Oct 2, 2022, 11:48:01 PM10/2/22
to
mark wrote at Sun, 2 Oct 2022 17:37:15 -0000 (UTC) :

> But I think it maybe needs the Acrobat Writer and not the Acrobat Reader.
> https://acrobatusers.com/tutorials/acrobat-and-reader-9-and-geospatial/
>
> Does anyone know if the reader can create the geospatial PDFs?
> Or just the writer?

My reader doesn't have the commands for importing the OSM shape files.
Therefore I think you need the Adobe Acrobat Writer (not the reader).
The writer costs money so you're better off with portable GIS or JOSM.

It won't be as simple to set up as you might like it to be though as
Portable GIS has a dependency on C++ and JOSM has a dependency on Java.

mark

unread,
Oct 3, 2022, 1:03:24 AM10/3/22
to
curmudgeon <curmu...@spam.edu> wrote:

> It won't be as simple to set up as you might like it to be though as
> Portable GIS has a dependency on C++ and JOSM has a dependency on Java.

I installed Microsoft Visual C++ 2015-2022 Redistributable x64 which didn't
ask where to put it so I assume it went onto the almost full system drive.
https://learn.microsoft.com/en-US/cpp/windows/latest-supported-vc-redist?view=msvc-170

Then I installed portable GIS (pgis) onto the removable drive and the
button for the Desktop Packages "QGIS" brought up QGIS 3.4.7 as stated.
https://portablegis.xyz/

The suggested tutorial is for a much older version of QGIS unfortunately.
http://www.qgistutorials.com/en/docs/3/georeferencing_basics.html

On my portable QGIS version 3.4.7, "Raster>Georeferencer" doesn't exist.
Neither does "Layer>Georeferencer" so I gave up on that old tutorial.

The QGIS interface is so complex that I need to look for a newer tutorial.

Bernd Rose

unread,
Oct 3, 2022, 3:12:06 AM10/3/22
to
On Sun, 2nd Oct 2022 17:37:07 -0000 (UTC), mark wrote:

> The main problem with QGIS is it won't work with the HP Stream 11 laptop.

This "laptop" has less system resources than most smartphones. It runs
Windows in a protected (app-only) S mode. QGIS, OTOH, is a desktop program.
You should be able to switch Windows from S-Mode to normal mode without
additional costs. But beware, you are /not/ able to reverse this decision!
In normal Windows mode, some system protections are switched off, which
leads to this "laptop" being not eligible for certain usage scenarios,
anymore, like using it in educational exams.

https://support.microsoft.com/en-us/windows/switching-out-of-s-mode-in-windows-4f56d9be-99ec-6983-119f-031bfb28a307

Be this as it may: The "laptop" in addition does not meet QGIS minimum
system requirements for RAM and the like. It /may/ be possible to install
and use QGIS, nevertheless. But /if/ it does work, everything will be
painfully slow. (GIS software is usually a domain of workstations and
not mere pocket calculators...)

> I found a portable GIS version 6 that installs onto a removable drive
[...]
> Do you think the tutorial will work with pgis instead?

Why not? Portable GIS just copies a normal QGIS installation folder (and
a lot more programs, you don't actually need for georeferencing images)
and adjusts some path entries and the like.

Bernd

Bernd Rose

unread,
Oct 3, 2022, 3:14:56 AM10/3/22
to
On Sun, 2nd Oct 2022 17:37:17 -0000 (UTC), mark wrote:

> I wasn't able to get that OSM tile downloader to work on Windows 10.

If you get QGIS up and running, you can embed OSM inside your maps and
export OSM data to other formats, like shapefiles.

mark

unread,
Oct 3, 2022, 9:48:13 AM10/3/22
to
Bernd Rose <b.rose...@arcor.de> wrote:

> If you get QGIS up and running, you can embed OSM inside your maps and
> export OSM data to other formats, like shapefiles.

The setup, so far, has been horrific but I've been making progress.

At first QGIS wouldn't install on the system drive (too little space on the
32GB HP Stream 11) and then GQIS wouldn't install on the ten times larger
removable drive, and then when portable GIS (pgis) was installed, the QGIS
button inside of PGIS would error looking for a DLL which turned out to be
due to the absence of C++ runtime libraries.

Now that QGIS 3.4 Madeira is running as a portable app on my puny travel
laptop, I followed this youtube tutorial, but I'm finding youtube tutorials
fly by too fast to catch the keyboard presses so I'm stuck at a point that
I need help to overcome. https://youtu.be/jKLBFddpTGI

There were some hurdles that I only found the solution to in the comments
(such as the Georeference plugin command not showing up initially), but I
think that tutorial "should" suffice but he moves too fast without
referencing what keyboard or commands he's activating.
(a) I loaded the OSM georeferenced map
(b) I loaded my PDF map which is not georeferenced yet
(c) I created a half dozen georeferenced common points on both maps
using the suggested transformation and coordinate system.

Where I'm stuck is at time point https://youtu.be/jKLBFddpTGI?t=660
I can't tell what he's using on each of the ten referenced points.

For me, those ten referenced points would be ten apartments so the step he
glossed over too quickly for me to catch is probably an important step.

No matter how many times I watch the video I can't figure out what he did.
But on my own, I saved the results at that time point any way that I could.

Now that I've run the georeference to create the *.qgs or *.qgz result, I
don't know what the next step is.

I tried loading the *.qgs or *.qgz result into OSMAnd+ but apparently
OSMAnd+ can't use local maps.

They keep talking about "shapefiles" but I don't know what that means.

When I loaded the results into Avenza, the current location was slightly
off the map so somehow the georeferencing is slightly off.

What I need is a TEXT (not video!) tutorial for QGIS 3.4 that shows how to
georeference a PDF or JPEG for use inside of a map app like Avenza.

I am already at the point where I created the GCPs.
But I am stuck at what I save and what I load into an Android map program.

Any explanation of what "Shapefiles" are used for in my application would
be useful. Also any explanation of what I have to save the file as to use
inside an Android navigation program would also be useful.

Bernd Rose

unread,
Oct 3, 2022, 12:06:45 PM10/3/22
to
On Mon, 3rd Oct 2022 13:48:07 -0000 (UTC), mark wrote:

> What I need is a TEXT (not video!) tutorial for QGIS 3.4 that shows how to
> georeference a PDF or JPEG

I linked you to one a week ago:
Message-ID: <1us8biu0...@b.rose.tmpbox.news.arcor.de>
| http://www.qgistutorials.com/en/docs/3/georeferencing_basics.html

A couple of days later, curmudgeon linked you to an advanced one, which
you probably should omit first, until you understood the basics.
Message-ID: <tgovv3$113f$1...@gioia.aioe.org>
http://www.qgistutorials.com/en/docs/3/advanced_georeferencing.html

Having said this, your image needs most likely georeferencing methods
from the advanced portfolio. But without the basics you'll probably
get lost in the advanced tutorial.

It is important to emphasize, that ground control points should be
clearly positionable. If you are unsure, whether a coordinate of your
image /really/ is identical to a point of an already georeferenced
map layer, choose another one. And try to wide-spread the ground
control points on the whole image. A couple of points with short
distances between each other will provide good coordinates just for
the included area. Everything outside will most likely deviate.

If the source image is not distorted, choose a simple transformation
algorithm (like linear), if possible. Higher level algorithms try to
correct distortion and are most likely to insert a distortion not
present in the original image.

> I am stuck at what I save and what I load into an Android map program.

You mentioned OSMAnd. This program will load points (for example a
point shape digitized on your georeferenced image) converted to Points
of Interest (POI). These can be selected as navigation target and can
carry a remarks field for additional information.

From your promiscuous OP I'm not sure, whether georeferencing really
/is/ the best approach for your needs.

You can add Open Street Map WMS layers to your map project:

https://wms.openstreetmap.de/wms?

and digitize your points on top of them as point shape or the like.
Or you can download parts of the OMS data for offline usage:

http://www.qgistutorials.com/en/docs/3/downloading_osm_data.html

Another way would be to create a map project with QGIS for use with
QField on a smartphone. Search for QField in the app store of your
smartphone or get binary packages from here:

https://github.com/opengisch/QField/releases

You can add map background data (OSM, aerials, topo maps, georeferenced
images, shapefiles,...) and digitize the points directly in the field
by adding points either manually or per GPS. Later on, you can re-import
the point shape to QGIS and export them to POI's for OSMAnd and the like.

Bernd

mark

unread,
Oct 3, 2022, 9:42:26 PM10/3/22
to
Bernd Rose <b.rose...@arcor.de> wrote:

>> What I need is a TEXT (not video!) tutorial for QGIS 3.4 that shows how to
>> georeference a PDF or JPEG
>
> I linked you to one a week ago:
> Message-ID: <1us8biu0...@b.rose.tmpbox.news.arcor.de>
>| http://www.qgistutorials.com/en/docs/3/georeferencing_basics.html

Yes. You did. And it failed. Miserably. Horribly so it failed.

Rest assured I tried EVERY SINGLE THING that good people suggested that
made sense, from Adobe Acrobat to QGIS.

The reason that tutorial you had suggested failed utterly miserably was
because of a few hurdles which have been surmounted since then... so I
should give it another chance.

But rest assured I tried it, but remember I had an immense problem
installing QGIS (which is so badly written that it doesn't even tell you
WHY it won't install when I told it to install onto the D drive).

I don't blame you because of their badly written installer - but it was a
hurdle that I had to overcome without any reason whatsoever given by the
badly written QGIS installer.

Then I ran into the badly written portable GIS installer, which was almost
as badly written as the QGIS installer in that it didn't say WHY it failed
but luckily it failed due to a set of missing DLLs which when reverse
traced, I guessed that they were needed for C++ but remember that was a
guess.

I had no idea if my guess was correct.
I had no idea which version of C++ it needed even if my guess was correct.

Luckily, it turned out that the C++ I installed worked but that wasn't the
end of the badly written tutorials in that the georeference menu DOES NOT
SHOW UP until you enable a plugin (the Georeference GDAL plugin).

The tutorial you pointed me to did NOT say that (as I recall), so it's a
badly written tutorial for a beginner. When I got to that point of the menu
not even existing, I gave up on the tutorial that you had referenced.

But please don't blame me for badly written tutorials & installers.

Most others would have given up long ago I suspect but I kept trying as I
know you are a respected posted (I looked at your posts in other threads,
some on the newsreader newsgroup where you're highly respected).

Now that I have surmounted most of those hurdles, none of which are covered
in the tutorials, I should be able to return to that tutorial as long as
the menus aren't too different from the version I have installed (QGIS
3.4).

>
> A couple of days later, curmudgeon linked you to an advanced one, which
> you probably should omit first, until you understood the basics.
> Message-ID: <tgovv3$113f$1...@gioia.aioe.org>
> http://www.qgistutorials.com/en/docs/3/advanced_georeferencing.html

I've been testing out EVERY suggestion, but as you noted, there's a steep
learning curve which hits the beginner in the badly written installers and
badly written tutorials that don't tell the beginner they have to load a
plugin in order to get the menu to show up and even then, the menu shows up
much later by magic (I still don't know what made it turn on).

But I do have the georeference menu now and I've used it and it seems to
work so I'd say I'm one half the way there to success.

A lot of the problem is I don't know what they want me to do, since all I
really want is a map of an apartment complex that I can route inside of
OSMand or inside of the Avenza or Paper Maps Android & iOS apps.

> Having said this, your image needs most likely georeferencing methods
> from the advanced portfolio. But without the basics you'll probably
> get lost in the advanced tutorial.

What is disturbing about all the tutorials so far is they skip important
steps (e.g., they skip that you have to load a plugin before the menus show
up).

>
> It is important to emphasize, that ground control points should be
> clearly positionable. If you are unsure, whether a coordinate of your
> image /really/ is identical to a point of an already georeferenced
> map layer, choose another one.

This may be the problem since I went through the mechanics to assign five
or six GCPs from the OSM map and my apartment complex map. I chose the
center of the pool and the corner of a building and the intersection of two
cross walks, etc.

I guess what you're saying, and if I guess wrong please correct me, I guess
you're saying some points are less reliable than others. So a reliable
point, for example, might be the center of an intersection more so than the
center of a pool. Is that what you're trying to warn me about?

> And try to wide-spread the ground
> control points on the whole image. A couple of points with short
> distances between each other will provide good coordinates just for
> the included area. Everything outside will most likely deviate.

I did try to pick a GCP on each corner of the apartment complex map and in
the middle where the pool was, but what I can easily do is add a dozen GCPs
since they're easily enough created.

My problem is what do I do AFTER I create the GCPs and run the georeference
command on the suggested transformation and datum?

What format do I save map in that OSMAnd and/or Avenza will read and allow
me to navigate on? And how do I save the apartment numbers on the map so
that I can route to them on foot?

>
> If the source image is not distorted, choose a simple transformation
> algorithm (like linear), if possible. Higher level algorithms try to
> correct distortion and are most likely to insert a distortion not
> present in the original image.

I did choose linear. I don't know enough to change it anyway so I'll use
whatever the transformation the tutorial suggests.

>
>> I am stuck at what I save and what I load into an Android map program.
>
> You mentioned OSMAnd. This program will load points (for example a
> point shape digitized on your georeferenced image) converted to Points
> of Interest (POI). These can be selected as navigation target and can
> carry a remarks field for additional information.

THANK YOU FOR THAT HINT. In the end I have to hand this map to other people
who will be using OSMAnd or Avenza to navigate around the apartment
complex.

If I can find a tutorial that does exactly that, I will be golden!

>
> From your promiscuous OP I'm not sure, whether georeferencing really
> /is/ the best approach for your needs.
>
> You can add Open Street Map WMS layers to your map project:
>
> https://wms.openstreetmap.de/wms?
>
> and digitize your points on top of them as point shape or the like.
> Or you can download parts of the OMS data for offline usage:
>
> http://www.qgistutorials.com/en/docs/3/downloading_osm_data.html

Hmmm... If there's another way, I need to explore it as I _tried_ to create
a LOCAL (custom) map in OSMAnd and failed.

If I could just create a local map that isn't on the Internet, I'd be fine
since OSMAnd has the apartment buildings & pool (Google Maps does not).

>
> Another way would be to create a map project with QGIS for use with
> QField on a smartphone. Search for QField in the app store of your
> smartphone or get binary packages from here:
>
> https://github.com/opengisch/QField/releases

I'm on Android but the others can be on iOS too.
I never heard of QField before so I thank you for that suggestion.
https://play.google.com/store/apps/details?id=ch.opengis.qfield

I installed it and it asked me to open a local file so I'll need to take
some time to figure out how it can help me route on foot in an apartment
complex.

>
> You can add map background data (OSM, aerials, topo maps, georeferenced
> images, shapefiles,...) and digitize the points directly in the field
> by adding points either manually or per GPS. Later on, you can re-import
> the point shape to QGIS and export them to POI's for OSMAnd and the like.

I'm not sure if I understand any of that yet but what I will do is continue
to try to find a tutorial that doesn't skip critical steps in walking a
noob through the steps of geofereferencing a apartment complex map (which I
think I have done but it's in a QGIS format currently called QGS and QGZ).

What I want is to use that output inside of OSMAnd or Avenza or Paper Maps
to route, on foot, from one apartment to another in the apartment complex.

mark

unread,
Oct 3, 2022, 10:00:53 PM10/3/22
to
Bernd Rose <b.rose...@arcor.de> wrote:

>> I wasn't able to get that OSM tile downloader to work on Windows 10.
>
> If you get QGIS up and running, you can embed OSM inside your maps and
> export OSM data to other formats, like shapefiles.

I was able to create shapefiles but I don't know what to do with them.

As I said in another post, I used the Firefox browser OSM web interface to

mark

unread,
Oct 3, 2022, 10:08:13 PM10/3/22
to
Bernd Rose <b.rose...@arcor.de> wrote:

> This "laptop" has less system resources than most smartphones.

The underpowered laptop was given to me when I last traveled.
I use it only to travel with as it's puny and it lasts a while on battery.

The main problem is the C drive is permanently 32GB.
QGIS refuses to install on the C drive but it won't tell you why.
QGIS refuses to install on the D drive too and also refuses to say why.
Even PGIS won't run QGIS at first but at least it errors out for a missing
set of DLLs which I reverse traced to C++ which when installed, made it
work.

So now everything is working but it took a few days elapsed time due to the
debugging that I had to do as nowhere does anyone warn me about what I ran
into so I had to be the first person to find all these things out before I
could get QGIS 3.4 Madeira working.

> It runs Windows in a protected (app-only) S mode.

It came as Windows S mode but it switched to Windows 10 Home easily.

> QGIS, OTOH, is a desktop program.
> You should be able to switch Windows from S-Mode to normal mode without
> additional costs. But beware, you are /not/ able to reverse this decision!

Don't worry. I don't want S mode. Nobody does.
QGIS is now working as a portable app.
That was a problem learning how to do that but I'm past that hurdle now.

> In normal Windows mode, some system protections are switched off, which
> leads to this "laptop" being not eligible for certain usage scenarios,
> anymore, like using it in educational exams.
>
> https://support.microsoft.com/en-us/windows/switching-out-of-s-mode-in-windows-4f56d9be-99ec-6983-119f-031bfb28a307
>
> Be this as it may: The "laptop" in addition does not meet QGIS minimum
> system requirements for RAM and the like. It /may/ be possible to install
> and use QGIS, nevertheless. But /if/ it does work, everything will be
> painfully slow. (GIS software is usually a domain of workstations and
> not mere pocket calculators...)

Yes. It's slow. But what I want to do is simple.
I just want to georeference a map of the apartment complex.
I'm almost done but I have a hurdle at the moment.

When I georeferenced it, the location was off by about 100 yards.
And I haven't been able to add the apartment complex POIs yet.

Without that I can't route to them in Avenza or whatever.

>> I found a portable GIS version 6 that installs onto a removable drive
> [...]
>> Do you think the tutorial will work with pgis instead?
>
> Why not? Portable GIS just copies a normal QGIS installation folder (and
> a lot more programs, you don't actually need for georeferencing images)
> and adjusts some path entries and the like.

The portable GIS is working fine, albeit it's slow due to the laptop.

And nobody tells you that there's a trick to getting the georeference menu
to show up (I'm still not sure exactly what I did to make it show up).

I did something with the "Georeference GDAL" plugin and then I punched
something else, and only after a while did the georeference menu show up (I
wish people would put that stuff in their tutorials since you only have to
do it once - but if you don't know to do it - you don't get the menu).

So it has been confusing to say the least but I'm on track as I have a
georeferenced map of the apartment complex but for some reason the location
is off by about a hundred yards.

Also I don't understand what a "shape" file is.
All I really want is a good tutorial that georeferences an image or PDF.

The only issue now is finding a proper written tutorial for QGIS 3.4
Madeira at this point, which doesn't skip all the steps a noob wouldn't
know.

curmudgeon

unread,
Oct 3, 2022, 10:13:06 PM10/3/22
to
mark wrote at Mon, 3 Oct 2022 05:03:18 -0000 (UTC) :

> The QGIS interface is so complex that I need to look for a newer tutorial.

You've invested so much into QGIS you should most likely keep going until
you succeed, but if you find the need to give up on QGIS, Ozi Explorer
works too for georeferencing map files on Windows 10 computers.

OziExplorer GPS Mapping Software which runs on your PC or laptop and will
work with Garmin, Magellan, Lowrance, Eagle, Brunton/Silva and MLR GPS
receivers for the upload/download of waypoints, routes and tracks and most
brand of GPS receivers for real time tracking of GPS position (Moving Map).
https://www.oziexplorer4.com/eng/oziexplorer.html

By some accounts Ozi Explorer is way better than QGIS but I can't speak for
either one based on my lack of personal experience.

Bernd Rose

unread,
Oct 4, 2022, 2:52:10 AM10/4/22
to
On Tue, 4rd Oct 2022 02:00:50 -0000 (UTC), mark wrote:

[OSM]
> I was able to create shapefiles but I don't know what to do with them.
[...]
> If anyone knows what to do next, please let me know.

Load them in QGIS as base map for georeferencing your image. You can use
any other georeferenced GIS data from the area in question. OSM is just
an obvious choice of free and usually fairly exact GIS data.

Bernd

Bernd Rose

unread,
Oct 4, 2022, 2:58:38 AM10/4/22
to
On Tue, 4rd Oct 2022 02:08:11 -0000 (UTC), mark wrote:

> When I georeferenced it, the location was off by about 100 yards.

Maybe a wrong projection setting. You need both, the QGIS map projection
(containing the georeferenced base map) and the georeferencer target
projection set to EPSG:4326 (WGS84), which is the standard projection
for OSM and GPS coordinates.

> And I haven't been able to add the apartment complex POIs yet.

You need to create an empty point layer (e.g. point shape) and digitize
the points into this layer. Afterwards, convert this point layer to POI.

> And nobody tells you that there's a trick to getting the georeference menu
> to show up (I'm still not sure exactly what I did to make it show up).
>
> I did something with the "Georeference GDAL" plugin and then I punched
> something else, and only after a while did the georeference menu show up (I
> wish people would put that stuff in their tutorials since you only have to
> do it once - but if you don't know to do it - you don't get the menu).

Nothing to do with GDAL /or/ plugins. After you set up the map containing
georeferenced layers in QGIS as base for getting the correct coordinates
for your to-be-georeferenced image, you select the <Georeferencer...> from
<Layer> menu. Then you load the image you whish to georeference into the
Georeferencer and adjust the settings (projection, transformation method),
if necessary.

In a next step you select the <Add Point> icon in the Georeferencer and
click in the image at one point you expect to /very correctly/ identify
on your base map in QGIS. Now a dialog opens, where you /could/ manually
enter the coordinates. Instead, you select <From map Canvas>. (While
auto-hide of the Georeferencer window is ticked on.)

Please note: To avoid the necessity for zooming and/or panning, it is a
good idea to zoom the base map to the whole extent of your image /before/
starting the Georeferencer.

Now you see the QGIS base map. Click there on the /exact/ position that
matches the position previously chosen in the Georeferencer. You get the
coordinates into the coordinate edit dialog window and close this with <OK>.
Now you have your first reference point. Proceed, until you have at least
4 points with low "residuals". Then you can execute <Start Georeferencing>.
Please note: 2 points would be enough for linear referencing. But you
don't get residuals calculated this way and therefore have no source of
possible error detection.

Bernd

Bernd Rose

unread,
Oct 4, 2022, 3:26:26 AM10/4/22
to
On Tue, 4rd Oct 2022 01:42:20 -0000 (UTC), mark wrote:

> But please don't blame me for badly written tutorials & installers.

The QGIS installer works just fine. Your "laptop" is simply unfit to host
such a complex GIS program. GIS is by default very resource hungry. If not
just applied to very trivial maps with only few objects, the calculations
(= computing power) and memory (= RAM, fixed storage) for correctly
positioning, attributing, and overlaying each and every vertex or pixel
are immens. (About a month ago I had a workstation running transformation
of a set of aerials for more than 10 days...)

Apart from this, I don't understand, why you still mutter about install
problems after you got this sorted out. Do you really think, we want to
read about your self-inflicted problems over and over again??

The tutorials you bad-mouth are fine. I guess, you just tried to apply
them directly to your usage case. You should have taken your time to
follow both tutorials step by step. (Ensuring, you understood each and
every point.) Afterwards, adjusting the knowledge to your usage scenario
would have been trouble-free.

[GCP selection]
> I guess what you're saying, and if I guess wrong please correct me, I guess
> you're saying some points are less reliable than others. So a reliable
> point, for example, might be the center of an intersection more so than the
> center of a pool. Is that what you're trying to warn me about?

Yes.

> I did try to pick a GCP on each corner of the apartment complex map and in
> the middle where the pool was, but what I can easily do is add a dozen GCPs
> since they're easily enough created.

Class is much more important than mass. And have a look at the "residuals"
values. Huge values indicate incorrect point identity between the image and
reality (aka your - hopefully correct - base map).

> My problem is what do I do AFTER I create the GCPs and run the georeference
> command on the suggested transformation and datum?
>
> What format do I save map in that OSMAnd and/or Avenza will read and allow
> me to navigate on? And how do I save the apartment numbers on the map so
> that I can route to them on foot?

You don't route the image. Instead you load your (now georeferenced) image
into the base map. It should show up in the correct position compared to
the already loaded layers in that base map. Now you create an additional
point layer (point shapefile) in your base map and "digitize" points into
that layers. You choose the point position according to the information of
the image. If the image contains no additional information compared to the
OSM (or other) base layers, the whole prior georeferencing process was
mood. You could have started without the image right away.

[Point shape to POI]
> THANK YOU FOR THAT HINT. In the end I have to hand this map to other people
> who will be using OSMAnd or Avenza to navigate around the apartment
> complex.
>
> If I can find a tutorial that does exactly that, I will be golden!

Right click on the point layer in the layer overview pane and choose
<Export>. Target format will be GPX, which can be imported to OSMAnd.

Bernd

Bernd Rose

unread,
Oct 4, 2022, 12:13:12 PM10/4/22
to
On Wed, 21rd Sep 2022 17:31:47 +0200, mark wrote:

I meant to address this from the beginning and unfortunately forgot while
reading through your very long OP:
> I'm surprised that OSMAnd+ doesn't have a "Save Current Location" option

Point positions can be saved in OSMAnd as markers by long clicking on any
point in the map:
https://osmand.net/docs/user/personal/markers

Zoom sufficiently deep into the map, beforehand, to ensure the required
accuracy. Label name (= info) and style can be adjusted in the AddMarker
dialog.

These markers can either be exported to a *.gpx file from MyPlaces menu:
Click on the icon with 3 linked dots and choose a file manager like
TotalCommander as target.

Alternatively, you can use Backup&Restore from the Settings menu. Select
"local backup -> save as file". Then open the MyPlaces drop-down list and
tick on Favorites. "Continue" and, again, select a file manager als target.
Now the *.gpx file will be saved inside a *.zip-file named *.osf. (Rename
it to *.zip, if you want to access the content with any *.zip browser.)
Alongside the *.gpx will be a *.json file with some additional info.

You have to check, whether my information for markers and favorites need
to be exchanged. (Especially wrt. exporting.) I use the German version of
OSMAnd and there seem to be translation issues, mixing both point features
up, sometimes...

mark

unread,
Oct 7, 2022, 10:37:25 PM10/7/22
to
Bernd Rose <b.rose...@arcor.de> wrote:

> I meant to address this from the beginning and unfortunately forgot while
> reading through your very long OP:
>> I'm surprised that OSMAnd+ doesn't have a "Save Current Location" option
>
> Point positions can be saved in OSMAnd as markers by long clicking on any
> point in the map:
> https://osmand.net/docs/user/personal/markers

I appreciate that you addressed the OSMAnd flaw given I mentioned it a few
times, and give other navigation programs have this basic feature that
OSMAnd lacks.


> Zoom sufficiently deep into the map, beforehand, to ensure the required
> accuracy. Label name (= info) and style can be adjusted in the AddMarker
> dialog.

As I said when I posted the flaw in OSMAnd that it can't save the current
position, there are always these workaround kluges, which I've been using.

> These markers can either be exported to a *.gpx file from MyPlaces menu:
> Click on the icon with 3 linked dots and choose a file manager like
> TotalCommander as target.

The flaw in OSMAnd is that you can't just save the current position.
You have to pick a point on the map. That's the flaw.
The current location saved is only as good as your fat finger is.

Other free nav programs have a menu selection to "Save Current Position."

> Alternatively, you can use Backup&Restore from the Settings menu. Select
> "local backup -> save as file". Then open the MyPlaces drop-down list and
> tick on Favorites. "Continue" and, again, select a file manager als target.
> Now the *.gpx file will be saved inside a *.zip-file named *.osf. (Rename
> it to *.zip, if you want to access the content with any *.zip browser.)
> Alongside the *.gpx will be a *.json file with some additional info.
>
> You have to check, whether my information for markers and favorites need
> to be exchanged. (Especially wrt. exporting.) I use the German version of
> OSMAnd and there seem to be translation issues, mixing both point features
> up, sometimes...

I appreciate your advice on saving a *.gpx file, and I also want to say
that I haven't had a chance yet to finish georeferencing apartment PDFs.

When I get around to it, I'll report back what happened and how.
I do appreciate your help as this georeferencing is a new language.

Bernd Rose

unread,
Oct 8, 2022, 1:57:26 AM10/8/22
to
On Sat, 8th Oct 2022 02:37:22 -0000 (UTC), mark wrote:

[Set OSMAnd position marker]
>> Zoom sufficiently deep into the map, beforehand, to ensure the required
>> accuracy. Label name (= info) and style can be adjusted in the AddMarker
>> dialog.
>
> As I said when I posted the flaw in OSMAnd that it can't save the current
> position, there are always these workaround kluges, which I've been using.
>
>> These markers can either be exported to a *.gpx file from MyPlaces menu:
>> Click on the icon with 3 linked dots and choose a file manager like
>> TotalCommander as target.
>
> The flaw in OSMAnd is that you can't just save the current position.
> You have to pick a point on the map. That's the flaw.
> The current location saved is only as good as your fat finger is.
>
> Other free nav programs have a menu selection to "Save Current Position."

I, myself, would always prefer to manually set the marker on the map with
a sufficiently deep zoom level. If the basis map is well enough, this
enables you to overcome uncertainties and inaccuracies from the current
GPS position by evaluating the position /and/ the map data against your
real surroundings. (The device running your OSMAnd will most likely have
just a consumer level GNSS with rather large average positioning error.)

Be this as it may: If you /really/ want the marker to be set on the current
GPS position (provided, an active GPS position is acquired at that moment),
you just need to long-press on the blue round GPS-center button on the
right bottom of the screen. This opens the MyPosition dialog, which shows
info about the current position. Apart from this, there is a star-icon
in the menu of this dialog, which enables you to set a marker exactly on
the current GPS location.

Bernd

mark

unread,
Oct 9, 2022, 3:54:38 PM10/9/22
to
Bernd Rose <b.rose...@arcor.de> wrote:

>> Other free nav programs have a menu selection to "Save Current Position."
>
> I, myself, would always prefer to manually set the marker on the map with
> a sufficiently deep zoom level.

My initial frustration was that I couldn't believe that OSMAnd didn't have
the basic ability to "Save current position" with a single button tap.

> If the basis map is well enough, this
> enables you to overcome uncertainties and inaccuracies from the current
> GPS position by evaluating the position /and/ the map data against your
> real surroundings. (The device running your OSMAnd will most likely have
> just a consumer level GNSS with rather large average positioning error.)

I agree without argument that zooming to save a position more accurately
(and then bouncing back up the levels) works OK and I would have used that
method as a workaround if I hadn't read your next sentence on long pressing
on the current location blue circle at the bottom right of the screen.

> Be this as it may: If you /really/ want the marker to be set on the current
> GPS position (provided, an active GPS position is acquired at that moment),
> you just need to long-press on the blue round GPS-center button on the
> right bottom of the screen.

OMG! Who knew! That's what I was looking for! It's a (hidden) "Save Current
Location" button. Right there on my screen. How did I miss that!

> This opens the MyPosition dialog, which shows
> info about the current position. Apart from this, there is a star-icon
> in the menu of this dialog, which enables you to set a marker exactly on
> the current GPS location.

That's EXACTLY what I was asking for!
How did you find it?

It's not intuitive (unless you already know it) that there is no specific
"Save current position" button, but it's easy to remember (once you know
it) that all you have to do to save the current position is long press on
the blue location icon at the bottom right of the OSMAnd screen!

I appreciate your advice as I've seen how you help people (mostly Dialog
users) on the newsreader group, and I appreciate your accuracy.

Thank you for finding that (hidden) solution to the "Save Current Location"
in OSMAnd, where I've still been working too hard lately on the apartment
project to complete the geolocation of the PDF maps.

What I will do is try to follow that first tutorial you referenced (even
though I think it's for an earlier version of QGIS) and I will write back
with the end result. As you're well aware, it takes a while because you
have to know a little bit about how QGIS and specifically how
georeferencing works in order to choose the correct switches and sequences
(which is why I was seeking a step by step tutorial).

mark

unread,
Oct 9, 2022, 3:59:24 PM10/9/22
to
mark <ma...@mark.edu> wrote:

> Once I find a given location, I've been using OSMand+ to save the current
> position. First off I'm surprised that OSMAnd+ doesn't have a "Save Current
> Location" option which I thought almost all map programs would have had.

To close the loop on this seemingly missing basic functionality to "Save
current location" without needing to zoom and fatfinger the spot, Bernd
Rose wrote the following about where OSMAnd put that (hidden) feature.

> > If you /really/ want the marker to be set on the current
> > GPS position (provided, an active GPS position is acquired at that moment),
> > you just need to long-press on the blue round GPS-center button on the
> > right bottom of the screen.

It's not intuitive to long press on the blue GPS-center button to get a
menu to save the current location, but once you know how, it works great.

Bernd Rose

unread,
Oct 10, 2022, 1:22:32 PM10/10/22