Place-n-Time map viewer

Mathematical tools, physics simulators, CAD, CNC, etc.
Message
Author
npierce
Posts: 858
Joined: Tue 29 Dec 2009, 01:40

Place-n-Time map viewer

#1 Post by npierce »

Puppy users in the USA who have an interest in maps may want to take Place-n-Time for a spin.

This application displays maps using data from the U. S. Geological Survey (USGS).

The data available doesn't provide for a general-purpose atlas with street names and such, like, for instance, Open Street Map data, but will be of interest for those who would like to examine an area as digitized by the Geological Survey in these early digital line graphs "DLGs".

The package includes sample files for learning how to use the application, and you may then download files covering your area of interest directly from the USGS. Also included is an illustrated user guide, which is recommended reading (and also available online: Place-n-Time User Guide).

Previous versions of Place-n-Time were only available in a .tar.gz package which included an installation script. It is still available in that form, but I thought I would add an .sfs package so that it could be easily loaded only when needed, and not take up space in a Puppy save file.

This is a beta version. Questions and comments are most welcome.

Download placentime_view-0.03-1.sfs from here: Place-n-Time Beta Download

In my next post I'll try to give a brief tutorial about getting around in the application.

npierce
Posts: 858
Joined: Tue 29 Dec 2009, 01:40

Subject: Place-n-Time

#2 Post by npierce »

Place-n-Time will open and display a sample large scale map: Hanover, New Hampshire, U.S.A.

When you move your pointer into the Work Window, you will note that the Coordinate Box at the lower left will display two forms of coordinates: Northings & Eastings and Latitude & Longitude.

As you move your pointer over the map surface you will also note that the state, county, and town are shown in the Location Box at the lower right.

Pointing at objects will highlight them. If you point at a line, the length of the line will be displayed in the Status Box at the bottom. (Lengths won't be displayed for maps with a non-linear coordinate system.)

To zoom in, point to a northern corner of your area of interest, then hold the left pointer button as you move the pointer across and down to the opposite corner before releasing the button. To zoom out, do the same thing, but start from a southern corner.

To move the map surface, grab it with the middle pointer button.

To load an intermediate scale map for the same area, place the pointer anywhere on the surface of the current map and press or click the right button, then choose "Load Intermediate Scale" from the popup menu.

You can, of course, load small, intermediate, or large scale maps by choosing the appropriate item from the right-button menu.

Once you download a collection of maps, you may also use this method to load maps for areas surrounding the original map surface.

Don't be confused by the Open entry in the File menu. That is for loading .shp and .gchar files created by another application, not the USGS files. The USGS files are always loaded with the right-button menu.

For more details see Getting Around in the user guide.

In my next post I'll try to explain how to download map data.

npierce
Posts: 858
Joined: Tue 29 Dec 2009, 01:40

Place-n-Time map viewer

#3 Post by npierce »

To obtain map data from the USGS, go to http://earthexplorer.usgs.gov/.

There you will find a four-step process:

1. Enter Search Criteria
2. Select Your Data Set(s)
3. Additional Criteria (Optional)
4. Search Results

In step 1 you may enter an address/placename or set of coordinates, or you may simply zoom in and click on the map displayed. (If you choose to enter an address/placename, be sure to then click on Show and select an entry from the list that appears.) Then click Data Sets to go to step 2.

In step 2 you should click on Digital Line Graphs, then click on the check box for DLG 1:100k if you want intermediate scale or click on the check box for DLG Large Scale if that is what you want. Then click Additional Criteria to go to step 3.

In step 3 you should choose one or more items from the Overlay ID or Product Group list. (Which list appears depends upon your selection in step 2.) (To select more than one item, hold your Ctrl key while clicking.) Place-N-Time currently supports the following items:

Overlay ID
Boundaries
Hydrography
Transportation

Product Group
7.5-MIN DLG Bound
7.5-MIN DLG Hydro
7.5-MIN DLG Trans

Then click Results to go to step 4.

In step 4 you will see a list of files that matched your criteria. There are buttons below each file in the list which let you see the map footprint, examine its metadata, or download it. (It does ask you to log in to download.)

(Note that some maps have been split into pieces, but the footprint displayed is for the entire map. In such cases you will need to download multiple files to cover the entire footprint.)

For additional information on how to get DLG map data and GNIS placename data, look here: DLG and here: GNIS.

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#4 Post by Karl Godt »

dl http://www.dappermapper.com/products/pl ... 0.03-1.sfs
while running full installation of Puppy 4series glibc-2.6.1
and wanted to copy it into sandbox /opt/placeandtime :
PATH to /usr/local seems to be hardcoded into it , but no complaints about glibc too low :D
Will report next days on it !

npierce
Posts: 858
Joined: Tue 29 Dec 2009, 01:40

#5 Post by npierce »

Hi Karl,

Thanks for trying this out. :D
Karl Godt wrote:. . . but no complaints about glibc too low :D
Yes, Place-n-Time is not very demanding when it comes to dependencies. I'm a believer in using the minimum libraries necessary to do the job, rather than require the installation of a lot of new libraries. Official Puppies from 4.3.1 and newer should already have the necessary dependencies. I think this build of Place-n-Time will run with any glibc version 2.3 or higher. (The other package (the .tar.gz) has a build that will actually run with glibc 2.1.1 and gtk 1.2 with a 2.0.36 kernel. We're talking backward compatibility to 1999!)

