No Disconnect

Things I’d rather not forget

Further Arabic Unicode Lessons

leave a comment »

Machine-readable information about Arabic shaping (i.e., information about which characters join and which do not) is available in Unicode’s ArabicShaping.txt file. This file includes entries for characters outside of the Unicode Arabic ranges, including glyphs from Hebrew and Syriac.

The ArabicShaping.txt feature “Joining_Group” seems, approximately, to mean “shape.” These are glyphs with similar shapes, which differ by diacritics.

There are 29 joining groups, of which 8 are non-right-joining. So there are 232 combinations of sequences of groups where the first (right) glyph is non-right-joining. Further information about the joining groups.

  • There are three heh-related singleton groups: HEH (0647), HEH GOAL (06C1,06C2–the latter being a ligature), and HAMZA ON HEH GOAL (06C3).
  • No_Joining_Group symbols simply don’t connect.
  • The singleton group SWASH KAF (06AA) comes with no explanation.
  • Others groups are intuitive.

Scheherezade is missing these Unicode 5.1 glyphs: 0608, 063B, 063C, 063D, 063E, 063F, 076E, 076F, 0770, 0771, 0772, 0773, 0774, 0775, 0776, 0777, 0778, 0779, 077A, 077B, 077C, 077D, 077E, 077F

Written by nodisconnect

September 14, 2009 at 3:13 am

Posted in Unicode

Arabic Unicode Summary

leave a comment »

There are only two blocks that the Unicode standard (5.1) recommends be used for Arabic script: U+0600 though U+06FF and U+0750 through U+077F. The former block is the basic character set; the latter is an extended set.

Two other blocks, U+FB50 through U+FC3F and U+FE70 through U+FEFF, are “presentation forms” that are included for compatibility with previous standards. The Unicode standard does not recommend using those codepoints.

In the Unicode Standard book (available for 5.0), Chapter 2 is a useful overview. Chapter 8 has details about Arabic script.

SIL Scheherazade supports almost everything in the Unicode 4.1 standard. From Unicode 4.1 to Unicode 5.0, there were no changes to the Arabic blocks. From Unicode 5.0 to 5.1, there were apparently about a few dozen characters added. No idea whether any currently-available font includes all of these shapes.

Written by nodisconnect

July 22, 2009 at 9:08 pm

Posted in Unicode

Wilberforce

leave a comment »

It were almost a waste of time to multiply arguments in order to prove how criminal the voluntary ignorance, of which we have been speaking, must appear in the sight of God. It must be confessed by all who believe that we are accountable creatures, and to such only the writer is addressing himself, that we shall have to answer hereafter to the Almighty for all the means and occasions we have here enjoyed of improving ourselves, or of promoting the happiness of others. And if, when summoned to give an account of our stewardship, we shall be called upon to answer for the use which we have made of our bodily organs, and of the means of relieving the wants and necessities of our fellow creatures; how much more for the exercise of the nobler and more exalted faculties of our nature, of invention, and judgment, and memory; and for our employment of all the instruments and opportunities of diligent application, and serious reflection, and honest decision. And to what subject might we in all reason be expected to apply more earnestly, than to that wherein our eternal interests are at issue? When God has of his goodness vouchsafed to grant us such abundant means of instruction in that which we are most concerned to know, how great must be the guilt, and how aweful the punishment of voluntary ignorance!

And why, it may be asked, are we in this pursuit alone to expect knowledge without inquiry, and success without endeavour? The whole analogy of nature inculcates on us a different lesson, and our own judgments in matters of temporal interests and worldly policy confirm the truth of her suggestions. Bountiful as is the hand of Providence, its gifts are not so bestowed as to seduce us into indolence, but to rouse us to exertion; and no one expects to attain to the height of learning, or arts, or power, or wealth, or military glory, without vigorous resolution, and strenuous diligence, and steady perseverance. Yet we expect to be Christians without labour, study, or inquiry. This is the more preposterous, because Christianity, being a revelation from God, and not the invention of man, discovering to us new relations, with their correspondent duties; containing also doctrines, and motives, and practical principles, and rules, peculiar to itself, and almost as new in their nature as supreme in their excellence, we cannot reasonably expect to become proficients in it by the accidental intercourses of life, as one might learn insensibly the maxims of worldly policy, or a scheme of mere morals.

A Practical View of the Prevailing Religious System of Professed Christians, in the Middle and Higher Classes in this Country, Contrasted with Real Christianity.

