Version 2.7 of the Python programming language

learn more… | top users | synonyms (1)

0
votes
0answers
18 views

How to pass variables of a Python script to another Python script on ArcGIS [duplicate]

I'm using Python window of ArcGIS 10.2 to run a Python script. But now I need to pass values from another python sript to main script, so I tryed this: import arcpy import subprocess subprocess.Popen(...
0
votes
0answers
22 views

How do I connect my Python script external to the Grass GIS 7 program in Windows 10?

I've tried to find resources online to link and run my Python script externally from Grass GIS 7, however, I have not been successful. I found resources here that provide instructions (e.g., https://...
1
vote
1answer
31 views

How to call gdal_translate from Python [duplicate]

I want to make a translation of a grib file to tif with gdal, I use the python script, and I have always error "the specified file not found ' import subprocess src ="donnee1.grib2" dst ="donnee2....
-4
votes
0answers
10 views

TypeError: 'NoneType' object is not iterable [on hold]

Code data = self.read(cr, uid, ids, [], context=context)[0] try: source_plant = data['source_plant'][0] destn_plant = data['destn_plant'][0] ...
3
votes
1answer
29 views

It is possible to get single polygon using gdal.Polygonize()?

I have to get polygon outline for all raster in our server. I tried one example raster and used gdal.Polygonize() function. With that I could produce thousands of small polygons but I only want a big ...
1
vote
1answer
46 views

Reset Python libraries modified by QGIS on Mac OS X to original versions

I am facing problems in python after installing QGIS. While installing QGIS, it mentioned that it would override my matplotlib and numpy python libraries. I am facing trouble with executing python ...
0
votes
2answers
19 views

Python code execution error in QGIS WIEN

I have tried to make several different actions in QGIS but keep getting similar error messages when I try to select the output filename. The error message reads as follows: An error has occurred ...
1
vote
2answers
45 views

Converting cmd arguments to python

I am trying to set up a hyperlink in ArcMap that opens a specific file in a program we've developed. Using the cmd C:>"C:\Program Files\program.exe" file in windows works fine, but how do I translate ...
1
vote
0answers
14 views

How do you test QgsDataSourceURI.setConnection is valid in a QGIS plugin?

I am currently trying to write my first Python plugin for QGIS and I'm using the the uri = QgsDataSourceURI() uri.setConnection(host,port,db,username,password) syntax to create a connection to an ...
0
votes
0answers
48 views

Using Arcpy in Idle?

I realize there is a similar post to this, but the error for that one is different. I am trying to import arcpy into Idle. I can use it in the python command box in ArcGis but when i try to import it ...
0
votes
0answers
53 views

Login to USGS Earth Explorer and download Landsat imagery with Python

I want to login to the USGS Earth Explorer website at http://earthexplorer.usgs.gov/ with Python and download imagery from the Landsat Archive collection just by giving it username,password,path/row (...
1
vote
0answers
37 views

Generate sequential Unique ID that is a string from current max Unique ID [closed]

I am very new to python, and I need some help. I am trying to write a script that will find the current highest Unique ID in the 'FACILITYID' field from our 'Meter' layer. Then, it will need to write ...
2
votes
3answers
110 views

No Module named qgis

I installed QGIS through OSGeo4W, and I am trying to write a standalone PyQGIS script, however, I am unable to import the qgis, qgis.core, processing ect… modules, as shown in the picture, I get the ‘...
-4
votes
1answer
35 views

assigning a label to a variable [closed]

I am getting a traceback error at the for loop (line 9). TypeError: #'NoneType' object is not iterable I was wondering if fcList is empty. I also thought leaving arcpy.ListFeatureClasses() ...
1
vote
1answer
40 views

SAGA GIS work with python API error

I want to work with python API and SAGA GIS. I am very new with this work. The first step I find one module for example Slope, Aspect, Curvature and I take with right click one python script. python ...
0
votes
0answers
32 views

How to capture the event whenever the items inside the listview is enabled or disabled and get the number of enabled checkboxes inside the listview

I have a function "openBrowse" which will allow the user to select SQL files from a local path and display the file names as with dynamic checkboxes created based on the number of files selected ...
1
vote
0answers
35 views

QGIS Batch Processing error: AttributeError: 'NoneType' object has no attribute 'update'