Happy testing! I'll look forward to hearing how it works (or doesn't) for you.

Norm

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#6 Post by Karl Godt »

Hmmm... First start heavy on the cpu . xosview showed a lot of RAM , SWAP and PAGE movement .
The terminal showed a never ending loop of
Error allocating memory for <nad_file_list>.
:?:

Jasper

#7 Post by Jasper »

Hi npierce,

I will try using Precise 5.6 with 597 MB available RAM (without a swap facility) and will report back tomorrow by editing here.

My regards

Results:

I followed the instructions and all my tests went impressively fast and well (except for a change of location - perhaps because I did not Log on).

After closing my browser/above help, RAM used was about 50 MB and CPU % ranged from frequent single figures to a rare 73%.
Last edited by Jasper on Fri 30 Aug 2013, 10:34, edited 2 times in total.

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#8 Post by amigo »

Are the sources for that not available?

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#9 Post by Karl Godt »

Have installed it correctly by

Code: Select all

cp -a --remove-destination /mnt/placentime_view-0.03-1.sfs.26748/* /
which made it necessary to remove the links from /usr/local/share/* into my /opt/placeandtime folder manually , because --remove-destination did not work as expected .

No dice .

Xorg driver is i810 btw .
Since I thought it would be kind of similar to googeearth, which needs Mesa/GL driver activated by Xorg , I ldd 'ed it , but no reference to mesa or any libGLUT* or whatsoever .

Code: Select all

bash-3.00# ldd `which placentime_view` |sort
	libatk-1.0.so.0 => /usr/lib/libatk-1.0.so.0 (0xb774b000)
	libcairo.so.2 => /usr/lib/libcairo.so.2 (0xb76e1000)
	libc.so.6 => /lib/libc.so.6 (0xb781b000)
	libdl.so.2 => /lib/libdl.so.2 (0xb755b000)
	libexpat.so.1 => /usr/lib/libexpat.so.1 (0xb7563000)
	libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0xb75ec000)
	libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb758e000)
	libgdk_pixbuf-2.0.so.0 => /usr/lib/libgdk_pixbuf-2.0.so.0 (0xb7778000)
	libgdk-x11-2.0.so.0 => /usr/lib/libgdk-x11-2.0.so.0 (0xb7b94000)
	libgio-2.0.so.0 => /usr/lib/libgio-2.0.so.0 (0xb763c000)
	libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0xb7ae6000)
	libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0xb7560000)
	libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0xb77a2000)
	libgtk-x11-2.0.so.0 => /usr/lib/libgtk-x11-2.0.so.0 (0xb7c1c000)
	libICE.so.6 => /usr/X11R7/lib/libICE.so.6 (0xb7511000)
	/lib/ld-linux.so.2 (0xb7f9a000)
	libm.so.6 => /lib/libm.so.6 (0xb7917000)
	libpango-1.0.so.0 => /usr/lib/libpango-1.0.so.0 (0xb77dc000)
	libpangocairo-1.0.so.0 => /usr/lib/libpangocairo-1.0.so.0 (0xb776e000)
	libpangoft2-1.0.so.0 => /usr/lib/libpangoft2-1.0.so.0 (0xb7612000)
	libpcre.so.0 => /usr/lib/libpcre.so.0 (0xb752c000)
	libpixman-1.so.0 => /usr/lib/libpixman-1.so.0 (0xb76ab000)
	libpng12.so.0 => /usr/lib/libpng12.so.0 (0xb7939000)
	libSM.so.6 => /usr/X11R7/lib/libSM.so.6 (0xb7525000)
	libX11.so.6 => /usr/lib/libX11.so.6 (0xb7969000)
	libXau.so.6 => /usr/lib/libXau.so.6 (0xb76a1000)
	libXaw.so.7 => /usr/lib/libXaw.so.7 (0xb7a9c000)
	libXcomposite.so.1 => /usr/lib/libXcomposite.so.1 (0xb776b000)
	libXcursor.so.1 => /usr/lib/libXcursor.so.1 (0xb778f000)
	libXdamage.so.1 => /usr/lib/libXdamage.so.1 (0xb7768000)
	libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb769c000)
	libXext.so.6 => /usr/lib/libXext.so.6 (0xb7a7d000)
	libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0xb7764000)
	libXinerama.so.1 => /usr/lib/libXinerama.so.1 (0xb779f000)
	libXi.so.6 => /usr/lib/libXi.so.6 (0xb7797000)
	libXmu.so.6 => /usr/lib/libXmu.so.6 (0xb7a8a000)
	libXpm.so.4 => /usr/lib/libXpm.so.4 (0xb795c000)
	libXrender.so.1 => /usr/lib/libXrender.so.1 (0xb76a4000)
	libXt.so.6 => /usr/lib/libXt.so.6 (0xb7a3a000)
	libz.so.1 => /lib/libz.so.1 (0xb757f000)
	linux-gate.so.1 =>  (0xb7f99000)
EDIT:

Code: Select all

bash-3.00# free
             total         used         free       shared      buffers
Mem:       1017404       342676       674728            0         9928
-/+ buffers:             332748       684656
Swap:     12136984       180808     11956176
1GB RAM and 12GB SWAP : 3Swap a 4GB .

npierce
Posts: 858
Joined: Tue 29 Dec 2009, 01:40

#10 Post by npierce »

Karl,

Thanks for the feedback. I'm sorry to hear that Place-n-Time has been uncooperative for you.
Karl Godt wrote:The terminal showed a never ending loop of
Error allocating memory for <nad_file_list>.
I've been looking into this. I've even tried running in Puppy 4.3.1. While I have not been able to reproduce the same error message, I think that probably the lookup_nad file got corrupted. It lives in the /usr/local/share/placentime/essential/ directory.

If I corrupt my copy I see that the application does go into a loop and starts eating memory, although I never get the error message that you did.

I probably should post the md5sum for the the package. Here it is:

6ea653f5b0cf2da53cfce4225752657c placentime_view-0.03-1.sfs

Also, here is the md5sum for the lookup_nad file:

5094d948800a51a6712ae623a921617f lookup_nad

While I am hoping that replacing your copy of the file will solve that problem for you, you have discovered something that I should fix, since a corrupt data file should cause the application to exit gracefully, and certainly not cause it to start gobbling memory.


While I had anticipated that most people would simply install the package and run it as is, it should be possible to place the files elsewhere in your directory tree if you so desire.

To install Place-n-Time into your /opt/ directory, you will need to edit the /etc/placentimerc.first file. That is the configuration file that tells placentime were everything lives. It is currently configured for the places where things live in the .sfs file.

You can probably figure out what you have to change just by looking at the file, but for details see Editing Run Control Files in the user guide.

The /etc/placentimerc.first is one file that cannot be relocated. You can also have a $HOME/.placentime/placentimerc file which has the same format, and will override settings in the /etc/placentimerc.first file. In fact, if you don't want to add anything to your /etc/ directory, you can simply:

Code: Select all

mkdir $HOME/.placentime
# mv /etc/placentimerc.first $HOME/.placentime/placentimerc
You will need at least one of those two files.


As you have discovered, there is no need for Mesa/GL.


Thanks again for taking the time to look at this. :)


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Jasper,


Thanks for trying this out and for the feedback about speed, memory, and CPU use. :)

I'm glad that you didn't run into the problems that Karl did.
Jasper wrote:. . . (except for a change of location - perhaps because I did not Log on).
Do you mean when trying to download map data?


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

amigo,

No, not yet.

Jasper

#11 Post by Jasper »

Hi again npierce,

You asked:
Do you mean when trying to download map data?
Yes is my answer.

My regards

npierce
Posts: 858
Joined: Tue 29 Dec 2009, 01:40

#12 Post by npierce »

Jasper,

If you like, you can try an alternative method, as explained here: DLG

I'm sorry to say that there is no data for Great Britain, only for the North American colonies. :)

Jasper

#13 Post by Jasper »

Hi npierce,

Understood, US only. However, since Karl is in Europe and you were pleased he had tried “it

npierce
Posts: 858
Joined: Tue 29 Dec 2009, 01:40

#14 Post by npierce »

Hi Jasper,

Yes, I'm happy for anyone to try Place-n-Time. And I much appreciate that you both took the time to do so. Thanks.

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#15 Post by Karl Godt »

Hi Norman !

bash-3.00# md5sum /root/placentime_view-0.03-1.sfs
6ea653f5b0cf2da53cfce4225752657c /root/placentime_view-0.03-1.sfs

bash-3.00# md5sum /usr/local/share/placentime/essential/lookup_nad
5094d948800a51a6712ae623a921617f /usr/local/share/placentime/essential/lookup_nad

seems to be OK .

It might be caused by recompiled libraries on my side too . Until now I could not notice any problems with other programs though .

What I should probably mention :
Am throttled down to analog speed until the day after tomorrow and have a wget running in another case since more than 24 hours in another terminal .
I hope that lack of a current available reasonable speed or lack of any internet connection nor firewall issues do not choke some features of the program .

npierce
Posts: 858
Joined: Tue 29 Dec 2009, 01:40

#16 Post by npierce »

Hi Karl,

Assuming that you are still getting "Error allocating memory for <nad_file_list>", I have an idea.

Although I am still puzzled by that error (since your lookup_nad file seems to be good), I have a work-around that might get Place-n-Time to run for you. If that works, we can get back to this error later.

The work-around is to rename lookup_nad so that the application can't find it. It should then give you this message when started from a terminal, and keep running:

Code: Select all

Couldn't open lookup file: /usr/local/share/placentime/essential/lookup_nad.
(or something similar if you have modified placentimerc.first).

The reason that this might work for you (and does for me) is that the "nad_file_list" is currently only used to transform the coordinates in GNIS files that use a different horizontal datum than that used by the DLG files. But the sample GNIS files included in the package use the same datum as the DLG files. (The same is true of all the GNIS files available here: GNIS)

In theory, and in this version of Place-n-Time, hiding that file might only be a problem if you got a GNIS file form a different source. I could be wrong.

Anyway, it would be worth trying.

Karl Godt wrote:It might be caused by recompiled libraries on my side too .
Yes, possibly. If so we may run into further problems even with the above work-around. We'll see.

Karl Godt wrote:I hope that lack of a current available reasonable speed or lack of any internet connection nor firewall issues do not choke some features of the program .
That shouldn't be a problem. When simply looking at the USGS DLG files it never goes to the Internet for anything. It just uses the sample files and any files that you have manually downloaded.

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#17 Post by Karl Godt »

[quote]Understood, US only. However, since Karl is in Europe and you were pleased he had tried “it

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#18 Post by Karl Godt »

OK Norman :

I renamed that file to *-out and the whole thing at least now opened a white window but without any content but searching at the bottom . Also the memory and cpu usage wasn't that much any more .

I ran it with the renamed file
1: strace placentime_view 2>placentime_view.ste

and renamed the file to its original name again
2 : strace placentime_view 2>placentime_view.02.ste

Attached :
Both strace text files real .tar.bz2 and screenshots
Pics are 1920x1080 reduced to 15color .gif to reduce size to be able to upload , hopefully showing a little since the mtpaitsnapshot took several seconds second time to find cpu to be processed :

[ Hmmm ... strace files showed a lot of locale hints .. so lookup_nad might need to use comma instead of colon in my locale :

bash-3.00# locale
LANG=C
LC_CTYPE=de_DE.utf8
LC_NUMERIC=de_DE.utf8
LC_TIME=de_DE.utf8
LC_COLLATE=en_US
LC_MONETARY=de_DE.utf8
LC_MESSAGES=de_DE.utf8
LC_PAPER=de_DE.utf8
LC_NAME=de_DE.utf8
LC_ADDRESS=de_DE.utf8
LC_TELEPHONE=de_DE.utf8
LC_MEASUREMENT=de_DE.utf8
LC_IDENTIFICATION=de_DE.utf8
LC_ALL=

]
Attachments
placentime_debug-krg-2013-08-29.tar.bz2
both strace text files
(65.56 KiB) Downloaded 428 times
placentime_view-wo-lookup_nad.gif
without lookup_nad
(132.51 KiB) Downloaded 518 times
placentime_view-normal.gif
with lookup_nad
(170.19 KiB) Downloaded 523 times

npierce
Posts: 858
Joined: Tue 29 Dec 2009, 01:40

#19 Post by npierce »

Karl,

This is excellent feedback that you have provided. :D

The strace logs and the screenshots were very helpful.

As you may have noticed, the strace log made when lookup_nad was available shows that placentime_view reads only the first line of that file, then endlessly starts allocating more memory. It never even advances to the second line of the file. The first line was enough to confuse it.

Similarly, the strace log made when lookup_nad was hidden shows that placentime_view reads the first line of /usr/local/share/usgs/dlg24/lookup, then it gets stuck. (That file is used by placentime_view to look up the name of the file containing the map data for a given latitude and longitude.)

It both cases it is reading floating-point numbers, so the problem, just as you suggested it might be, is related to the locale. The files use a . for a decimal point, but since the locale was de_DE.utf8 it was expecting a , to be used.

You are good!

Once I changed my locale to de_DE.utf8, I started to get the symptoms that you did.

So I'll have to teach placentime_view that it should expect a . for a decimal point in these files, no matter what the locale happens to be. In the meantime, the work-around is of course:

Code: Select all

LANG=C placentime_view
or even:

Code: Select all

LC_NUMERIC=C placentime_view
Bugs like this are just the type that I am hoping to uncover -- stuff I never thought to test for myself.

Many thanks.

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

works with LC_NUMERIC=C

#20 Post by Karl Godt »

Code: Select all

bash-3.00# export LC_NUMERIC=C
bash-3.00# locale
LANG=C
LC_CTYPE=de_DE.utf8
LC_NUMERIC=C
LC_TIME=de_DE.utf8
LC_COLLATE=en_US
LC_MONETARY=de_DE.utf8
LC_MESSAGES=de_DE.utf8
LC_PAPER=de_DE.utf8
LC_NAME=de_DE.utf8
LC_ADDRESS=de_DE.utf8
LC_TELEPHONE=de_DE.utf8
LC_MEASUREMENT=de_DE.utf8
LC_IDENTIFICATION=de_DE.utf8
LC_ALL=
bash-3.00# placentime_view 

placentime, rev 0.03, 2012-May-19
Copyright 2012 Dapper Mapper
All Rights Reserved
:D :idea:
Attachments
placentime_LC_NUMERIC_C.gif
(32.12 KiB) Downloaded 286 times

Post Reply