Written by nodisconnect

July 5, 2009 at 7:55 pm

Posted in Books

Steps for making the contour maps in GPSmapedit

leave a comment »

  1. Add all layers at once. Add to level 0.
  2. Properties
    1. add a map ID, add a map name, convert to meters
  3. Levels Tabl
    1. add up to Level5
    2. make Zoom0=0 … Zoom5=5
    3. make “Bits” descending
  4. Select minor contours, right-click, Join Objects
  5. Extend to level 1 (i.e., GPS Zoom 200 m – 300 m)
  6. Select intermediate contours, right-click, Join Objects
  7. Extend to level 3 (i.e., GPS Zoom 800 m – 1200 m)
  8. Select major contours, right-click, Join Objects
  9. Extend to level 5 (i.e., GPS Zoom 1200 km)

Written by nodisconnect

July 2, 2009 at 5:28 am

Posted in Cartography, GIS

Making good contour maps

leave a comment »

One strategy is to run gdal_contour several times, to generate the three levels of contour that Garmin accepts: major, intermediate, and minor. [Update: this seems to be the only strategy.] Unfortunately Garmin doesn’t auto-simplify contours automatically, so it will be necessary to decide at what level which contours are eliminated. Awkward, since there are high-relief locations as well as low-relief.

Which contour intervals to use? In the 7.5 minute maps, the USGS uses 40-foot minor intervals, with an annotated major interval every 5 contours (such that the values are in multiples of 200). (Incidentally their maps can be downloaded, at screen-appropriate resolution, for free.) 40 feet is 12.19200 meters. So we could start with 10 meters and annotate every 50, to parallel the USGS approach. Here is some GMT code to test these parameters out on the Catalina Mountains, the only mountains I really have a feel for:

grdcut /GIS/srtm/srtm_14_06.grd -G/GIS/srtm/catalinas.grd -R-110.875/-110.75/32.25/32.375
grdimage /GIS/srtm/catalinas.grd -R-110.875/-110.75/32.25/32.375 -JM7i -B0.5 -Cmyglobe_land.cpt -P -V -K > catalinas.ps
grdcontour /GIS/srtm/catalinas.grd -R-110.875/-110.75/32.25/32.375 -JM -C10 -A50 -B0.5 -S10 -O -P -K >> catalinas.ps

There are obviously some artifacts from the 90-meter resolution, but on the whole this looks and feels right. (The SRTM data also come in 30-meter resolution for the U.S., but since I am interested primarily in overseas maps, I have used the 90-meter resolution here.)

Improvement: the lines looked much better when resampled to 30-meter resolution, and redid the contours. [Again, kind of silly for a U.S. sample.]

grdsample /GIS/srtm/catalinas.grd -G/GIS/srtm/catalinas_1c.grd -I1c
grdimage /GIS/srtm/catalinas_1c.grd -R-110.875/-110.75/32.25/32.375 -JM7i -B0.5 -Cmyglobe_land.cpt -P -V -K > catalinas.ps
grdcontour /GIS/srtm/catalinas_1c.grd -R-110.875/-110.75/32.25/32.375 -JM -C10 -A50 -B0.5 -S10 -O -P -K >> catalinas.ps

Also, here is a commitment on which lines are which in the Garmin map: 10-meter Minor, 50-meter Intermediate, 250-meter Major.

Written by nodisconnect

June 29, 2009 at 1:17 pm

Posted in Uncategorized

The Grail: my own topo maps into my Garmin

leave a comment »

Well, this took long enough.

Broad Strokes

  1. Data from the Shuttle Radar Topography Mission (best taken from CGIAR).
  2. Use GDAL (gdal_translate) to convert to GMT’s .grd format.
  3. Use GMT’s grdcut to cut out a region of interest.
  4. Use GDAL (gdal_contour) to create a contour map, in ESRI Shapefile format.
  5. Open GPSMapEdit, import said Shapefile, tweak environment parameters extensively. Save as Polish-format .mp file; export as Garmin .img file.
  6. Use MapSetToolKit to install the .img file as a map that MapSource can see.
  7. Use MapSource to send the file to the GPS.

