Creating locality pages

From OpenStreetMap Wiki
(Redirected from Creating city pages)
Jump to navigation Jump to search

Introduction

We have a whole sprawling mass of wiki pages about places. Pages about countries are linked from the List of territory based projects. Depending on how things are organised (and whether they have been organised yet) you may see a list of regions, provinces or counties, each with their own wiki page. At the lowest level we have wiki pages dedicated to individual cities, towns or even villages.

The primary purpose of these wiki pages, is to coordinate mapping of the place. This might include a break down of the districts within the town, description of who is mapping and how far they have got. Sometimes percentage completion estimates are given. The way this information is organised is not set-down as a wiki policy. It is currently left to the preferences or whoever edits these pages (generally people living there, but also other wiki gardeners).

Unfortunately there is a tendency for these pages to fall in to disuse, and contain out-of-date map images and mapping progress information. In fact historically, before we had the feature of browsing a slippy map, some of these wiki pages were created just to give us a place to show a map image. As such, there is a lot stale information kicking around. To prevent a wiki pages becoming out-of-date, people should give consideration as to whether the information they are adding is likely to be maintained. How quickly will it go out of date? Am I intending to maintain the information myself? How likely is that somebody else will provide updates? With this in mind, you may decide not to create a place page at all, or you may decide to limit the mapping progress information you attempt to provide.

Place pages may also serve to attract people who might otherwise not have found the OSM project, and to gather up a little search engine kudos (especially if people link to these pages from other websites). Try to include information targeted at locals, to get people in your area interested in the project, but remember you can easily just link to pages such as Help, About, and Getting Involved, without trying to explain the project all over again!

Creating a wiki page

Navigate through the Mapping projects pages, to find a suitable place for your new city page, for example you could add an item to a list of cities.

Go to the "edit" tab, and add the name of your town, city, or area. The place name should go on a new line, with double square brackets around it.

Example:

*[[Portsmouth]]

Press "Save", and your link should show up as red, indicating that it is a page which has not been created yet. The * will add the bullet point.

Follow the red link. This will give you an editing interface to your new page. See Wiki Help for more information.

Using a template to create the page text

Copy the following text into your new page (using the "Edit this page" link), and fill-in the fields.

{{Place
| name         = 
| type         = 
| subarea      = 
| area         = 
| lat          = 
| long         = 
| zoom         =12
| image        = 
| map          = 
}}

The only required fields are name, type, area, lat, and long.

  • Place - this is the name of the template; do not modify it, do not put an equals sign by it!
  • name - official name of the city.
  • type - city, town, area, isle etc.
  • subarea - (optional) a region or county.
  • area - typically the country (used to make it easier to search for the place).
  • image (optional) - the file name of a map image uploaded to the wiki. Initially you can leave this blank.
  • lat - latitude of the place, in degrees.
  • long - longitude of the place, in degrees. Use a minus sign for western hemisphere, e.g. USA.
  • zoom - (optional) zoom level used to see the whole area in the OpenStreetMap.org viewer.
  • map - Set to yes to display a map in the wiki.

Example:

{{place|name=Bedford|type=town|area=UK|image=Image:Bedford_centre.png|lat=52.15|long=-0.45|zoom=11}}

Save (or preview) the page, and it should be full of information about your town, with links to OpenStreetMap of the area and various other bits of text describing the place.

Full details of Template:Place can be found on the template page, including further details of the parameters (and other optional parameters).

Creating a map image

Main article: Wiki:Maps

You can show a map on the page by uploading an image file to the wiki, or using the "map=yes" item in the Template:Place template.

Slippy map

You can display an interactive slippy map on a wiki page by using the following template

{{slippymap
 |lat=   48.2274
 |lon=   16.3835
 |zoom=  15        (12 default)
 |width= 300       (400 default)
 |height=300       (400 default)
 |layer= mapnik    (mapnik default)
}}

Do not go too big, because the image needs to sit comfortably as an illustration at the top of your wiki page. For dinky little image you may want to increase the zoom level by 1 (more zoomed out than in the template reference).

Uploading an image file

The old way of doing things (which is still widely in use) is to upload an image file into the wiki. This has the major disadvantage that the image is not updated automatically as the map develops. But it does mean you can use Mapnik view, or some other rendering.

You can use one of the tools in Category:Outputs, or just take a screenshot of your area on the map. PNG is the format in favour for maps.

Upload the image to the wiki, using the "Upload file" link (bottom left).

Finally edit the wiki page again, and set the image parameter e.g. image=Image:Oxford-map.png.

Categorising the city

The Template:Place (see above) will automatically allocate the page to categories as follows:

  • If the subarea parameter is defined then the page will be allocated to a category such as "Towns in subarea" (or "cities in..", "villages in...")
  • If the subarea parameter is not defined, or subarea is defined and the corresponding category does not exist, the page will be allocated to a category such as "Towns in area".
  • If a category exists with the same name as the place then the page will be allocated to that category.

If you wish to manually add a further category (or you haven't used Template:Place) then add text to the bottom of the page, saying what category the place is in.

Example:

[[Category:Towns in Canada]]

To find a suitable category, look through Category:Places.

Other things you can do

  • If the place has multiple names, alternate spellings, capitalisation, etc., then create redirect pages so that they link to your new page. See Help:Redirect for how to do that.
  • You might want to track the status of your city by using the template of Landkreis München.

Further information

Any problems, ask on the mailing list or other contact channels.