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 /cgi-bin/xxx - Substitute xxx for the script name.

gazgazplacenearbyhowfar maplinkplacemapsshowmapoldmap


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


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


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


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


<FORM ACTION="/cgi-bin/gaz" METHOD=POST>
<INPUT TYPE=submit VALUE="Find place">

provides a search box within the pages itself


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:-


The grid reference.


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.


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.


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="/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="/cgi-bin/nearby?CCC=LAN,GRIDREF=SD366271,DISTANCE=5,PN=Lytham">


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.


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.


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


The unit of measurement.


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.


Calculator to find the distance between two places.


The grid reference of the starting point.


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


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


The grid refrence of the destination


The place name of the destination.


The Chapman county code of the destination.


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


The grid reference of the starting point.


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


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


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.


The grid reference of the starting point.


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.


The grid reference of the starting point.


The type of map to be drawn.


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.


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

<a href="/cgi-bin/showmap?T=PP,GR=SJ938991"> to see places within a township/parish.
<a href="/cgi-bin/showmap?T=PP,GR=SJ938991"> to see a single place.
<a href="/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="/cgi-bin/showmap?T=AP,GR=SJ938991"> to see all places in the gazetteer near to the starting location.


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.


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 Saturday, 19Jul2014 10:58:14 BST - Phil Stringer]

Hosted by Mythic Beasts Ltd.