Tricky Bits

  • Steps 1 – 4 are pain-free.
  • Step 2
    • File | Import | Shapefile. In the “From field” tab the labels must be clicked on, for some reason. Click. Click. Make sure the datum and coordinate system are correct.
    • Under File | Map Properties. Enter a unique 8-digit numeric key in “ID.” Give the map a name.
    • Tricky things to do under the “Levels” tab:
      • A “level” is a zoom level. Level0 is the most detailed; Level8 or so the least detailed. Map objects will only be visible at levels for which are not specified, or for levels that are not specified.
      • So, add as many levels, plus one, as you want your map to be visible in. The last level must be blank.
      • Moreover, in the “Bits” field of the “Level Settings” dialog box, starting from Level0, each successive level must use fewer bits than the one above it.
    • Close out the “Map Properties” dialog.
    • Select all of the contours. Right click. Modify | Extend All Elements up to Level — and enter in the number of levels minus 1. (The highest-level level must be empty.)
  • Step 7. Described here.

Remaining Work

  1. Figuring out what contour intervals are appropriate for which zoom levels.
  2. Making it look better.

Credit/help/inspiration: here and here.

Written by nodisconnect

June 29, 2009 at 12:00 pm

Posted in Cartography, GIS

How MapSource works

with one comment

Copying a map to my Garmin should be as easy as copying an MP3 to my MP3 player. Here’s how it really works:

There are things called “mapsets” — Garmin products, or pretend Garmin products. (Information about mapsets is stored in the computer registry, so of course people have figured out how to fake the format. This is what MapSetToolkit does; you give it an .img file, and it fakes out Mapsource into thinking that your .img file is a real Garmin product.)

The idea behind MapSource is that you’re working with a “Garmin GPS Database.” What’s in the database is what’s in the panel at the left of the screen. Not every map in every mapset is in the database. This was confusing when I was trying to transfer maps to the Garmin. How does one add a map to the database?

  1. Select the desired mapset with the “Select the desired product” drop-down at the upper left corner.
  2. Make sure the “Map Tool” button is checked. (Inexplicably the symbol is a yellow polygon.)
  3. Click the map you want to add in the map window.

Thereafter it’s a simple matter of, Do Transfer | Send to device…. The really surprising thing is that you have to select all of the products you want to send to the device, visually. (For such a slick device the software is not great.)

Written by nodisconnect

June 29, 2009 at 11:21 am

Posted in Cartography, GIS

More MacDonald

leave a comment »

Penultimate sentence of Phantastes.

What we call evil, is the only and best shape, which, for the person and his condition at the time, could be assumed by the best good.

Wow, have to think through the implications of that one…

Written by nodisconnect

June 28, 2009 at 3:26 am

Posted in Uncategorized

From a spreadsheet to GPS

leave a comment »

Whew. Herculean task. Starting from a spreadsheet with labels, latitudes, and longitudes…

  1. Convert the spreadsheet to a CSV file.
  2. Convert the CSV to a vanilla XML-style record using something like this.
  3. Convert the vanilla XML to KML using a simple XSLT stylesheet.
  4. Convert KML to GPX using GPSBabel.
  5. GPX goes into MapSource; MapSource sends it to the GPS.

Steps 2 or 3 are a bit schematic. Oh well; it’s just a matter of looking up an example KML file, like the one Google provides, to be able to write the XSLT file. I suppose it would also be possible to go straight to KML (or GPX, for that matter).

Okay, I just checked, and GPX has a really straightforward format.

Whatever. With GIS & GPS, if it doesn’t take you five steps, through three formats, one of them proprietary/undocumented, you’re not doing it properly.

Written by nodisconnect

June 21, 2009 at 12:18 pm

Posted in GIS

George MacDonald Quotes

leave a comment »

Instead of so knowing Christ that they have Him in them saving them, they lie wasting themselves in soul-sickening self-examination as to whether they are believers, whether they are really trusting in the Atonement, whether they are truly sorry for their sins — the way to madness of the brain and despair of the heart… Instead of asking yourself whether you believe or not, ask yourself whether you have, this day, done one thing because He said, Do it! or once abstained because He said, Do not do it! It is simply absurd to say you believe, or even want to believe, in Him, if you do not do anything He tells you.

When I trouble myself over a trifle, even a trifle confessed — the loss of some little article, say — spurring my memory, and hunting the house, not from immediate need, but from dislike of loss; when a book has been borrowed of me and is not returned, and I have forgotten the borrower; and fret over the missing volume, … is it not time that I lost a few things, when I care for them so unreasonably?

Written by nodisconnect

June 21, 2009 at 12:08 pm

Posted in Books