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...
Solved! Go to Solution.
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...
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)
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...