Select to view content in your preferred language

PRJ file invisible since upgrade to 3.4?!

453
3
Jump to solution
06-26-2025 01:44 AM
Labels (2)
IngoWolff
Occasional Contributor

Hi,

I'm shocked that ArcGIS pro considers PRJ files of unworthy beeing visible inside the Catalogue View and worse in ArcPY since the update to 3.4! The Google KI Answer to my question "Why are .prj files invisible in ArcGIS pro 3.4.3?" turned out this not helpful answer:

"In ArcGIS Pro 3.4.3, .prj files (which store coordinate system information) are typically not visible in the main project view because they are considered supporting files for other data formats like shapefiles or feature classes. They don't have a standalone visual representation in the project. However, they are crucial for defining the spatial reference of your data"

Since I used to define coordinate systems of hundreds of rasters and redefine the same amount in Arcpy, it is a nightmare not to be able to do it since the upgrade. Why ESRI, why?

How can I still recognize PRJ files in ArcPy without importing them?

I hate upgrades...

0 Kudos
1 Solution

Accepted Solutions
IngoWolff
Occasional Contributor

Hi,

cheers for your answer. But I need to define projections with a lots of rasters, no shapes. Therfore I need to point out that specific PRJ file...However: After my arcpy clone environment settings were broken (before that it worked and couldn't find a PRJ file at all while running my script) I I redid the clone settings (I work with pyzo) my script suddenly found the PRJ files again! But the catalogue does not anymore. That's still not cool...

Maybe it was just coinicidence and panic arose of loosing my routines for raster geoprocessing, but such things are really not necessary!

Proplem fixed with new arcpy clone settings...

View solution in original post

0 Kudos
3 Replies
RossLindsayEnv
New Contributor

I am assuming the objective of ESRI to do that is for you to check the 'Source' dropdown of the actual Shapefile to see what Coordinate System is tied to the shape. 

A simple hook you can add in your script to read the projection could be: 

def ReadPRJFile(filePath):
    with open(filePath, 'r', encoding='utf-8') as file:
        text = file.read()
    return text

Shapefile = \Path\To\Your\Shapefile
TextContent = ReadTextFile(Shapefile.replace('.shp','.prj')
print(TextContent)

 

0 Kudos
IngoWolff
Occasional Contributor

Hi,

cheers for your answer. But I need to define projections with a lots of rasters, no shapes. Therfore I need to point out that specific PRJ file...However: After my arcpy clone environment settings were broken (before that it worked and couldn't find a PRJ file at all while running my script) I I redid the clone settings (I work with pyzo) my script suddenly found the PRJ files again! But the catalogue does not anymore. That's still not cool...

Maybe it was just coinicidence and panic arose of loosing my routines for raster geoprocessing, but such things are really not necessary!

Proplem fixed with new arcpy clone settings...

0 Kudos
RichardDaniels
Honored Contributor
If you are in Windows 10 or 11 just set File Explorer to show hidden files.
[cid:image001.png@01DBE999.DD0EE2D0]

0 Kudos