I receive the following below error when trying to run Batch Processing in QGIS. I have tried uninstalling QGIS but still this problem persists. An error has occurred while executing Python code: ...
2
votes
1answer
49 views

Batch intersect and multiprocessing with arcpy

I admit what I am working on is way over my head, especially as I've only been dabbling in python for a few months. I am attempting to write a script that allows me to use Intersect analysis on about ...
2
votes
1answer
21 views

Numpy TypeError when turning ndarray into structured array [closed]

I want to turn my ndarray(670911L, 39L) into a structured array using a view: c = arr.view(dtype=[(n, ‘float64’) for n in names]).reshape(len(arr)) where names is a list of 39 strings. But I am ...
0
votes
0answers
19 views

syntax error when using optimized hot spot analysis tool

I am attempting to run an Optimized Hot Spot Analysis. was using the tool to check that it works to then use it in an automated process, But I get this error: Messages Executing: ...
0
votes
0answers
68 views

SAGA GIS API ERROR (import saga_api)

I want to use saga api on my Idle with Python but I have problems. First I have Windows 10 64 bit, I install SAGA GIS via OSGeo4W64 64 bit, and I have Python 2.7.11 64 bit. I follow steps for the ...
0
votes
0answers
29 views

GRASS GIS: g.run_command (“db.select”) in Python with sqlite for several timestamps

I am working with GRASS GIS 7.03 and want to extract the coordinates from the vector data of the attribute table "rec_TRACK_RG" by using the maximum and minimum values of the column "time" from the ...
2
votes
1answer
53 views

Python module pyGTiff aligning data

I have been working with pyGTiff for a while and it works great. However my gis data does not have the same projection and extent. I saw that in the repository a a jupyter notebook with a test ...
1
vote
1answer
49 views

How do I get arcpy.Select_analysis to skip conditions that don't exist

I have data from 2007 to 2015 of various animals that I'm trying to break up by year and name. I wrote a little for loop that goes through all the items in my attribute table (gps_points). The ...
0
votes
1answer
43 views

How to run in background an .exe program withArcGIS? [closed]

I am working with the ArcGIS program that reads Python language. For that I've already implement scripts as script tool on the ArcGIS. Now I need to run in background an exe program "gams". Is it ...
2
votes
1answer
48 views

GRASS GIS: how to define several variables in a loop without the command locals()?

I am working on a Python script in GRASS GIS and want define several variables in a loop. My simple loop is working, but I don't know how to integrate sevaral variables. RG_koor=g.read_command("v.out....
6
votes
2answers
163 views

How can arcpy to be interactive?

I'm developing an interface with arcgis and python. When I have only python, I can become my script interactive using: S = float(raw_input( 'Please enter the value: ')) I can open and run my ...
2
votes
0answers
36 views

GRASS GIS: how to run g.run_command(“v.extract”) in Python with sqlite, smooth-spline in GRASS GIS?

I would like to solve several problems by using a python script in GRASS GIS: I already uploaded collected GPS-waypoints and tracks ("v.in.org"), patched several GPS-vector data ("v.patch") and ...
3
votes
1answer
191 views

“ ”.join(list) not inserting spaces when calculating field

I have a Python script where I'm trying to take the values from three fields (street address data - direction, street name, street type) and combine them into one field, e.g. S, Main, St should be S ...
1
vote
2answers
184 views

How to polygonize raster to shapely polygons

I am seeking an open-source python solution to convert raster to polygon (no ArcPy). I did know the GDAL function to convert raster to polygon, and here is the manual: http://pcjericks.github.io/py-...
1
vote
2answers
294 views

Couldn't load QGIS utils; Python support disabled; No module named future

Unexpectedly Qgis won't open today. Error code is: Couldn't load QGIS utils. Python support will be disabled. Traceback (most recent call last): File "", line 1, in File "/usr/lib/python2.7/...
0
votes
1answer
383 views

Error using pip install for arcpy: “Could not find a version that satisfies the requirement arcpy…”

In my command line I typed python -m pip install arcpy to install arcpy. I got this error message in return: "Could not find a version that satisfies the requirement arcpy (from versions: ) No ...
0
votes
0answers
18 views

query coordinate (text)file by proximity to point layer?

