Version 2.7 of the Python programming language

learn more… | top users | synonyms (1)

0
votes
0answers
46 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
22 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 ...
1
vote
1answer
33 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
41 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
42 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
40 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. ...
6
votes
2answers
148 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
31 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
185 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
102 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: ...
1
vote
2answers
118 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 ...
0
votes
1answer
159 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
16 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
55 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
54 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
97 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
47 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
63 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
62 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
33 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
69 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
53 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
123 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
74 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
20 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
44 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
63 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
104 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
58 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
75 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: ...
2
votes
2answers
61 views

Update a group layer using arcpy

I work with several MXD'S and i try to update a group layer named "allHa" containing several layers with this code: import arcpy,os,sys,string import arcpy.mapping from arcpy import env ...
1
vote
0answers
57 views

How can i set layer polygon in center in QGIS using python?

I am trying to set a fixed zoom level whenever I layer is shifting on different polygon. I have coordinates for all the polygons , I need each polygon to be on center with certain zoom level so that ...
1
vote
0answers
55 views

Label layout on python in QGIS

Now the only issue is that in image I am not getting the labels, I have on polygon. Please help in that too Please see above attached screenshots here I need labels – I have updated QGIS it's version ...
3
votes
1answer
70 views

Layout show label and each polygon make serrated image

I want to develop "Print lay out functionality", but in output system is giving me whole image, I want to print only selected polygon. Also it is not displaying label names on print image. Please ...
2
votes
0answers
102 views

display of raster in QGIS - cells are not rotated

when viewing rotated rasters in QGIS - the overall raster is rotated (as designed), though each grid cell is not. (the nodata value doesn't appear to pick up as the default in QGIS either - ...
0
votes
0answers
61 views

Problem with Mapscript using QGIS 2.6.1 on Mac OS X

I would like to use the RT MapServer Exporter plugin of QGIS. I have Mapserver 6.4 and Python 2.7.11 both installed with Homebrew and Python 2.7.5 installed by default on my Mac. The Mapscript python ...
0
votes
1answer
156 views

ArcPy and File Geodatabase Character Encoding

I have a JSON file containing special characters, which can be represented in Unicode. However, as soon as I export that JSON file to a file geodatabase using arcpy, the special characters all ...
4
votes
1answer
119 views

Drawing polygon in qgs map canvas

I want to make a custom application which includes an option just like the "Select Features by Polygon" feature in the qgis. I am able to draw the polygon using following code: self.rb = ...
1
vote
0answers
96 views

How to change default symbol in Categorized symbol renderer (python console) or use different icons as vector layer symbols?

I have a point shapefile in QGIS 2.10 and I want to display one of its fields attributes based on its unique values (I always know that it has 4 unique values and their values so I do not care for the ...
2
votes
1answer
75 views

pyQGIS Plugin Window Behavior?

I have made the UI of a qgis plugin using qt creator. What I want is that the plugin window should stay on top of the qgis main window only but not other other applications. I have got this code: ...
1
vote
0answers
58 views

Creating spatial layer from MS SQL Server table?

I have a table in MSSQL that I am trying to use to create a spatial layer from using the QgsVectorLayer function to load the table as a layer, and then using Fiona to create a shapefile but I am ...
1
vote
1answer
134 views

Pretty table python module with variable number of rows [closed]

Is there a way to produce a table in a txt file using pretty table python module, using an i variable for the row count for the case I do not know the number of rows from the begining? For example I ...
2
votes
1answer
124 views

tile_writer: How to set PYTHONPATH? [closed]

I am a self-taught QGIS user with low computer skills, and therefore a frequent visitor to this forum. This is my first question. I run QGIS 2.10 on Ubuntu 15.10. I am trying to use Alexander Hajmal's ...
1
vote
1answer
58 views

Problem replicating ArcGIS Grouping Analysis 'grouping effectiveness' statistic results

I posted this question over on Esri's GeoNet, but have not yet gotten an answer. Using ArcGIS v10.2.1, I have been using the Grouping Analysis tool to generate a range of clusters from my data. I ...
4
votes
1answer
129 views

Polygon inner rings/holes issue

I am working on a script to smooth polygons. Essentially it, separates the inner and outer rings/polygons and send the coordinates to a smoothing def/function. The "smoothed" coordinates are then ...
1
vote
0answers
25 views

Can I use Python 2.7 to add a metadata for each attribute in the attribute table in QGIS 2.10?

i was wondering if i can add a metadata formula that i can fill for each attribute in the attribute table in QGIS, using the python console. for example the attribute X has metadata like : theme, ...
-1
votes
1answer
111 views

Python or Javascript focus (for self-directed study at university) [closed]

Next semester is my last at university. I have taken all 3 of the GIS courses offered in my program. Besides some very light interaction with Python though, their has been zero discussion of ...
1
vote
1answer
421 views

GeoPandas: return lat and long of a centroid point

I would like to return the lat and lon or x and y from the point object in the following series as I plan to link them with an API I built that links OSM and NetworkX. The centroids will be added as ...
2
votes
2answers
207 views

NetworkX: Saving Shortest path of OpenStreetMap data as an OGR friendly format

I am using this script to import OSM data into a GIS based model. This has to run independent from any software package such as QGIS, PostGIS, or ArcGIS. I then create a shortest path between two ...
0
votes
2answers
98 views

Selecting max(cursor) Value returns incorrect max from arcpy.da.UpdateCursor

I'm working through some da.UpdateCursor scripts to make updates to a fgdb. Although the script below works successfully as a rule, it returns the incorrect max value from one feature class. The ...