5

I notice that sometimes Shapefiles that I have received contain .prj files. Sometimes they don't. Wikipedia notes that the .prj file is not "mandatory" and that it contains the :

projection format; the coordinate system and projection information, a plain text file describing the projection using well-known text format

So my question is: why is it sometimes included, and sometimes not? Do newer versions of Esri tools include it, whereas older ones didn't?

4
  • This "Why" question is really directed at the individuals who don't choose to adequately define their data. It has nothing to do with Esri tools.
    – Vince
    Nov 5, 2017 at 13:45
  • So whether a prj file is included is a conscious decision made by the creator of the dataset? Nov 6, 2017 at 4:18
  • Well, not including it certainly is.
    – Vince
    Nov 6, 2017 at 4:24
  • In my experience, inexperienced users/users from a different discipline are generally when I receive a shapefile lacking a *.prj. Often, I ask for the .prj and .dbf, .shx files explicitly, or that I expect ~7 files in a "shapefile".
    – bwp8nt
    Nov 6, 2017 at 5:13

2 Answers 2

10

The original and only published version of the shapefile format defines only three mandatory files:

An ESRI shapefile consists of a main file, an index file, and a dBASE table.

Shapefiles were introduced with ArcVIEW 2.0 and it may be that it could not utilize .prj files. The .prj file itself was already used by ESRI in the Arc/Info E00 coverage format.

Possible reasons to not use a .prj file

  • It is not compulsory
  • The strings to use in .prj are not documented by ESRI, so other vendors have had to reverse engineer them.
  • .prj is not needed if a user works in a single coordinate system all the time
  • Data providers can usually communicate by other means what the correct coordinate system is

In .prj files, ESRI is using Well Known Text strings that are similar, but not identical to the WKT format defined by the Open Geospatial Consortium. As an example, here is the GDAL source code that tries to make those two definitions to match.

1
1

Shapefiles contain geographical objects (e.g. points, lines, polygons on the globe). The coordinates of these objects in the shapefile are merely abstract numbers without any inherent meaning.

A .prj file specifies the meaning of these coordinate numbers. Without a .prj file you'd have to guess what those numbers mean (which actually usually works fine, because most of the time they are latitude/longitude pairs in the WGS-84 datum).

So, one would include a .prj file either for completeness or if the coordinate system used in the shapefile is not obvious. On the other hand, one might omit a .prj file if the recipient can't process them or expects the shapefiles to use a single given coordinate system anyway.

1
  • 1
    I wouldn't say that shapefile are in the WGS-84 datum most of the time but it's true that if you work in a specific area in a specific field you tend to mostly get data on a few recognizable CRS
    – J.R
    Oct 2, 2023 at 8:57

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.