|
Writing a test webpage | Text editors | Webpage protocols | Exporting maps for web display Your FREC480 projects are to be published as a website portfolio on UD's copland.udel.edu UNIX server. Web pages are written with HTML (HyperText Markup Language) tags that are summarized on the quick and dirty HTML reference page and explained in detail on Mad Dog's website. You may use copland's Pico text editor to create and edit your webpages; alternately, you can use the Notepad text editor on your PC, and then transfer your HTML files to copland. Either way, you will have to learn some basic UNIX. I created a quick and dirty UNIX reference summarizing the most basic commands, and a longer UNIX summary that you can check out later on. Initial setup Use SSH Secure Shell to log into copland.udel.edu using your UD mail login and password. After you log in, you are looking at a command-line prompt. You are in your home directory. (In UNIX, you are always "in" some directory; type pwd at the UNIX prompt to see what directory you're in.) Your website will occupy a specially-named sub-directory (folder) of your home directory called public_html (with the underscore character). Type ls at the UNIX prompt to list the contents of your current directory. You should see public_html listed. The directory tree structure of your website will be similar to the diagram below. Each directory (underlined) contains text files, image files, etc. Only the red portion of the directory tree is accessible to client browsers. /home/usra/64/25640 (your UNIX home directory)
| | other.files, not.web, ...
otherdirectory |
more.files, not.web... public_html (top-level website directory)
| | index.html (your personal home page), mydoggie.jpg,...
| |
mexicotrip frec480
drunk.jpg.. | index.html (your main class page)
_____________|_________________________...
| | |
proj1 proj2 proj3
index.html index.html index.html
grt_lakes.png epa_sites.png... dem.png...
page2.html...
For security reasons, the host server (copland) will not allow client browsers
above your public_html directory.
Your web stuff must be in your public_html directory or some
sub-directory of it, and must have appropriate permissions set.
Type ls -l at the UNIX prompt to get a detailed listing of the current directory's contents, including the permissions. If your login was "fubar" you would see something like this: -rw------- 1 fubar 0419 25 Jul 2 2009 mail drwxr-xr-x 5 fubar 3896 4096 Sep 12 2009 public_htmlLook at the first 10 characters. The first character indicates whether it's a file (-) or directory (d). The next 9 characters show three sets of permissions. The file owner fubar's read (r) write (w) and execute (x) permissions are shown in red; a - character indicates a permission that has not been set. Permissions for the owner's UNIX group are shown in black. Permissions for all other users including client browsers are shown in blue.
The permissions for your public_html directory and every
subdirectory you include under it should be
drwxr--r--.
You can set the appropriate permissions with the chmod
(change mode) commands:
chmod 755 somefile.html sets permissions as
-rwxr-xr-x for somefile.html.
The UNIX Pico text editor is pretty easy to figure out,
but it doesn't support a mouse--you have to use the arrow keys to move
around, and [Ctrl]-V and [Ctrl]-Y to page up or down.
Use [Ctrl]-K and [Ctrl]-U to cut and paste lines or blocks of lines.
Basic commands are listed along the bottom of the screen.
<HTML>[Ctrl]-O and Enter to save ("Write Out") this file, then [Ctrl]-X to exit Pico. You should see the UNIX prompt again. Set the file's permissions so that it's readable to a web browser: chmod 755 testpage.html Now try checking this page out with a web browser. The URL will be http://udel.edu/~yourlogin/testpage.html substituting your own login for yourlogin; don't forget the ~ character. Note that you don't include public_html in the URL path. If you have done everything correctly, you should see the single-line: "Hi Mom, here's my first webpage!" That's all it takes to create a web page--a plain text editor and some knowledge of HTML format tags. Now try out some of the tags demonstrated in the quick and dirty HTML reference. Alternative editors
If you prefer, you can write your webpage on your local machine using
Notepad (which supports a mouse), and then
transfer the file via FTP to your public_html directory.
You can do basic file management within FTP; for example, to set the
UNIX read/write/execute permissions on a newly-transferred file simply right-click on its
filename and edit its properties.
Before using File--Export Map to export your ArcMap map frame as image file, minimize the white space around it. Zoom the map and re-size the ArcMap window if necessary. To export a series of maps with the same size and aspect ratio, keep the same window size and export all your maps with the same image resolution. Your web pages will look a lot better if your map images have a consistent size and style. Avoid creating images wider than 900 pixels. Arc's File--Export Map sets the size of the image via the resolution you specify, generally 72 pixels per inch. It's best to export the right size image, but if your exported images are too big, you can always crop and resize (and sharpen, adjust brightness and contrast, make the background transparent, etc.) them with Gimp. (Always edit in RGB mode!). If your exported images are too small, you can enlarge them somewhat with Gimp, but you will lose image quality. It's usually better to re-export larger versions.
Export your map images as GIF or PNG files. If you run low
on disk quota, you can reduce image file sizes by converting to JPEG (JPG)
format,
but avoid high JPG compression levels that can smear your map details.
The JPG format is best for photos. Troubleshooting Managing your website with UNIX and a primitive text editor can be frustrating until you get used to this environment. The most common mistakes that novices make are:
|