GENUKI Home page GENUKI Contents GENUKI
Contents
GazetteerGazetteer

GENUKI Gazetteer cgi scripts

A number of cgi scripts are available to access the gazetteer information in a number of ways. They are all being written to enable then to be called via a form interface, or via a URL with comma separated keyword parameters to provide a flexible interface.

The scripts are all held in http://www.genuki.org.uk/cgi-bin/xxx - Substitute xxx for the script name.

gazgazplacenearbyhowfar maplinkplacemapsshowmapoldmap

gaz

The primary search interface. If you call it without specifying any parameters e.g. http://www.genuki.org.uk/cgi-bin/gaz a form is displayed allowing searches to be made. The parameters available are:-

PLACE

A field to hold the name of the place you are searching for.

CCC

The Chapman county code used when you want to restrict searches to a single county. YKS searches all four parts of Yorkshire.

TYPE

The of search to perform. The values allowed are:
  1. Complete word (default)
  2. Exact match
  3. Word ending
  4. Word beginning
  5. Word containing

As an example to search just for places in Lancashire, either:

/cgi-bin/gaz?CCC=LAN performs a Lancashire placename search

or

<FORM ACTION="/cgi-bin/gaz" METHOD=POST>
<INPUT NAME="CCC" TYPE="hidden" VALUE=LAN>
<INPUT NAME="PLACE" SIZE=20>
<INPUT TYPE=submit VALUE="Find place">
</FORM>

provides a search box within the pages itself

gazplace

A means to display a parish style page for an individual gazetteer entry with links to online maps and any other location specific information. The three parameters required should make it possible to match a single gazetteer entry. However if that entry changes you will need to change the link to find it again. The parameters required are:-

GR

The grid reference.

PLACE

A field to hold the name of the place you are searching for. This is not the name field that is in the raw database entry, but an adjusted one used for smart searching. It is therefore all upper case, with extraneous words removed e.g. "in", "by", "cum" etc. and with punctuation e.g."-" replaced by space, and all multiple spaces converted to a single one.

CCC

The Chapman county code.

As an example to search just for places in Lancashire, either:

<a href="/cgi-bin/gazplace?GR=SJ938991,PLACE=ASHTON%20LYNE,CCC=LAN"> shows a page for Ashton under Lyne.

nearby

Show all the places within a specified distance of a specified start point. This is a slightly changed version of the places script. The change is to a keyword parameter interface rather than parameters in fixed positions.

It is normal practise to put a link on each town/parish page to show nearby places in the button bar at the top of each page. The call to locate nearby places is via a link to a cgi script with appropriate parameters. The code for the example link, via the button at the top of this page, is as follows:

<A HREF="http://www.genuki.org.uk/cgi-bin/nearby?CCC=LAN,GRIDREF=SD366271,DISTANCE=5,PN=Lytham">
<IMG ALIGN=bottom border=0 SRC="/images/biarrow.gif" ALT="Neighbours"></A>
<A HREF="http://www.genuki.org.uk/cgi-bin/nearby?CCC=LAN,GRIDREF=SD366271,DISTANCE=5,PN=Lytham">
Lytham</A>

GRIDREF

The grid reference of the start point. You can actually put a place name in here and it will work out the grid reference or give you a choice of places with that name.

CCC

The Chapman code of the start point. It isn't used as part of the search but it is required on links at a later stage to the oldmaps site.

DISTANCE

The radius of a circle centred on the start point. The default is 5.

UNITS

The unit of measurement.

PN

The place name. Not used in the search but is useful to make subsequent pages more meaningful as grid references aren't something anybody easily remembers. If you want any spaces in this parameter, use the characters %20 instead, as spaces aren't allowed in URLs. Similarly use %2C for a comma ',' as that character is used as a parameter separator.

howfar

Calculator to find the distance between two places.

FROMGR

The grid reference of the starting point.

FROMPN

The place name of the start point. Not used in searches but makes the following pages easier to understand.

CCC

The Chapman code of the start point.

The following parameters are not normally used on initial calls to this script, but are used at later stages by the script itself

GRIDREF

The grid refrence of the destination

TOPN

The place name of the destination.

TOCCC

The Chapman county code of the destination.

maplink

A quick interface from a grid reference to provide links to online maps, nearby places and the howfar distance calculator.

GR

The grid reference of the starting point.

CCC

The Chapman code of the start point. If you don't supply it there won't be link to the oldmaps site.

PLACE

The place name of the destination. Only used to make subsequent screens easier to understand.

placemaps

If it is called with no parameters it uses the URL of the page on which the link is placed as the key to find the information, i.e. it shows the names of all places in the gazetteer which have the same URL in the url field as the page on which you have placed the call to placemaps. But some browsers don't always supply this information so it's better to supply a GR= parameter. However make sure you've already got an exact value in the gazetteer to start with as subsequently it will mean changing both gazetteer and the call to this script.

For an example of usage this way see /big/eng/LAN/Lytham/index.html#Maps.

GR

The grid reference of the starting point.

showmap

This is the script that provides our primary interface to Google maps to show places. The original functionality, and new displays are obtained by the use of parameters to the script.

GR

The grid reference of the starting point.

T

The type of map to be drawn.

Z

The initial zoom level on the Google map. The default is Z=5. Increase this value if you are standing further back from the map and want to see a larger area with less detail. Z=9 seems to be suitable to show the whole county.

D

The distance, in miles, for searches for nearby parishes. the default is D=5.

E.g.
<a href="http://www.genuki.org.uk/cgi-bin/showmap?T=PP,GR=SJ938991"> to see places within a township/parish.
<a href="http://www.genuki.org.uk/cgi-bin/showmap?T=PP,GR=SJ938991"> to see a single place.
<a href="http://www.genuki.org.uk/cgi-bin/showmap?T=NP,GR=SJ938991"> to see a place and the nearby township/parish places for which we have a web page.
<a href="http://www.genuki.org.uk/cgi-bin/showmap?T=AP,GR=SJ938991"> to see all places in the gazetteer near to the starting location.

oldmap

Provides a way of getting into oldmaps using a gridref as a starting point. It also requires a Chapman county code so we can select the right section of the the oldmaps site which is county based. The call requires two parameters in fixed positions e.g.

/cgi-bin/oldmap?LAN,SD366271

Oldmaps have changed their site and the script needs changes to make it work again.

Valid HTML 4.0! Info Find help, report problems, and contribute information.

[Last updated Thursday, 01-Nov-2012 14:19:26 GMT - Phil Stringer]