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

learn more… | top users | synonyms

1
vote
0answers
29 views

Is this algorithm Possible?

I have some basic notions of python. I would like to know if this algorithm is feasible in ArcMap: -loop through all entries in a dBase table -for each entry, open the related table (Shapefile ...
-2
votes
0answers
40 views

Why would this script only load 14 out of ~13,000 feature classes to the topology?

The following script adds ~13,000 feature classes in a gdb into an existing topology. If I want to add rules to said topology, would I write a second script or include it within this script below? ...
1
vote
0answers
9 views

How to run a tool from Whitebox GAT in ArcGIS?

I have a series of tools that I need to run in ArcGIS to hydrologically condition my DEM, but the first step in this process is running the Breach Depressions tool from Whitebox GAT (I have found that ...
5
votes
3answers
3k views

Python: Combine multiple Shapefiles

i have got a lot of Point-Shapefiles (r20010101.shp, r20010202.shp, r20020101.shp...). Each of them has the same amount of points at exactly the same location. In a column that is named after the Date ...
0
votes
0answers
24 views

How to sort points in a proper order using arcpy? [duplicate]

As the picture shown in below that i have bunch of points distributed in an area. The problem is that their attribute records of each points is not in a proper order as u can see in the left bottom ...
1
vote
0answers
11 views

how to make rectangle selection by mouse on my map(world shape file) in qgis in python

I wanna do rectangle selection by mouse on my map(world shape file) in qgis in python and extact the lat log of selection area but I am unable to understand how to do it I never get any idea i am new ...
0
votes
2answers
179 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 ...
1
vote
1answer
13 views

How to read non-spatial data using PyQgis?

I'm generating maps with QGis. What I do is generate a bunch of non-spatial data on a set of cities (using VBA), and still using VBA, generate a python code that will automaticaly output general map ...
1
vote
0answers
13 views

How to accelerate my python looping process for A-star path finding on DEM surface?

I try to make an A-star Path Finding program base on tile-graph (image raster data as graph) where each pixel values represent as cost and elevation.. In my case, DEM raster data was called by using ...
-1
votes
1answer
76 views

Is it possible to import/run AML script into GRASS?

I have an AML script that has instructions to import tmp files of (grid, network, basin...) is there any way to run the script in GRASS? I tried to converted to Python but I couldn't do it for the ...
0
votes
1answer
691 views

How to run an AML in Python?

I am trying to run an AML in a python program I am writing and haven't been having much luck figuring out the correct way to run the AML. The AML requires ArcInfo Workstation to be from the GRID ...
1
vote
2answers
185 views

AML routines and python

I´m trying to use some AML files in ArcMap 10, but I have noticed that this option is not available for this version. Does anyone know or tried to "translate" the aml sequences to another language ...
0
votes
0answers
22 views

How to Access tables and feature classes stored in Dropbox using Python

I stored some tables and shapefiles in by academic Dropbox account. I am trying to write the code block that will set the directory path to the featureclasses in Dropbox to a variable that can be ...
1
vote
0answers
8 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 ...
-1
votes
2answers
41 views

Accessing Point Cloud Data [on hold]

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 ...
2
votes
1answer
20 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 ...
1
vote
0answers
26 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
13 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 ...
41
votes
11answers
34k views

How to install GDAL with Python on windows?

Can anyone please explain to me in step by step instructions how to install GDAL/OGR with Python on Windows. I have Windows Vista and I have tried following the information on the website and it does ...
4
votes
1answer
50 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
22 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 ...
0
votes
0answers
24 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 ...
1
vote
1answer
457 views

Using GDAL to read dted files

How do I get the elevation at a certain point using gdal to read in a dted file? I don't see much useful information out on the web. I'm sorry I should have been more specific. How would I ...
5
votes
2answers
765 views

Python Script to convert a mass of KMLs to a single fGDB

I have a mass of KML files, approx 350+ that I need in a single fGDB. I lifted a string of code from ESRI help to attempt to do this - I got it working to the point of creating all the individual ...
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
48 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 ...
2
votes
0answers
45 views

Gdal Python Problem : Black strips in geotiff

I am trying to use GDAL (2.0.0) Python API in Blender, but I am having some difficulties. I am trying to save geotiffs for : - a 2D numpy array storing 32bits floats - a 3 channels rgb numpy array ...
11
votes
2answers
4k views

How to read Excel sheet in ArcPy script?

I'm writing a python code to convert X,Y points in excel to shapefile. In this process i have toread xy points from shhet1. What is the step i have to include in my process to read data from sheet1 of ...
0
votes
1answer
245 views

Cause of ArcGIS Raster Calculator Parsing error <type 'exceptions.SyntaxError'>: invalid syntax?

This is my first attempt at much code in the raster calculator of ArcMap 10.0, but I think I'm close. I have nine rasters (A-I below) and want a new raster with value = 1 where any of the rasters ...
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? ...
5
votes
3answers
320 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 ...
2
votes
0answers
32 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
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 ...
2
votes
1answer
149 views

How to print 2 maps in the same PDF page using PyQGIS?

I am trying to generate a one-page PDF document containing the following items: 1) On the left half, a full state map (say, New York State). 2) On the top right quadrant, a map that zooms in to one ...
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: ...
0
votes
0answers
32 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 ...
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
134 views

Extending ArcGIS Desktop using Python vs Visual Basic vs Java? [on hold]

I have to extend the features of ArcGIS. I've been asked to create a model written in Python that can run out of ArcGIS 10. This model will have a simple user interface where the user can drag/drop ...
0
votes
1answer
511 views

Transforming between epsg:3857 and Google Maps Tile coordinates

Hio, I used to use a simple python project (https://github.com/hrldcpr/mercator.py) to convert between wgs84 and google maps tile coordinates. This project doesn't have a license, and looks like it ...
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")) ...
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 ...
1
vote
1answer
27 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 ...
7
votes
4answers
7k views

Programmatically start and stop map services with Python

Is it possible to programmatically stop and start ArcGIS Server map services using Python?
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 ...
1
vote
1answer
37 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 = ...
2
votes
2answers
313 views

How to determine the coordinates of the corners of the raster layer

How can we determine the coordinates of the corners of the raster layer? The image opens function QgsRasterLayer.
0
votes
2answers
65 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
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
1answer
47 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
22 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, ...