I'm starting my first PostGIS project, and in various books and tutorials I've seen the geometry column labelled either 'geom' or 'the_geom'. Is one more conventional than the other?

Furthermore, is there a good reason to use 'geom'/'the_geom' instead of a more descriptive name for the geometry column? (E.g. 'centre_point' for the central point of a feature.) We don't label conventional db columns 'the_int' or 'the_string', so why label geometry columns this way?

3 Answers 3


As of PostGIS version 2.0, "geom" is the common column name. (At least I see it documentation, etc.) Prior to that it was "the_geom", and I can only speculate as to why.

You may safely use either, but I am happily using "geom" in PostGIS and SpatiaLite.

Edit: Because I completely missed the second part of the question.
In general, a common name is convenient because it is common for GIS software to require that geometries in a table be constrained to a single specific type, SRID, etc. Therefore, table names tend to be more descriptive than the geometry column name. For example, you would expect to find tables named "school_zone_polygons", "school_zone_centroids" each with a "geom" column; not a "school_zones" table with "geom_polygon", "geom_centroid" columns.

Having a common name means you don't have to check the schema every time you want to reference a geometry column.

  • 2
    It's common in object-oriented programming to name top-level objects by prepending an article. This distinguishes 'the_chair' from any later instances of type 'chair'. But PostGIS doesn't really work that way, and switching to just plain 'geom' probably made cross-platform implementation easier.
    – L_Holcombe
    Jan 29, 2013 at 23:44
  • Yeah, I always guessed that it was to prevent a (possible future) collision with a reserved word. Nobody likes typing double quotes.
    – Scro
    Jan 30, 2013 at 2:49
  • 1
    Thanks Scro for clarifying. Though in the instance where you have multiple geometry columns in a table (not that I'm planning to), your counterexample would seem an ideal convention. I.e. table "school_zones" with "geom_polygon", "geom_centroid" etc.
    – Nick
    Jan 31, 2013 at 2:51

One potential reason that "geom" or "the_geom" was chosen as the generic name for the "shape" field was because you can actually store multiple geometry types (point, line, poly, etc) in the one "geom" field in the same table. You can even look back to 2005 when this was discussed on the PostGIS email list.

For example, you could store all of your houses, streets, and county boundaries in the same "geom" field of your single table. There are obviously reasons why you may choose to do otherwise, but this could represent the reason why a generic "geom" column name was used.

Hopefully some long-time PostGIS users will chime in with more details on why "geom" was actually chosen.


When using Geoserver REST api in publishing existing PostGis tables, the REST command will fail if the geometry column is not named "geom".

  • 2
    I'm pretty sure that this behavior is a bug with Geoserver, and once it is solved, it should no longer be a point of consideration Aug 1, 2013 at 3:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.