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

learn more… | top users | synonyms

0
votes
1answer
9 views

Accessing Point Cloud Data

I have a point cloud dataset, and I am trying to divide it up into sections of point cloud data (in a grid-like manner). Essentially, I will have little cubes of point cloud data, possibly by given ...
0
votes
0answers
5 views

Ways to reduce buffer if it passes through a certain layer

I am trying to do WiFi analysis on signal strength in ArcGIS Desktop, and one of the big problems that I am running into is how to reduce the signal when it comes in contact with a wall, as it does in ...
0
votes
0answers
11 views

Please check out my Python script to automate inserting thousands of feature classes to a topology, and give rules

Below is my python script. So far I'm trying to import the feature classes into a topology. I don't know how to then add rules, and where to put that in the code. The script is returning the ...
1
vote
1answer
11 views

How to create a new empty memory layer with fields scheme from other layer in QGIS?

Being a complete noob with python so far, I got inspired by this answer: http://gis.stackexchange.com/a/155988/8202 to dive into it a bit. When creating features in a new target layer from an ...
0
votes
0answers
8 views

How can I connect MYSQL database in python for QGIS desktop Application?

I am following below process. 1 - Setting You must install a MySQL driver before doing anything. Unlike PHP, only the SQLite driver is installed by default with Python. The most used package to do ...
0
votes
0answers
20 views

How to build a raster populated with an equation in a python toolbox?

I am working on creating a python toolbox to solve for WiFi signal properties based on various inputs, and for the end result I would like to have the output in the form of a raster. I need this ...
0
votes
0answers
21 views

Installing GDAL Python bindings on Windows [duplicate]

This has been addressed before (How to install GDAL with Python on windows?), but I wanted to bring the question up again, to see if anybody has come up with a better method in the last 5 years, and ...
1
vote
0answers
7 views

Can't get the web OpenLayers plugins to work because of 'python error' on my mac

I'm trying to get a relatively small section of Google satellite/ Google earth as a layer on Qgis on my mac. When I go to 'web' and the 'open layers' plugin it just comes up with python error. I've ...
0
votes
1answer
29 views

Convert multi KML and KMZ into shapefile using ArcPy?

I try to convert with arcpy (python 2.7.8) 50 KML and KMZ files, that i downloaded from google earth into shapefiles. All files located in many sub-Folders. All Sub Folders are located in one large ...
0
votes
0answers
47 views

Python version issue

I am using arcgis 10.1 and running this script on python version 2.7.2. # Import standard library modules import arcpy, os, sys from arcpy import env # Allow for file overwrite ...
0
votes
0answers
31 views

ZeroDivisionError

I was conducting Mean Coodinates process functions with weighted fields when I began faces ZeroDivision errors in some processes. The Shapefile Data has been joined together with imported Spreadsheet ...
1
vote
1answer
46 views

QStringList() error in plugin of QGIS 2.10

I have made a Dialog in PyQt for use it like a plugin under QGIS 2.10 The Dialog works fine like a standalone application, but if I try to call it like a QGIS plugin, I get this error: ...
4
votes
2answers
43 views

how to create geo-referenced random data?