I have a shapefile of points; I would like to find all points in an accompanying textfile that fall within some radius of each point. Afterward I'll create a new textfile and index the (hopefully) ...
2
votes
1answer
69 views

Updating multiple fields with list values using arcpy.da.UpdateCursor

I have a script that contains a function that fetches XML from a web service, containing a series of metadata values. The function takes a field from a feature class as criteria, queries the web ...
1
vote
1answer
61 views

How do I get utm data converted into wgs84 all within Python27?

How do I get utm data converted into wgs84 all within Python27? Does anyone know how to import the QGIS Lyon 'reproject' tool I to Python27? I have a Python script that writes utm Into a text file ...
3
votes
1answer
143 views

Converting between coordinate systems for LAS file using LASPY

I am trying to convert a .las file from WGS84 to UTM17. I have some drone imagery that was used to generate a 3d point cloud/ .las file, but it is in latitude/ longitude instead of easting/ northing. ...
3
votes
0answers
77 views

Gdal and module import error when creating an .exe application with pyinstaller

I’ve been struggling since three days in a row to create a windows executable application from my python application. I have managed to get results but I’m not at all satisfied with the workarounds I ...
3
votes
2answers
83 views

QGIS pyqgis: Trouble loading non-spatial data via .csv using python for standalone script

I cannot for the life of me figure this out. I am trying to load a .shp file, and a non-spatial data table .csv file. Then join the table to the shape file. Both files have a primary key. Here is ...
3
votes
1answer
66 views

Adding attributes to the table PyQgis

I want to save number of vertices of every object from my line vector layer in attribute table. The code I have was able to: Save in table correct number of vertices for layer with only Polylines. ...
2
votes
0answers
39 views

extracting raster using values

I have an original .tif file which has values ranging from 2 to 28. From that original .tif file, I am extracting cells having a value of >=10 using the following code: import arcpy, os from arcpy ...
2
votes
1answer
103 views

alternative to geograpy package for python (Pulling locations from text)

I am currently exploring using the geograpy package for python to pull locations from text. It uses nltk, among other things to pull locations from URL's and text. The only problem is it doesn't ...
3
votes
1answer
60 views

How to slice a list based on row values? [closed]

I'm working with python 2.7 (quite a beginner). I have a list, and I have a feature class with : A = a field that contains values that I would like to use as the start of the slicing B= a field that ...
2
votes
1answer
173 views

QGIS corrupted plugins upon reinstallation

I had various bugs in my GIS softwares (QGIS, ArcGIS) after uninstalling PyCharm from my computer (time limited school license). For a school assignment we had to change the PythonPATH and PythonHOME ...
1
vote
0answers
95 views

Image orthorectification with XYZ and roll, pitch and yaw

There are a lot of raw images taken by UAV and the only parameters that I have are XYZ and roll, pitch, yaw in excel spreadsheet. I've been trying to orthorectify these images with ArcGIS, Er mapper ...
2
votes
1answer
23 views

How to skip ArcOnline MXDs(ArcPy)

I've previously posted a question about an ArcPy tool that walks through a specified area and scans all MXDs and associated Layers and reports them (as well as the inverse) Search for a shape-file of ...
3
votes
2answers
49 views

Converting Python GDALDataset to C++ GDALDataset

I'm currently writing a C++ extension to python to speed up a raster data viewer which is running extremely slowly with our large datasets. I've managed to get a small speedup by writing a C++ ...
0
votes
1answer
83 views

Extracting channel banks from DEM and channel newtork

Currently I am working in project that require from me extracting channel banks. I have been thinking about the best method that I can use to come up with good function that extract the location of ...
1
vote
1answer
112 views

Trying to increment a field value for only the repeated records in a feature class using Python

NOTE: If you look at the excel tables just above the comment section it will give a clearer picture of what I want to achieve in my code. So the code below works in doing what I want it to do thus ...
0
votes
1answer
61 views

Calculating several cells into one cell in same table using ArcPy

I'm very new to Python and scripting in ArcGIS. I need to calculate some cells from one field in table into another one cell in another field in same table. Here's what i need: Here's what i try ...
0
votes
0answers
88 views

Merging selected features in one DBF table (polygons) using ArcPy?

Im absolutely new to Python and programming. How can i merge selected features in one DBF table (polygons) using Python in ArcGIS 10.2 for Desktop? Here's what i need: Here's what i've got: ...