geopeek is a command-line interface (CLI) and text-based user interface (TUI) for exploring and analyzing geospatial data. It supports various file formats, including shapefiles and raster files.
To run your CLI script with arcpy
, which is installed separately via ArcGIS Pro, you need to ensure that your Python environment is set up to use the Python interpreter that comes with ArcGIS Pro. Here's how you can do it:
-
Locate ArcGIS Pro Python Environment: ArcGIS Pro comes with its own Python environment. You need to find the path to this environment. It is typically located in a directory like:
C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3
-
Activate the ArcGIS Pro Environment: Open a command prompt or PowerShell and activate the ArcGIS Pro Python environment. You can do this by navigating to the
Scripts
directory of the environment and running theactivate
script:cd "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Scripts" activate
-
Run Your Script: Once the environment is activated, navigate to your project directory and run your script using the
python -m
command:cd path\to\your\project-root python -m src.geopeek path/to/your/geodatabase.gdb
If you frequently need to run your script, you can create a batch file to automate the activation and execution process:
-
Create a Batch File: Create a new file named
run_geopeek.bat
with the following content:@echo off call "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Scripts\activate.bat" python -m src.geopeek path/to/your/geodatabase.gdb
-
Run the Batch File: Double-click the batch file to activate the environment and run your script.
To launch the text-based user interface (TUI) for browsing a GIS dataset, use the following command: