Fork me on GitHub

Place Type

What is a place type?

Gisgraphy is based on the GeoNames features which are grouped by feature codes. Because there are more than 650 feature codes, Gisgraphy simplifies this and groups the feature codes in an abstraction level called place type. A place type groups feature codes that are nearly the same.

What place types are available ?

Actually there are 130 different place types:
  • Adm
  • AdmBuilding
  • Airport
  • Ambulance
  • AmusePark
  • Aqueduct
  • ATM
  • Bank
  • Bar
  • Bay
  • Beach
  • Bridge
  • Building
  • BusStation
  • Camp
  • Canyon
  • Casino
  • Castle
  • Cemetery
  • Cirque
  • City
  • CitySubdivision
  • Cliff
  • Coast
  • Continent
  • Country
  • CourtHouse
  • CustomsPost
  • Dam
  • Desert
  • Factory
  • Falls
  • Farm
  • Field
  • FishingArea
  • Fjord
  • Forest
  • Garden
  • Golf
  • Gorge
  • GrassLand
  • Gulf
  • Hill
  • Hospital
  • Hotel
  • House
  • Ice
  • Island
  • Lake
  • Library
  • LightHouse
  • Mall
  • Marsh
  • MetroStation
  • Military
  • Mill
  • Mine
  • Mole
  • Monument
  • Mound
  • Mountain
  • Museum
  • Oasis
  • ObservatoryPoint
  • Ocean
  • OperaHouse
  • Park
  • Parking
  • Plantation
  • PolicePost
  • PoliticalEntity
  • Pond
  • Port
  • PostOffice
  • Prison
  • Pyramid
  • Quay
  • Rail
  • RailRoadStation
  • Ranch
  • Ravine
  • Reef
  • Religious
  • Reserve
  • Restaurant
  • Road
  • School
  • Sea
  • Spring
  • Stadium
  • Strait
  • Stream
  • Street
  • Theater
  • Tower
  • Tree
  • Tunnel
  • UnderSea
  • Vineyard
  • Volcano
  • WaterBody
  • Zoo
Since Gisgraphy 4.0 some new placetypes has been added to reflect the OSM POIs :
  • Bench
  • Cinema
  • Dentist
  • Doctor
  • EmergencyPhone
  • FerryTerminal
  • FireStation
  • Fountain
  • Fuel
  • NightClub
  • Pharmacy
  • Rental
  • Shop
  • SwimmingPool
  • Taxi
  • Telephone
  • Toilet
  • VendingMachine
  • Veterinary
  • Camping
  • Cave
  • CityHall
  • Craft
  • Picnic
  • RestArea
  • Sport
  • Tourism
  • TourismInfo

I want to add my own feature class, what should I do?

Place types are Java classes and they are associated with a Hibernate Data Access Object (aka : DAO). There is no configuration file for place types, so you have to build your own Gisgraphy version:
  • Download the Gisgraphy sources here.
  • Edit the FeatureCode class in the 'com.gisgraphy.domain.valueobject' package.
  • Put the mapping in hibernate.cfg.xml.
  • Add an entry in the placetype.properties file (and in the other localised placetype files, see here).
  • Create a DAO by creating a class that extends GenericGisDao. You can find examples in any of the placetype classes (example : com.gisgraphy.domain.valueobject.Forest.
  • Then you need to build your own Gisgraphy version with the command in the /src/main/assembly/dist.xml file. There is no developer guide yet but if you're familiar with Maven projects, it should be easy.

There are too many place types and I want to remove some of them.

There is no Configuration file for the placetype, so you have to build your own Gisgraphy version. If you don't want to use all of the features:
  • Edit the hibernate.cfg.xml and remove the ones you don't want to use.
  • Remove the deleted objects from the featureCode.class (it is not necessary to delete the classes themselves in the DAO and the entry in placetype.properties but it is cleaner).
  • Then you need to build your own Gisgraphy version with the command in the /src/main/assembly/dist.xml file. There is no developer guide yet but if you're familiar with Maven projects, it should be easy.

Are the place types localised?

Yes they are localized in the placetype.properties and placetype_LANGUAGE.properties files