Python is an open source interpreted programming language used in many GIS programs.

learn more… | top users | synonyms

0
votes
0answers
31 views

qgis python error mac yosemite

This problem started when I installed GRASS. I changed one environment variable and then I tried fixing, then I uninstalled egis, grass gdal, then I upgraded to Yosemite, and I still have the ...
1
vote
1answer
173 views

Auto increment a new column using Model Builder Field Calculator in QGIS?

I am making a model which requires creating a grid and clipping various layers to it. Using the Create grid function does not provide an ID column, instead it creates 2 columns: "longitude" and ...
2
votes
1answer
50 views

Python library for geometrical calculations using with GRASS GIS?

I have to do some geometrical calculations in 2D(point, lines, line segments and intersection points) in Python, and then use it in GRASS GIS. What is the best library to use for it? I'm trying with ...
1
vote
4answers
167 views

Python Script to Add Fields to Feature Classes

I have to try to add a field called 'Name' to a bunch of different feature classes using python, and then access the name of the feature class to fill in the field. I have no idea how to even start ...
2
votes
4answers
2k views

Formula to Check Latitude & Longitude is within Area without Google Maps Api

I got this Example Map SampleMap: http://techinfo.co.id/test/map.php I make Boundary Polygon shape , -6.875165174925262, 107.56293296813965 -6.882663904407988, 107.66730308532715 ...
1
vote
1answer
45 views

Algorithm to determinate neighbor's position (N S E W) of parcels?

After my first publicaation Determinate Parcel Neighbors using PYTHON Where i was looking for a faster way to calculate parcel neighbors and position, and after succeeding that, but the result was not ...
5
votes
3answers
1k views

How do I get the path of a project, or layer file in PyQGIS?

I am generating new raster files from vector layers on a project. I would like to save them in the same directory as the project or layer files. How do I find this path using PyQGIS?
0
votes
4answers
72 views

arcpy interate row, in a python script? SQL Select expression not working

I am creating a python script where I am trying to iterate over point feature class. I want to create seperate Feature classes from each individual day. So select daynumber and then export it to a new ...
3
votes
1answer
48 views

Python Geolocation Software to Filter Cities By Population Within a Radius?

What I'm trying to achieve I want to enter a US city/state or zip code value. Then enter a radius (ex: 30 - would stand for 30 miles). Then I enter a minimum population (ex: 100000 - would tell the ...
2
votes
2answers
2k views

How can I fix “ImportError: No module named qgis.core”?

First of all, I'm using Python 2.7.3, QGIS 1.8 (Lisboa) on Windows 7 pro 64 bits. Now let's go to the actual question: I have written some code (Python) that works well within the QGIS built in ...
1
vote
2answers
91 views

Use row as input to other processes in python

I am new to python and need help. Looked for my answer but don't know if I am even using the correct terminology. I have a model in which I iterated through rows and performed a set of processes on ...
1
vote
0answers
11 views

How to set -srcwin with python gdalbinding and driver.createcopy

I am using gdal_translate currently to cut a 60000x60000 geotiff into smaller 1000x1000 geotiff files. This works but it takes about 24 hours(and I have 44 of those big images to compute). Im not ...
1
vote
2answers
69 views

Call output files in temporary directory through Processing Toolbox (python)

I need to create temporary files as intermediate output to be used with processing algorithms. So, I implemented this: Processing.runalgorithm("grass:v.to.rast.attribute", ........, None) This line ...
2
votes
1answer
102 views

Accessing CRS info with pyqgis in a standalone application

I'm currently having trouble accessing and defining CRS information in a standalone application. I've read the API documentation and have tried it in the python console in QGIS 2.2.0. The python ...
2
votes
1answer
266 views

Folium GeoJSON Overlay Not Appearing

I am in the midst of a task which involves the clustering of assessment neighborhoods into larger neighborhoods (data link). The goal is build these neighborhoods in a manner consistent with major ...
3
votes
1answer
267 views

How come “Zoom to Polygon” always puts me in the middle of Nebraska?

This is an issue related to this question I'd asked a few days ago. I've got that code working, to an extent. Every time, though, that I double click on one of the Polygons in the attribute table that ...
3
votes
1answer
232 views

