I'm still learning the world of GIS reading this Introduction to PostGIS. So far I understand things but since I have an idea that I plan to later work on, I found something that I didn't quiet grasp. No where in the introduction I see the units used by points. Are they supposed to be longitudes and latitudes or some XY arbitrary points that are known to GIS elites?

My confusion results from my future plan: to make an app that can send location and the server API have to tell the app name of the location and some other fancy things about location. Android for example will require longitudes and latitudes. Is there any tutorial that talks about GPS in relation to PostGIS data?

  • 1
    PostGIS is merely an extension to Postgresql, a database, that enables it to recognize spatial data. How the spatial data is structured within the database, is completely up to you. This structure may include the types of spatial data, the attributes, and perhaps most importantly in your case, the projection and units that the spatial coordinates are stored in. These are all things that you will define before loading data into the database. This structure should be guided by your proposed use for the data, ie, interacting with an Android device, etc. Apr 22, 2015 at 16:29
  • great. what units does OSM use? I plan to use their data as starting point Apr 22, 2015 at 16:39

1 Answer 1


For any geometry the units are determined by the spatial reference system. Which you get for a particular geometry with functions ST_SRID(geom).


(these numbers are in the spatial_ref_sys table and you have to look at the proj4text to see the units description).

For geography type coordinates are always x = longitude, y = latitude.

The first chapter of our book which came out last week (which is a free download from publisher site) explains it a bit http://www.postgis.us/chapter_01_edition_2

-- though the full length discussion is in chapter 3

  • Thanks for informative answer. I use data from OSM as basis for my spartial data. Do they have documentation on that? Thanks for the book. How can one buy from Tanzania? Apr 22, 2015 at 16:42
  • What are you using to load OSM data? OSM data is usually projected in web mercator, but depending on what tool you are using you can bring it in in WGS 84 long lat. Regarding purchasing the book. I would assume you can get directly from Manning or on Amazon. We'll be getting a batch of copies soon so if you have PayPal or something you can buy direct from us.
    – Regina Obe
    Apr 22, 2015 at 21:17
  • 1
    Forgot to say we do cover loading OSM data in chapter 4 using osm2pgsql. Though there are a couple of tools you can use. postgis.us/chapter_04_edition_2
    – Regina Obe
    Apr 22, 2015 at 21:19

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.