OSM tag key and value for highway/waterway 'districts'?

I want to generate a map that is visually divided into districts/regions/areas. The intended use is so that I can clearly see which features (added using OpenLayers) fall into which district. These are districts loosely based on highways and waterways.

Is there an OSM tag key and value available to describe such districts/regions/areas?

If there is none, is there some other general ‘region-marking’ that I can use that would visually divide the map in said districts?

(I am using osm2pgsql and Mapnik to render the maps.)

What sort of districts / areas?
If they are areas of a town or city, you could tag them as place=suburb. or place=village / place=hamlet if more spread out in a sort of rural area.
Or place=locality if not necessarily populated.
Some other options here: http://wiki.openstreetmap.org/wiki/Key:place

Or are these districts officially defined, and used for administrative purposes? If so, you can tag them as boundary=administrative, plus an appropriate admin_level=
http://wiki.openstreetmap.org/wiki/Tag:boundary%3Dadministrative

Thank you for replying, Vclaw.

I am creating a map for an agency that does road monitoring and maintenance. They divided the region they monitor into ‘districts’. Different districts are monitored by different people. So they are not exactly ‘administrative districts’, but more an artificial division by an agency for practical purposes.

I want to somehow visually show these districts on the map I render with Mapnik. Perhaps a different background color, a colored line denoting the district borders, or a transparent color across the whole ‘district’.

Can I (ab)use these administrative tags for this?

As Vclaw said, it is important to know if your boundaries are official boundaries (in which case you can use the tags documented on the wiki) or just some internal divisions of your application. Artificial divisions should remain outside the OSM db. The only divisions present in OSM are the official ones, from the suburbs/municipalities/districts upto country/nation boundaries. That’s what we call “administrative boundaries”. This has some general interest. But if each application or data consumer is coming and creates its own private divisions into OSM, it will quickly become a mess.

Of course, you could add them, even with a note explaining what they do. But don’t be surprised if someone moves or removes them later.

You have other solutions for your problem and depends on how you “create the map”. You can add your artificial divisions into your local copy of the dataset (either with a mashup or into a separated file uploaded into your GIS database). And in this way, you are 100% sure that nobody will touch them.

They may be official boundaries, since it’s a government agency. However, I don’t think they are useful for anyone besides the agency itself. I also don’t know if the copyright on the data allows for publication…

I was not hoping to add them to the ‘official’ OSM database :slight_smile: As you suggest, I was planning to insert them in my local copy of the PostGIS database before rendering (using Mapnik).

I believe the place/locality tag is what I am looking for to correctly denote these ‘districts’ I described in my previous posts.

To combine the planet extract I downloaded and my custom .osm-file with my boundaries, can I simply use osm2pgsql first on the planet extract, and then again on my custom .osm file?

How should I alter the default style sheet to give my custom place/locality tags a background color, on all zoom levels?

Adding your custom .osm file with osm2pgsql should be fine but take care about the custom osm-id’s (shouldn’t overwrite existing id’s).

I cannot help for Mapnik styles. Mapnik is a project by itself and uses another ML but someone else might be able to help you.