How to clip a Oracle query layer directly in a Python script?

I have a query layer directly running from ORACLE database in a MXD. I want to clip this layer with a layer being created in another MXD in a Python based tool. My question is to do this clip ...
1
vote
1answer
245 views

How to store AutoCAD data in ArcSDE database?

Does anyone have an idea how i can create a database instance on my ArcSDE geodatabase to store my .dwg files? I have over 1 million of these files and would be happy to automatically extract and ...
1
vote
2answers
51 views

Using raw_input python to accept string with a dash (-)

Hello I have the following python input. The user will enter a value with a dash always. E.g. 2015-0001 Var1 = raw_input("Enter the number with dash: ") ...
73
votes
5answers
12k views

How do I access ArcObjects from Python?

I would like to be able to script some things that are not exposed via arcgisscripting or ArcPy. How do I access ArcObjects from Python?
4
votes
2answers
1k views

ArcObjects + comtypes at 10.1

Has anyone played around with using ArcObjects in Python at version 10.1? I am having all sorts of problems, such as TypeErrors when wrapping the ESRI OLB modules and AttributeErrors when attempting ...
0
votes
0answers
21 views

.tif image file cropping

following image has black portion on all side which value is [-inf], that what was showing in ENVI. How can I crop this black portion using that [-inf] value?
2
votes
1answer
94 views

Python Error while installing Cartogram

I am quite new to GIS and qGIS especially. I would like to install cfarmers cartogram plugin. From what I understand, this has to be done manually - so I 've followed the instructions from ...
0
votes
1answer
48 views

Connecting to Oracle database on a network in python

There is lots of information out there on how to do this, unfortunately, it all looks like Greek to me. I need a connection to a DB so I can add and use tables and featureclasses contained within ...
2
votes
1answer
69 views

QGIS Python script for creating project file

Is there a way to create QGIS project file(.qgs) using only Python script outside QGIS Python console.I am trying to publish a map using QGIS Web Client using python. For this, I am trying to do below ...
1
vote
1answer
97 views

QGIS Custom Form: “Other” category in combo box replaced by line edit

I am trying to create a custom form for QGIS 2.0 with comboboxes containing an "other" category. I wonder how to provide a line edit to enter info replacing the "other" choice if chosen. Not sure if I ...
3
votes
2answers
116 views

Obtain coordinates and corresponding pixel values from GeoTiff using python gdal and save them as numpy array

How to obtain projected coordinates as well as the actual pixel values at those coordinates from GeoTiff file and then save them into a numpy array? I have arsenci020l.tif file, and its coordinates ...
3
votes
2answers
424 views

Access Sextante (processing) in standalone QGIS app?

Sextante is addressable via python using the QGIS python console (unfortunately not from outside QGIS). I´m writing a standalone app and want to include Sextante geoprocessing functionality. In QGIS ...
1
vote
2answers
382 views

How to use SEXTANTE in a script outside QGIS?

I´m trying to do some geoprocessing using the QGIS Sextante plugin outside of the QGIS application (and integrate it with different other libraries like arcpy, etc.). import sys, os from PyQt4.QtGui ...
0
votes
0answers
30 views

Parameters for CreateFishnet

I´m about to create a fishnet. The CreateFishnet tool has several parameters, between them the origin_coord - The starting pivot point of the fishnetl. Data type of this parameter is Point Now there ...
6
votes
2answers
209 views

Cannot run standalone QGIS script

I've been trying, along with this post, to run a script in OSGeo4w Shell, outside of QGIS. But I get the following error: ImportError: No module named qgis.core I have also read the following ...
1
vote
0answers
26 views

Modify a Python script to one that uses RasterDomain_3d fuctionality - and writes resulting shapefiles it to one

