

It is stretched to fit within the requested window dimensions, and the formula used to convert its geographic coordinates into screen coordinates is applied to any additional layers. The first shapefile rendered establishes the scale used for all subsequent layers. The program doesn’t do anything with attribute files and doesn’t even require them to be present. When specifying a shapefile for cb-shpdraw, you may provide the name of the. Each part of a complete shapefile has the same prefix. dbf file that contains attributes associated with each shape.

shx file that provides an index to the coordinate data for each shape, and a. shp file containing the coordinate data, a. Shapefiles actually consist of three separate files: a. On earlier systems, I believe the directory separator is the colon (“ :“).
#CHIPMUNK BASIC IF COMMANDS MAC OS#
On Mac OS X, that looks like this: Specify shapefile (none to stop): /Users/anoved/Documents/Geo/shapefile.shp To reference a shapefile in a different folder you have to enter its path. The shapefile names stated above are the names of shapefiles residing in the same directory as the cb-shpdraw.bas program. >run Enter window width: 600 Enter window height: 400 Enter window color (r,g,b percents): 100,100,100 Specify shapefile (none to stop): nycounties Symbol color (r,g,b percents): 0,0,0 Symbol size (>=1): 1 Rendering polyline or polygon shapefile Specify shapefile (none to stop): cities Symbol color (r,g,b percents): 100,100,0 Symbol size (>=1): 20 Rendering multipoint shapefile Specify shapefile (none to stop): > Here is an example command transcript and its output (“ >” is the Chipmunk Basic console prompt): It is a couple orders of magnitude slower on the 33MHz 68LC040 than on my 1.2GHz G4 (as in half an hour versus half a second)! But that is OK, as it is mainly a “can it be done?” program, not an actual tool. Multiple shapefiles can be drawn together using different line weights and colors, allowing simple map overlays to be constructed.Īlthough cb-shpdraw is very slow and has little practical utility, it is the only freely available way I currently know of to display shapefiles on old 68k Macs such as the PB 540c used for the Classic screenshots on this page. It supports point, multipoint, polyline, and polygon shape types. This Chipmunk Basic program parses ESRI shapefiles and draws their contents to the Chipmunk Basic graphics window. Chipmunk Basic, while hardly modern, has been and continues to be updated for use today.An ESRI Shapefile renderer implemented in Chipmunk Basic Most of the other BASIC languages I’m seeing on the app store are recreations of specific computers of the past, such as Commodore BASIC, or don’t even look like BASIC any more. If you’re one of those people who look back fondly on BASIC, or if you have some BASIC programs you’d like to run on your iPhone or iPad, take a look at it. It does not support iCloud, which means that programs written on the iPad do not automatically transfer to HotPaw BASIC on your iPhone or other devices. You can also save it using the “save” command, load new ones using the “load” command, and view all programs using “dir”. HotPaw automatically saves your current program in “tmp.bas”.

The iPad itself experienced no slow-down and I was able to easily exit HotPaw Basic and restart it. Unlike the old days, however, one rogue program is less likely to lock up the entire system. My initial circles program just drew random circles at random locations on the screen it locked up HotPaw Basic-the Stop button failed to work. Just like in the old days, it is very easy to program an endless loop however, even these tiny computers we carry in our pockets are so fast that an endless loop can be impossible to break out of. Type just the line’s number to delete that line. This is more like the old interactive BASICs where you replaced a line by retyping that line number you can also edit a line by typing “edit” and the line’s number. It has one-line-at-a-time editing pretty much just like I remember it from the early eighties-but even toward the late eighties, I was using a full-screen BASIC editor on OS-9. Compared to the other programming environment I have on my iPad, Pythonista, the built-in editor is archaic.
