Python is an open source interpreted programming language used in many GIS programs.
2
votes
0answers
136 views
Is there any way to suppress the calculate field dialog box in arcpy script?
I've got a python script that I inherited. The python script takes input from a variety of feature classes and tables and spit it out to a single table. When I run this script via a scheduling ...
2
votes
0answers
116 views
How to change the QGIS help dialog?
I am working with python plugins for QGIS. I am done with my one of my .py file using python 2.5 and pyqt4. It is just help file for QGIS, which i changed. I wanted to incorporate the same in QGIS. I ...
2
votes
0answers
103 views
Create Data Frame or Group Layer
I am attempting to write some Python code which creates a blank data frame or group layer which can then be populated with other layers. I'm at a loss as to how to do this since I'm somewhat new to ...
2
votes
0answers
364 views
Perfectly running python script gives error when run from web.py
I have the following python script which runs perfectly if run separately:
import arcpy
val = arcpy.GetCellValue_management("D:\dem-merged\lidar_wsg84", "-95.090174910630012 29.973962146120652", ...
2
votes
0answers
428 views
Spatial Analyst Cell Statistics seems to give the wrong answer in ArcGIS 10.0
I have a script that calculates standard deviation for a list of grids using the Cell Statistics function in Spatial Analyst for ArcGIS 10.0 The syntax is this:
stdevGrid = ...
1
vote
0answers
25 views
Problems running zonal statistics - not all zones represented
I have been working on a Python script to automate the steps illustrated by whuber here:Create points around the edge of viewshed results
I am trying to create a horizon graph illustrating the ...
1
vote
0answers
49 views
Averaging satellite data with missing values (using Python)
I am using sea surface temperature, chlorophyll, and other data parameters as covariants in a model, and I would like to average them over a particular time period.
I am currently doing this using a ...
1
vote
0answers
26 views
Running a QC check for gaps between vertices on a polyline
I'm checking polylines to make sure power pylons were correctly extracted from imagery. Is there a way to find all of the gaps or missed pylons in the database? Currently, I'm manually making a ...
1
vote
0answers
55 views
Calculate Field using Esri Python Addin
I am trying to select a polygon then it must automatically change (calculate) the status to "C". The tool seems to work in the background but nothing actually happens (the status is not updated). I ...
1
vote
0answers
28 views
How to programmatically change an SVG symbol in the Vector Layer?
I'm trying to change the symbol used in a layer via Python. I've been able to tunnel through a vector layer to the symbol layer, but I don't know how to change the symbol it's using. I'd like to ...
1
vote
0answers
38 views
Clipping Buffers
I have buffered a line shapefile where many lines are intersecting but not broken at intersections. I am trying to select each record in the buffer file and clip all intersecting polygons in the same ...
1
vote
0answers
21 views
How to identify grid shift file used by osgeo in Python?
I wrote a Python script reprojecting points from a source coordinate reference system (SCRS) to a target one (TCRS) both identified by an EPSG code.
I would like my python script to retrieve details ...
1
vote
0answers
83 views
How to transfer the attributes of features based on their spatial relationship?
I'd like to check if a point feature class is placed on a line feature using python in ArcGIS 10.0. I have created a set of point features and placed them directly on a group of line features at ...
1
vote
0answers
80 views
How to calculate average value within a polygon(in Qgis with Python)?
Now I have a point and polygon shapefile
and I want to calculate the points' average value within each polygons
How to do it with python?
I tried to find out but google gives me a lot of raster ...
1
vote
0answers
42 views
Using Python to Switch Layout Templates
Using ArcMap 10.1: Since there is not a way to control portrait or landscape of the layout view through python, is there a way to switch layout templates without opening a new mxd through python? ...
1
vote
0answers
54 views
Is there a way to call the clip function in QQGIS from the python console?
Is there a way to call the clip function in QQGIS from the python console? It is found under geoprocessing tools in the vector menu.
1
vote
0answers
113 views
Get the distance between 2 WGS84 GEOSGeometries
I currently want to check if 2 given GEOSGeometry objects of type Point are within 100m of each other. (length flexible)
Looking at previous asked questions on this topic, most of the answers were ...
1
vote
0answers
54 views
Creating Raster with values based on function output
I have a function that calculates a price based on the input slope and distance. I want to write the price to a raster as the rastervalue. How do I do that? OpenSource and ArcMap solutions would work.
...
1
vote
0answers
34 views
Couldn't load SIP module - python disabled
Recently my QGIS started refusing to load SIP module, from day to day without any significant changes in the system (I'm on Windows7 x64). Message thrown at startup:
Nie można wczytać modułu SIP. ...
1
vote
0answers
43 views
Select polygons by cutting sequence with guide and sequence-dependent number
40,000 polygons with randomly distributed ID's are to be numbered in ascending order in a field of a table. The order of the numbering is defined by the direction of the guide. Is there a solution? ...
1
vote
0answers
38 views
Python Program for “QC of PDFs Created from Data Driven Pages”
I need some help. I am fairly new to Python. I found a sample code and I need to change a couple things in it for it to work. I need it to make sure that all PDFs were created from the Data Driven ...
1
vote
0answers
46 views
Script Tool Problems ArcMap 10.0
I Have a scipt tool that runs when input shape files are added from the table of contents (added from drop down menu.) However this tool will not run when they shape files are added using the add file ...
1
vote
0answers
38 views
How to select from relationship class using python
Good day to all,
How can i Imitate the "related table" button and move from selected feature to his relaetd feature using python ?
Thanx alot
Geog
1
vote
0answers
71 views
Why is not ST_GeomFromEWKB() working?
The following SQL is working fine from the terminal:
SELECT MIN(ST_Distance(
ST_Transform(ST_GeomFromText('POINT(-3.163916 55.926528)',4326),32630),
...
1
vote
0answers
43 views
Extract an ArcSDE datasets (rasters/shape files) using python?
I would like to write a python script to extract/export a dataset (rasters/shape files) in ArcSDE. I saw this posts to connect to the server:
Define Workspace for SDE Connection in Python
But how ...
1
vote
0answers
77 views
How to handle mmqgis geocoding IOError: [Errno socket error] [Errno 101]?
I try to geocode a .csv file with QGIS + mmqgis plugin.
But, since some days the plugin always crashes.
I tried it with QGIS 1.8.0 on an Ubuntu 11.10, OSGeo-Live v6.0 (which is Xubuntu 12.04.2 LTS) ...
1
vote
0answers
60 views
Table record counts change when using python tool
I have a python tool which investigates mxd files and clips/projects and exports all visible datasets. Recently I've found that the record counts (even on non-clipped data) is different. It's ok if I ...
1
vote
0answers
47 views
problem in read_shp() to generate a networkx.DiGraph from point and line shapefiles
I tried to use the Python module networkx and specifically the read-shp () to ensure the transformation of a graph to a file sharpe but I always find this error noting that this is the first time I ...
1
vote
0answers
104 views
Morphometric and hydrological analysis with Python and ArcGIS
How can I write a program using python, that calculates some morphometric and drainage indexes using numeric attributes in the attribute table with ArcGIS?
The data I have in my table are area and ...
1
vote
0answers
119 views
How to update polygon field with point count for multiple rows? (Temporal point-in-polygon)
I have a shapefile with several regions. It contains basic info like ID, Code, Name1, Name2, etc.
It is overlaid with a shapefile of points (nearly 200k). Each point represents an event with a type ...
1
vote
0answers
42 views
Why does the method partCount in ArcGIS always give back a value of 1?
Does anyone knows why method "partCount" in arcgis version 10.0 always gives me back value 1, even when I have object with interniorring or multipart object?
partnum = 0
partcount = feat.partCount
...
1
vote
0answers
113 views
How do I find the pgAdmin connection parameters?
I need to create a connection from arcmap to pgadmin using a python module because of an arcpy script, but I am unsure of how to get the pgadmin connection parameters. I think it may be some kind of ...
1
vote
0answers
123 views
How does QGIS execute Python plugins?
I am trying to run a python script from within a python plugin. The script runs a CGIHTTPServer in a separate thread. It works as expected when executed from the command line and i can issue requests ...
1
vote
0answers
157 views
How to debug 'Layer is not valid error' from Python plugin?
I'm trying to understand what goes wrong with a QGIS python plugin.
Basically I'm trying to render a series of POINT.
The query works fine, at least giving it by hand from inside PostGIS DB:
"SELECT ...
1
vote
0answers
78 views
Localized Linear Histogram Match using python
I would like to use the local linear histogram match for filling the missing pixels of a Landsat 7 image with another older image (SLC Gap-Filled Products).
Do you have any idea how can I do it by ...
1
vote
0answers
29 views
Is it possible to script ISIS Mapper?
Does anyone have any experience of scripting or batch processing with ISIS Mapper?
I am working on a large modelling and mapping project that will require the processing of significant numbers of 1d ...
1
vote
0answers
41 views
Arcmap remembering settings when python tool is run on them
I have a Arcmap template in a folder, that looks like this notice the page orientation.
When I use my python tool on Arcmap (runs as standalone), which copies the templates over to another directory, ...
1
vote
0answers
123 views
How to use the OGR/GDAL configure options in QGIS python environment
I’m looking for a solution how to use the OGR/GDAL configure options (--config) in the qgis python environment. http://trac.osgeo.org/gdal/wiki/ConfigOptions
Setting special configure options is ...
1
vote
0answers
77 views
How to construct a line from points in pyshp?
I am reading a shapefile for a pipeline and what I've noticed is that if I just draw a line from one point to the next (in the order I read them), there will be points where the line terminates, and ...
1
vote
0answers
99 views
zonal statistics in Python crashes
I have a python script that works (it's worked for several other projects in the past and it worked for my current project initially). But whenever I run it, Python crashes sporadically. It would go ...
1
vote
0answers
64 views
How to get the geometry of a polyline to a specific precision?
In python, I use point = geom.asPolyline() but it looks like I am not getting any precision just whole numbers? How can I get the geometry and a certain precision?
1
vote
0answers
41 views
QGIS Loaded Plugin Access
Fellow Users,
Can you plz tell me how I can programmatically (or from the console) access the loaded plugin list? I tried:
QgsProviderRegistry.pluginList()
but got:
TypeError: ...
1
vote
0answers
79 views
python multiprocessing error in QGis (Windows)
I have this error when I try to use Manager() from python multiprocessing library.
(Just start QGIS open Python console and execute the two following lines)
>>> import multiprocessing
...
1
vote
0answers
97 views
Is there any python function to rotate map layers?
Is there any python function allowing a user to rotate map layers in the map canvas. If so, could you please point this out for me?
I want to rotate a map layer, using a factor of rotation in ...
1
vote
0answers
184 views
Why won't this PostGIS query display in QGIS
I am having trouble rendering the following PostGIS query in qgis1.803.
SELECT
s.musym,
st_intersection(s.the_geom,f.the_geom) as geo,
nextval('"soilsplittersequence"'::regclass) as k
From ...
1
vote
0answers
186 views
How to drop ArcSDE connection using Python scripting?
I want to be able to control connections to ArcSDE via python. Here is my script so far using ESRI's example.
import arcpy
from arcpy import env
env.workspace = r"SDEConnection"
fcList = ...
1
vote
0answers
41 views
How to call a method when self.iface.actionSelectRectangle().trigger() is released?
In my QGIS python plugin I use "self.iface.actionSelectRectangle().trigger()" to select features. I also have a button which changes the attributes of the selected features.
Is there a way instead ...
1
vote
0answers
107 views
qgis and embedded ajax (bing map)
I need to load in a docked QWebView this html:
< html >
< body >
< iframe width="100%" height="499" frameborder="0"
scrolling="no" marginheight="0"
marginwidth="0"
...
1
vote
0answers
143 views
Hack to change data source of a layer file in ArcGIS 9.3.1 with python?
I'm looking for a way to change the source of my layer file using python. Actually I want to do this because I need to re-use a XSL template which is defined under the tap HTML popup of the layer ...
1
vote
0answers
372 views
Looping multiple feature classes in python for ArcGIS 10
I currently have a large list of feature datasets and dbf tables in a geodatabase. I would like to join each shapefile with its matching DBF file using the "Make Query Table" tool and then "Copy ...