As I am not very experienced with Python I need your help. I managed to modify a Script (that has been posted here Get boundary of raster image as polygon in ArcGIS Desktop? by ...
6
votes
1answer
380 views

Histogram Matching Python

I am trying to do histogram matching using Python to improve the mosaicking process of multiple overlapping rasters. I am basing my code on that found at: ...
2
votes
1answer
341 views

View HTML field data with QT4 browers as a QGIS Run Feature Action Tool

I've successfully populated a sqlite table with an HTML-encoded-table as a field attribute, and so there is literally a Table within a single field value in sqlite, for each record. This is going to ...
0
votes
1answer
27 views

Help interpret GeoTif pixel value python gdal: connection between pixel value, RGB values and physical concentration?

I was running python script that queries a GeoTiff file at the coordinates of a centroid of blocks and as a result I got a list of pixel values, which I have trouble interpreting. When I run gdalinfo ...
4
votes
1answer
520 views

ArcGIS Geocode Single Address Python

How can I geocode a single address in python using arcgis 9.3? I found http://webhelp.esri.com/arcgiSDEsktop/9.3/index.cfm?TopicName=Geocode_Addresses_%28Geocoding%29 - but this does a whole table, ...
2
votes
1answer
134 views

Error: Algorithm not found

I wrote the following code to start using QGIS APIs. in a very short script seen below, the "Error: Algorithm not found" is thrown and "print processing.alglist()" is showing none. Any idea why this ...
1
vote
1answer
106 views

Use PyQGIS to import CSV and draw points using different color

A CSV file contains columns latitude, longitude and color. uri = "file:///C:/data/balls.csv?type=csv&xField=longitude&yField=latitude&spatialIndex=no&subsetIndex=no&watchFile=no" ...
7
votes
3answers
403 views

Remove username and password from saved arcgis layer (.lyr) files?

How can one remove the saved username and password from arcgis layer (.lyr) files? A scripted solution preferred but even a point and click method will be welcome.
0
votes
1answer
45 views

Python: TypeError: a float is required

I have a python script with some parameters - see screen. You see the last parameter is of type Double, default Value 0. The code i have this: Ausrichtung = float(arcpy.GetParameterAsText(9)) if ...
1
vote
2answers
26 views

Opening table from a geodatabase in Arcpy

I have tables in a geodatabase. I want to open and work with them in my script. The first step I appear to have to do is scripted underneath. My result of this script is all names of all tables in my ...
1
vote
2answers
105 views

Problems with plugin/installer manager in QGIS 2.6.1 Debian

An error has occured while executing Python code: Traceback (most recent call last): File "/usr/share/qgis/python/pyplugin_installer/installer_data.py", line 460, in xmlDownloaded if ...
0
votes
1answer
90 views

Create multiple new shapefiles using information contained in a table

I'm hoping to create a script that creates a new shapefile for each record in a table. My python experience is limited, and it has been a while since I used it, so I'm having a hard time getting ...
1
vote
0answers
37 views

Python loop doesnt work properly for hundreds of Raster files (HDF)!

For generating Time Series, I prepared a python script which are supposed to get all task done through looping. Interestingly, It stops working after 12 HDF file but I need to do loop through all ...
-2
votes
0answers
39 views

How to convert .qgs to .mxd using standalone QGIS and Python?

How to convert .qgs to .mxd using standalone QGIS and Python ?
1
vote
0answers
19 views

Open a NetCDF file with multiple time step on QGIS (using Python console)

How to load a NetCDF-file into QGIS using Python? explains well how to load a NetCDF with PyQgis. However, it did not help me to choose among all the available time steps. Is there a way to import a ...
8
votes
5answers
510 views

How to set ArcGIS for Desktop license to lower level for testing whether Python script still runs?

I have a Python script that will need to be given to a client. We are currently evaluating what license level the client will need in order to run the script for their software acquisition purposes. ...
0
votes
2answers
55 views

Editing tables in ArcGIS for Desktop with Python Parser of Field Calculator?

so I'm trying to edit a table so that the name column will not contain spaces. I just don't know how to write the Python script that should go with it. This is what I have for the Python script ...
6
votes
3answers
1k views

Why is an extra field necessary when creating point shapefile from csv files in Python?

I have a Python script that creates a point shapefile from a csv file within a Python script. This script gives me a ValueError for the longitude field (LON) if there isn't an extra nonsensical field ...
1
vote
3answers
43 views

Select Layer by Location problem

i want to create a python scipt query using arpy in arcgis i have one polyline shapefile and one polygon shapefile i want to choose(select) the polygons where contained within in the polylines ...