I'm writing a dissertation on different parameter settings in GWR . In order to perform tests I'd need the availability of geo-referenced data that show some sort of spiatial correlation (i.e. values ...
0
votes
1answer
15 views

Multiply a stack of floating point rasters( composite raster ) with a constant

I am trying to multiply a floating point stack of rasters (10 layers) with a constant and round up to the next integer. I have the formula RoundUp(10*composite_raster) in raster calculator, but for ...
0
votes
1answer
26 views

map(arcpy.AddError, traceback.format_exc().split(“\n”))

What does this expression mean? I see this in many python scripts. try: ... except Exception as e: import traceback map(arcpy.AddError, traceback.format_exc().split("\n")) ...
1
vote
1answer
25 views

Python tools won't open when clicked on

I am creating a python toolbox within ArcGIS 10.3 and I am having issues opening it up in ArcMap. I have been editing it, saving it, and running it within ArcMap this whole time to test it little by ...
1
vote
1answer
33 views

How to calculate zonal statistics from multi-band raster for each polygon using python?

I want to calculate the zonal statastics from multi band raster for a polygon layer. When I am using this snippet of code: vectorlayer=qgis.utils.iface.mapCanvas().layer(0) rasterfile = ...
1
vote
0answers
22 views

QGIS - Custom Icon to Show my Tool is Running?

I am running QGIS 2.6.1 (Brighton) I've some developers that have made some custom plug-ins, but our testers are complaining that they cannot tell when, if or what tool / plug-in is running. Is there ...
0
votes
0answers
21 views

Spatial segregation from a raster of racial distribution in the USA

I am trying to measure the degree of racial segregation at some geographic level (let's say the county level, for simplicity) in the USA. I have a shapefile with these geographic units. To do so, ...
1
vote
1answer
27 views

Copying attributes from point layer to memory linestring layer PYQGIS

I've stacked a little bit with copying attributes. I have a Point Layer created from .csv file. For each feature in this layer, I'm creating a new Polyline geometry in memory layer. Cannot add ...
2
votes
0answers
26 views

Multiple layer intersection

I am trying to find a way with qgis/python to get the intersection area of more than 2 layers. All the tools in Qgis take just the 2 input layers. ='( For example in the image below, I have 4 ...
0
votes
2answers
30 views

How many percentage of sea area is covered with points?

I have a large number of lat/long positions at sea for a geographical area (stored as CSV). This geographical area also contains lots of land area. I want to divide the sea area into a grid (f.ex down ...
1
vote
0answers
38 views

Switching between python versions for Arcpy [duplicate]

I’m developing a multi-module project in Python. I’m new to GIS and my boss doesn’t have a strong technical background. I’ve been instructed to use the Arcpy module to do functions such as intersect. ...
0
votes
2answers
63 views

Using Python to field calculate Lat/Long with decimal degrees rather than meters

The below is a snippet of a python script that I am writing that basically adds two fields - Latitude and Longitude, then calculates them. I could use the Add XY Tool which gets me to the same point. ...
1
vote
0answers
10 views

Can't import liblas into OSGeo4w Python on Windows machine

I installed the 32-bit version of OSGeo4w with the liblas-python packages on my Windows machine. When I try to import liblas into python, I get an error that no 'liblas' module can be found, even ...
4
votes
1answer
48 views

Difference in destination location between pyproj and geopy

I am looking at ways to calculate (in Python) the destination location from a point given bearing and range. Based on the results comparison from the 2 libraries in subject(geopy and pyproj), I ...
0
votes
0answers
40 views

Code converting lat/long coordinates (WKT) to polygon (shapefile) not working

I am having a problem converting WKT to shapefile. I have a csv file consisting of three columns: ID, Name (of the area) and WKT comprising set of lat/long coordinates of area boundaries. For example, ...
0
votes
1answer
43 views

Determine start/end points for line slope calculation [duplicate]

This is a follow up question based off of this question. I have a line feature class representing storm drains and a point feature class representing where storm drains are connected. The point ...
0
votes
0answers
21 views

How can i upload two CSV file in QGIS Desktop App?

If I am using single file upload code it will work fine. self.dlg.lineEdit.clear() self.dlg.pushButton.clicked.connect(self.select_output_file) But I want to add more than one files it will give me ...
2
votes
0answers
31 views

Cul-de-sac (curve) turns generation in flow for parallel lines using ArcGIS for Desktop?

I'm using ArcMap 10.2 and I need to generate a parallel lines within the polygon and connect them one to other with the curve, with the proper radius and return radius (the same as cul-de-sac tool ...
1
vote
0answers
22 views

How accurate i pythons is_land? Alternatives?

I was planning to use Pythons is_land function, to differentiate between land and sea. However, after some inspection, I have major concerns in the accuracy. I cant find anything about this in the ...
1
vote
1answer
38 views

FeatureToPolygon (to cut polygons by line) not working correctly outside of ArcGIS

I asked a question yesterday, about splitting polygons using a line, and I ended up using the approach that is described in the comments here. Although this worked with my test data, it causes a lot ...
0
votes
0answers
37 views

SAGA version with QGIS 2.10

I want to know which version of SAGA is used with QGIS 2.10. I developed a standalone application which uses QGIS inside. I have problems using SAGA algorithms. SAGA is well installed but I found that ...
0
votes
1answer
28 views

Interpreting if statement in Python code? [closed]

Please help me to understand the IF statement in the following code. I got it from some samples. citybuffer = arcpy.GetParameterAsText(1) if citybuffer == '#' or not citybuffer: citybuffer = ...
1
vote
0answers
9 views

Using arcgisimage along with python basemap

I am utilizing maps provided through the ArcGIS rest service when i plot information in Python, but have some problems understanding the different options I have when I request I map. The ...
0
votes
1answer
21 views

Using ST_LINE_INTERPOLATE_POINT in OGR and python

I'm interested in finding the midpoint on a linestring using OGR and python. This can be a line with more segments. Could I use the ST_LINE_INTERPOLATE_POINT in python using the ExecuteSQL() method? ...
1
vote
0answers
31 views

Using ModelBuilder or Python parser of Field Calculator to check values between two datasets?

I have a *.dbf that I need to check values against for a shapefile. I need to report whether the values match the dbf in the shapefile and, if not, what the value should have been (in two new ...
0
votes
0answers
24 views

Problems using da.UpdateCursor in python Add_in to Edit Feature Class

I am currently attempting to create a Python Add_in tool which will perform a set of geoprocessing operations resulting in new values for a specific !shape.area!acres calculation on a new layer and ...
0
votes
1answer
30 views

Calculate field value based on lat long. Have longitude values which are negative?

Very new to python, fairly experienced with ArcMap. I am trying to create an alphanumeric index based on point locations My code string for the numeric part is here: def calc(!LONG_x!): if ...
0
votes
2answers
30 views

mapping.mapDocument() not working, but not throwing exception. path issue?

I'm working through the recipes in the Python cookbook, and am having some weird results. When I run the script (copied below) with the map reference listed as "CURRENT" from an open mxd from the ...
1
vote
0answers
56 views

How to wait for mapCanvas render before taking a screenshot?

i am trying to iterate over a large list of features and making a screenshot of the selected feature. My problem is that it seems to be a delay between the refreshing of the canvas and the taking of ...
0
votes
0answers
47 views

How can I upload CSV file in QGIS Desktop App?

Please see link : http://www.qgistutorials.com/en/docs/building_a_python_plugin.html I am using the same process for uploading a CSV file in a folder but it gives me an error. I am using this code: ...
1
vote
1answer
43 views

Calculating a z value in python

I have some contours where the z value is stored in the geometry and I want to display it as an attribute. I want to include this in a python script. I have an expression which does this in python ...
0
votes
0answers
24 views

Osgeo4w installation (qgis 2.8.2) error [on hold]

I am installing QGIS 2.8.2 through OSGEO4W installer (32 bits) but in this moment, I get several errors of "Unable to get license....." in some librarie. What is happening? Also, there isn't ...
1
vote
0answers
23 views

How to react to network events

I am in the process of writing a Plugin which should react to some data (XML-Format) sent via a socket connection. Since I have never worked with IPC in terms of python before and my knowledge of IPC ...
1
vote
1answer
49 views

Calculate slope of line based off of point layer

I have a line feature class that needs to have its slope included as a field. I have a point layer that contains points and their elevations for the start and end of the line segments. How can I ...
2
votes
2answers
46 views

Critical facility pipe connections in python

I'm trying to find a way to determine pipeline connections located downstream a critical facility and score how far those connections are from the facility. Is there a way to accomplish the above ...
2
votes
1answer
96 views

Cutting polygon using line - cutter, cut() - using ArcPy?

What I'd like to do, using ArcPy: use a line to split a bunch of polygons into separate parts. Here is what the inputs could look like: In this case the line should split each polygon into two ...
0
votes
1answer
32 views

Using a list to access database from a layer

I am trying to access the database using a list in order to put it in a loop but I can't make it work. I want to replace the months with a list variable. This is the hard core example: ...
1
vote
0answers
11 views

Couldn't load plugin sextantelwgeomprovider, QGIS 2.0.1 on Ubuntu 14.04.2

I'm getting this error message when I start QGIS Couldn't load plugin sextantelwgeomprovider due an error when calling its classFactory() method Traceback (most recent call last): File ...