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

learn more… | top users | synonyms

0
votes
0answers
30 views

How to get Coordinates values from the latitude and lontitude [duplicate]

I having the form, i have two fields, Latitude and longtitute, if i put the value from here, i need automatically mapping on the map. I want to get the value from Lat and Long, it must be generate ...
1
vote
1answer
86 views

How to use the MMQGIS plugin through the Python console?

I know how to make Hub Lines using the GUI, I want to know how to do the same using the Python Console, a tutorial would be great. Thank you
0
votes
1answer
165 views

Using Union on multiple shapefiles to output single result

Using QGIS 2.2 and Python, I would like to use the Union algorithm on multiple shapefiles (contained in a folder TEST) which would then produce single shapefile containing all the data. Currently ...
2
votes
2answers
78 views

How to switch to edit mode vector layers, in pyqt application based on qgis?

I do QGIS based application, I need to implement the ability to modify the geometry of vector layers in manual mode (editing nodes), how to do it?
8
votes
1answer
139 views

QGIS - Calling interpolation extension from python console

I would like to call the QGIS interpolation extension function (TIN method) (Raster->Interpolate) from python console. I can't find the corresponding function within QGIS API or within the ...
0
votes
3answers
99 views

UpdateCursor 'is not defined' Python

I have several files (shapefiles). Table 1 has only one row with several fields whereas Table 2 has several rows. What I want is to take a value from Table 1 and populate all rows in Table 2. I used a ...
0
votes
0answers
60 views

What is GDAL equivalent to ArcGIS Lookup (Spatial Analyst) tool?

I use the Lookup (Spatial Analyst) tool to create several raster layers from a combined raster layer. I know ArcPy can do the same thing. However, I would like to know whether GDAL (or another ...
2
votes
1answer
60 views

What are resources to learn ArcGIS for someone who already knew Python [closed]

I know that there are several resources recommendation questions, however, they are all from GIS people trying to learn Python (for example, here). My situation is the opposite: I have worked ...
1
vote
1answer
73 views

How to use Fields in the Field Calculator? [duplicate]

I'm using the Field Calculator in ArcMap and I need to create a unique ID for every storm drain in my county. An ID Should look something like this: 16-I-003 The first number is the municipal number ...
1
vote
1answer
70 views

How to export a set of layers into multiple PDF(orAI)files, one layer at a time?

I am completely NEW to PYTHON(only took a 3-hr entry course in ESRI tutorial. I have a dataset contains files named as "1_A, 1_B, 1_C....12_A,12_B, 12_c,....200_A, 200_B, 200_C..etc." I need to export ...
0
votes
1answer
37 views

Adding field to table without path to table (python) [closed]

I want to add a field to my table in the FieldCalculator. import arcpy arcpy.AddField_management("veg8", "test", "TEXT") An error message occured doing this and I figured out that I need to set a ...
4
votes
1answer
146 views

XYZ Clustering in Python and numpy arrays

I am looking for a method of clustering XYZ data in Python that works on numpy arrays. I know of a few sources, such as clusterpy and Pysal but have had little success with them as they seem to still ...
0
votes
1answer
64 views

PyQt QTableWidget for QGIS python plugin: infinite loop issue

I'm using PyQt4 and Python 2.7 to develop a plugin for QGIS 2. I have QTableWidgets used to display/compare existing information in the database with newly entered information pertaining to the same ...
1
vote
1answer
73 views

Arcpy: List to point feature class

I have a list of lists that contains: [vala, valb, valc, vald, (pntx, pnty)] [vala, valb, valc, vald, (pntx, pnty)] [vala, valb, valc, vald, (pntx, pnty)] I also have a list of the field names that ...
1
vote
2answers
82 views

Getting error after trying to harvest from geoserver into pycsw

I'm using osgeo live to test the pycsw functionality. I need to harvest metadata from an existing Geoserver service (previously configure for this task). I'm quite new with CSW and I'm not sure if my ...
1
vote
2answers
116 views

Conditional Calculate Field Many to One

Anyone have experience calculating a field based on a many to one scenario? I have a feature class in a geodatabase with a field of unique names. Feature Class Table (let's call this ...
1
vote
2answers
70 views

Set parameter of field from number to string with python

since I realised python is a very useful tool in ArcMap I dont want to do any workarounds anymore. I have a field with is numeric, but I want to perform this calculation in the field calculator on it ...
1
vote
1answer
100 views

Possible to run “Merge shapefiles to one” algorithm from Python script?

Developing a python script in QGIS 2.2, I can run algorithms from the Processing plugin fine such as those from QGIS geoalgorithms and SAGA. Can you do the same for the algorithm "Merge shapefiles to ...
1
vote
1answer
78 views

Map project a raster having separate latitude and longitude raster bands

I have a satellite image where one of the channels is a raster having the longitude values, another channel a raster containing the latitude values. What would be the best way for map projecting such ...
5
votes
1answer
286 views

Is there a way to use ArcPy module in the python shell that is not with ArcGIS?

I have ArcGIS 10.2 installed on my machine. When ArcGIS was installed, python 2.7.3(32 bits) was also installed. I need python 2.7.5 64bits for some gdal functions. So I installed python 2.7.5 64bits ...
1
vote
3answers
103 views

Merging many to one data rows in arcpy [duplicate]

The dataset 'left_right_merge' at the bottom of my screen shot shows the dataset that I'm currently working with. The NODE values indicate a single point feature, but is duplicated with many ...
0
votes
3answers
120 views

Finding coordinate pair at any given distance along calibrated route?

Goal: given a route as a set of ordered coordinates, measure the overall distance of the route and be able to access the coordinate pair at any given distance along the route. Application: I'm ...
1
vote
2answers
87 views

csv to shp python and formating a row

I´m doing a script to convert csv to shp, but I want to format one of the columns. It´s a string then I´d like to format like this a[8:10]+' / '+a[11:16]+' UTC' being a the value in the column. ...
3
votes
0answers
66 views

How to find the minimum number of inspection points?

I am working on a pipeline inspection project and there is a high liklihood that some inspection tool deployment/retrival station will need to be installed on the pipe network. the problem is ...
1
vote
1answer
93 views

Using pyshp to merge two shapefiles

I am trying to find a fast way to merge two shapefiles and i ran over pyshp which apparently could do the job. However looks like this is not working for me because i receive the following error ...
0
votes
2answers
93 views

Any clue how to read a .style (ArcGIS) file in Python, for converting into another platform-specific format? [duplicate]

The problem I am face with is that I have all my data as shapefiles but my organization works with only 1 ArcGIS license. Migrating to QGIS to prominent amount of work, I need to convert my ArcGIS ...
9
votes
3answers
179 views

Setting symbol descriptions of ArcMap layout legends from table?

ArcMap has the ability to show an extended description for each item in the symbol list. How can I populate that property from a table? The goal is to avoid having to edit each symbol one by one in ...
1
vote
3answers
337 views

More Efficient Spatial join in Python without QGIS, ArcGIS, PostGIS, etc

I'm attempting to do a spatial join much like the example here: Is there a python option to "join attributes by location"?. However, that approach seems really inefficient / slow. Even ...
1
vote
0answers
76 views

How to keep all the unique columns of the shapefiles after merge?

Writing a script where the user is asked to select a directory which contains Folder_1 and Folder_2, both containing shapefiles and run various algorithms. The basic logical process of the script is: ...
0
votes
1answer
62 views

Calculate tree cover over certain area from raster data

Last year Hansen et al. published Global Forest Change map as set of raster data available in TIFF format. Basically those are 30-meters resolution satellite images with pixel values ranging from 0 ...
0
votes
0answers
43 views

Save map canvas as image with drawings

Is there any way to save the map canvas as an image, with the drawings on map? I draw a line on map, and saved it as image, but only the map saved(without line). I used the following code.. ...
1
vote
1answer
115 views

Creating a Simple Join Script in Python

I'm trying to create a simple join script in python from an arcgis model, where the only steps are joining a map to a table to produce a map with the table's properties. The attributes joined ...
0
votes
1answer
27 views

Zoom option error on gdal_tiler.py

I'm using the tiler-tools library from: https://code.google.com/p/tilers-tools/wiki/QuickStart And specifically this command: ./gdal_tiler.py --zoom=9-15 my_map.vrt To generate tiles. When I use ...
0
votes
0answers
45 views

How to display image on the Graphics View widget in QGIS

The idea is to create a plugin in QGIS in which on mouse clicking of the layer show up a popup with Graphics View widget on it. I found this pure code: self.scene = QtGui.QGraphicsScene() ...
1
vote
2answers
165 views

Calculating distances between points two feature datasets

I will do my best to explain my problem. I have two feature datasets. One set has about 100 points that are "city centers." The other dataset has points for each census tract in each of these 100 ...
5
votes
2answers
181 views

Replacement for ArcScripts

Does an equivalent of ArcScripts exist? I know of the the ArcGIS resource center and "Code Galleries" but does something that equates to ArcScripts where users share useful ArcGIS code exist? The new ...
0
votes
2answers
107 views

Is there a way to use gdal functions from OSGeo4W out of their shell?

I would like to use some gdal functions from OSGeo4W (gdal2xyz, and gdal_merge) for my work. I can use them in the OsGeo4W shell provided after installing the package. But I want to use them in ...
0
votes
1answer
53 views

IOError trying to change PICTURE_ELEMENT sourceImage

I recently ran into this issue after I published a Geoprocessing Task to a production server. It appears to be the same problem discussed in this question, but there is no answer posted there yet. ...
-2
votes
1answer
259 views

Creating a python script to import an excel spreadsheet, create shapefile and do some analysis [closed]

I am trying to write a script that does the following. Imports an xls file containing x, y, and other columns with data. I want to make this into a point shape file. I want to take that point ...
0
votes
1answer
75 views

How to do supervised image classification in saga with the help of R script or Python script

I am using Ubuntu 12.04 and want to do image classification in SAGA. SAGA has numerous classification algorithms which is not present in GRASS and QGIS. I am new to SAGA, but more accustomed to work ...
1
vote
0answers
61 views

Generating Custom Map image using Python with small installation footprint? [duplicate]

As a part of reporting requirements there is a need to generate region maps. These highlight various regions (countries or states/provinces) with different colors (or shades of a color) depending on ...
0
votes
2answers
72 views

How to show attribute table in the form

Is there any way to show the attribute table of a layer in a QtextBrowser or a QtableView on form? I did this but,(shows attribute table in a separate dialog) I have no idea, how to show it in my ...
0
votes
1answer
107 views

Creating records in output shapefile using Python

I have a list (output from a previous loop) containing attributes from an input shapefile. What I am stuck with is inputting those attributes to a new shapefile. I have plotted the point data using ...
2
votes
1answer
107 views

How to find the id of the last added feature using pyQGIS?

Is it possible to programmatically (in python) access the attribute info of the last added feature in QGIS 2.0 before edits are saved? I'm failing to find a way to get the ID and subsequently other ...
0
votes
1answer
145 views

Using Z and M feature geometry to create line graph in ArcPy/Python?

I am a Python (v2.6.5) noob trying to plot a series of 3D polylines into graphs. So far I've come up with: # Import system modules import arcpy, os, sys, string from arcpy import env ...
0
votes
0answers
42 views

Correctly drawing wrapping circles using Basemap

I've been using the functions from here to draw circles on maps using Matplotlib Basemap. This works well, but breaks badly at the map edges: I'm wondering whether there's a general approach for ...
0
votes
0answers
34 views

Copy queried attributes of a shapefile to a new shapefile [duplicate]

I have a polyline-shapefile, which I have successfully read into python using pyshp module. My problem is to save the 2nd node of every line feature into a separate, single point file. I have ...
0
votes
0answers
41 views

QGIS custom action and button toggle

I've added a custom toolbar with some buttons to my QGIS 2 plugin. I'm wondering how to get the button toggled (pushed in-looking effect) using Python. I've gotten this to work for existing buttons ...
0
votes
1answer
74 views

Updating records based on value in another field using arcpy.da.UpdateCursor?

I am trying to write file names and paths to two separate fields in a feature class, and the value for each record is dependent on finding a match in a list. When I run my code it writes the same ...
5
votes
2answers
106 views

Efficient way to use a CSV to Define a Feature Class

I was provided an Excel Spreadsheet which had the definitions of fields for a feature class. There were several worksheets in the file, each containing field definitions for different feature ...