Python is an open source interpreted programming language used in many GIS programs.
9
votes
1answer
481 views
How to implement MultiValue Parameter with Multiple Columns?
This might be a simple question, but I haven't been able to find a straightforward answer.
I'm working on an ArcGIS (9.3) Python script. One of the inputs is a list of features. For each feature, I ...
7
votes
1answer
152 views
Determine minimum number of polygons from shapefile to cover an area of interest
I have a large number shapefiles representing areas of interest for an analysis that will be conducted using various sources of satellite imagery (IKONOS, RapidEye, etc.). Unfortunately, the imagery ...
6
votes
1answer
1k views
Python Script to Create Table Using Data Driven Pages
I am trying to convert some python script to display a table (based on a dbf) of features located within a specific data driven page. So far, I have the script successfully able to refresh the map to ...
5
votes
1answer
188 views
How to load raster data with hyperlink path in ArcGIS MXD?
I have a problem/question and hopefully someone of you is able to help me:
I have thousands of georeferenced raster files which have corresponding polygons (outer borders of rasters) with a hyperlink ...
5
votes
1answer
161 views
Changes in synchronized replica not shown in ArcMap or ArcCatalog without refreshing
I am synchronizing a one-way replica in ArcEditor using Python. I tried adding RefreshActiveView and RefreshCatalog to the code, but I still need to refresh the synchronized database to see the ...
3
votes
1answer
60 views
Why are z-values replaced with zero after in_memory use in Python?
My script takes separate 3D feature classes, calculates a field, appends to a target feature class, and then deletes the originals. This is a huge data processing task of over 4700 mass point feature ...
3
votes
1answer
93 views
changing symbology
I have problem with my script. Layers are in one geodatabase, and have names like: orne1942, orne 2003, orne 2009 (the same forpart e.g. orne). Script should changing symbology layers wich have the ...
3
votes
1answer
102 views
How to add an image to an existing data frame using Python?
This is the first time I am using Python on my own, and I have searched for this answer for a few hours with no luck. I am wanting to take a .JPG imgae and put it in a data frame. The image has to ...
3
votes
1answer
186 views
Creating Selection MapTool in PyQgis Custom Application
I'm developing a custom GIS application using PyQgis API.
How can I let the user select features on the map using Maptools? I would like to replicate the select feature there in Qgis to make the ...
3
votes
1answer
147 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 ...
2
votes
1answer
59 views
Writing python plugin: How terminate plugin from script without closing QGIS?
I'm writing a QGIS conversion plugin in python to be able to create Obstacle-files for a model from shapefiles.
What I want to do now is just to close the plugin cleanly. This means, to close the ...
2
votes
1answer
69 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 ...
2
votes
1answer
88 views
Need help assigning values to field using OGR in python
I've got a similar question to this one How to programatically populate a shapefile field with polygon areas in OGR?, but the solution doesn't seem to be working for me. I am trying to import a ...
0
votes
0answers
35 views
SQL statement in MakeTableView_management
EDIT: Finally found a way around this..
expression = "[Route] = '" + route + "' AND [Trip] = " + str(trip)
arcpy.MakeTableView_management(solutionTable, "solutionView", expression )
I tried str() ...
0
votes
0answers
37 views
Installing ActivePython in ArcGIS Python Directory?
I want to install ActivePython on my computer, but I also have Python 2.7 pre-installed with my ArcGIS 10.1 version.
The directory for the .dll's and such is:
C:\Python27\ArcGIS10.1
ActivePython ...
0
votes
0answers
102 views
how to plot point on openlayer google street layer programmatically
I want to plot points on google street layer using python programming and postgresql database.
Mainly I want to extract data from database and plot it on the google street layer on Quantum GIS 1.8 ...
0
votes
0answers
38 views
compare features attribute
I have a polygn layer and each polygon has the MEAN elevation as an attribute.... I want to write a python script to select each polygon and compare its elevation with its neighbourhood polygons and ...
0
votes
0answers
82 views
using mapnik xml file to render tiles in python
Is it possible to use an xml file in python? without using the bindings for python for mapnik. basically i'm using django/geodjango, postgis and well i decided i'd try and design the map on tilemill ...
0
votes
0answers
217 views
Python package for Google Maps API v3?
I am looking for a Python package that can generate the JavaScript to display Google Maps API v3. I would like to integrate such package into a django website.
I know pymaps exists but it's for ...
0
votes
0answers
34 views
Accessing Windows Mobile Devices for use with arcpy
I would like to build a small script that accesses a Trimble Juno SB (Windows Mobile) and makes a copy of a specific set of shapefiles on the unit's SD card. I would like to do this via a USB ...
0
votes
0answers
27 views
How to find-and-correct junction(like T, X, and more) for huge amount of data
I have made polylines by arc-scan from a tiff image. This polyline feature has 30,000+ polylines.I will make polygon feature from these polylines.Now,before making polygon i need to correct and clean ...
0
votes
0answers
21 views
ArcGIS Python CreateCompositeAddressLocator_geocoding
All, a good day. I would like to know who ever worked with this method? I would like to know on what basis is formed by parameter "in_field_map". Thanks in advance.
0
votes
0answers
57 views
How to access the rules of QgsRuleBasedRendererV2 using python?
I can't get access to the rules of rule-based renderer, python says there's no attribute "rootRule", though documentation says it should be (http://www.qgis.org/api/classQgsRuleBasedRendererV2.html)
...
0
votes
0answers
95 views
How to re-project the EASE (Equal Area Scalable Earth) grid with a ~25 km cylindrical projection to WGS84 0.25 degree?
I have nc files ,here is one file https://echange-fichiers.inra.fr/get?k=LUfqiyO1Dl7az5bihnS. from the metadata ,the projection is cylindrical and the resolution is 25 km:
...
0
votes
0answers
81 views
Regional statistics from a dataset (point inside a polygon aka region)
I am relatively new to GIS and I am trying to do some geographical analysis on same data I've collected. The dataset I have consists essentially in a file with the following format:
...
0
votes
0answers
36 views
Associate media to gpx vector layer from Python Console
Essentially, I would like to have the description in the form of text annotations when i hover my mouse over the gps entry. And if i click the same, it should display the images.
So I started off by ...
0
votes
0answers
80 views
Can I do full SQL expressions through the “WHERE” clause in UpdateCursor?
Run as a standalone python script for a shapefile in a toolbox on ArcMap.
For example:
psql_url_pop = '''SELECT shapefile.NAME_# + shapefile.WIKI_URL FROM public.shapefile'''
rows = ...
0
votes
0answers
61 views
How to apply an existing symbol in pyQGIS?
I'd like to change the layer rendering style from python code.
Basically I want to do the same operations I can do from QGis by:
Right-click on a layer
Select Properties
Select one of the displayed ...
0
votes
0answers
31 views
Creating a QgsSvgMarkerSymbolLayerV2
When trying to create a QgsSvgMarkerSymbolLayerV2 in the python console in QGIS, i get the following error:
Traceback (most recent call last):
File "", line 1, in
NameError: name ...
0
votes
0answers
243 views
Unable to delete .lock files within geodatabase using Python
I am having problems with lock files while deleting and copying geodatabases for backup purposes.
print "Now backing up your Geodatabase"
distutils.dir_util.remove_tree ...
0
votes
0answers
116 views
convert from c# to python
I develope an application with c# to create offset in arcgis . i want to convert this application to python . how can i do these in python? I try to use this sample . it was very helpful for me but i ...
0
votes
0answers
99 views
QGIS python console projection transformation
I need to write a python console script in QGIS to do the following:
1) convert a simple KMZ to a shape file format
2) reproject from WGS84 to British Grid (OSGB_1936)
This is to automate the 2 steps ...
0
votes
0answers
79 views
How to create a pop up attribute table for each crash located on a roadway segment in arcmap
I am trying to create a simple user interface that displays information for each crash located on the routes. I also need to display a graph along with that. I am a beginner in Python with no prior ...
0
votes
0answers
63 views
missing link between toolbox and tool (python)
I want to run a arcscript to do batch work.
However, the error always showed that environment or tool not found.
(gp.SplitByAttribute(inputFC, fieldName, outputWS, filePrefix)
AttributeError: Object: ...
0
votes
0answers
177 views
ArcPy TableToTable conversion does not work when published to ArcGIS Server
I have a python code that uses ArcPy command "arcpy.TableToTable_conversion" to convert a database table to a dbf file.
arcpy.TableToTable_conversion
The input table is from a SQL Server database ...
0
votes
0answers
183 views
Qgis python plugins development with Eclipse
I'm using Eclipse's PyDev extension to develop python plugins for Qgis.
I did the required configs for the interpreter in Eclipse to be able to use python.
When I start a PyDev project, all the Python ...
0
votes
0answers
52 views
xml style file to highlight railway with generate_tiles.py + mapnik + planet.osm
I would like to know how to write an xml style file, so that I can render a map with only railways and country borders.
so far I can successfully use the demo file to generate all the information. ...
0
votes
0answers
91 views
How to make pyproj work in py2exe package?
I have a python script where I use pyproj as follows:
..
from pyproj import Proj
from pyproj import transform
..
def transformation(extent):
wgs = Proj('''+proj=longlat +ellps=WGS84 +datum=WGS84 ...
0
votes
0answers
94 views
How to build QGIS with Python on Redhat?
I'm attempting to run QGIS on Redhat 5 64 bit architecture. Version of Python is 2.4.3. Version of QGIS is 1.7.4 (wroclaw).
When I run qgis, the splash screen appears, followed by a QMessageBox that ...
0
votes
0answers
84 views
problem in loading python mapscript
i have installed python mapscript but when i'm trying to import it in IDLE by giving
import mapscript
command , an error is being displayed
Traceback (most recent call last):
File "", line 1, in
...
0
votes
0answers
85 views
Change Detection on bitemporal multispectral images - data simulation
I want to try several "backgrounds" for change detection on bitemporal images (satellite images of the same place but in different moments in time). Images consist of 5 bands. I have python ...
0
votes
0answers
115 views
Error publishing gp model with python script as a service
I'm attempting to publish a toolbox to ArcGIS Server. The toolbox contains a model and a custom python script. The model calls the script. It runs fine in the desktop but when I publish as a service ...
0
votes
0answers
86 views
Add AutoCAD paper space to Arcmap using Python
This post is an addition to this post.
I'm trying to add the autoCAD paper space to arcmap as it contains information I require. Right now I can add the annotation layer and pull data from records, ...
0
votes
0answers
109 views
Export Data Driven Pages extents to Kmz
Is it possible to export the extents of DDP to KMZ using arcpy - Map to KML (Conversion)? Alternatively can we export each extent of a single DDP extent to a new mxd and then run arcpy.MapToKML_3d on ...
0
votes
0answers
67 views
How can I convert a Winkel Tripel map to a Mercator map?
I have a map of the world (a PNG file) which uses Winkel Tripel. I'd like to convert it to Mercator. I would just use pyproj, but it lacks an inverse "wintri" projection.
0
votes
0answers
297 views
Large point to Polygon by buffer-join-buffer-dissolve issues
I have a few large datasets (about 10 million points) which I am buffering, then joining, dowgrading and finally buffering and dissolving. This is all in a model which works fine with sample smaller ...
0
votes
0answers
142 views
How to enable user to specify field mappings from a table joined to a feature class?
I have a feature class and a new table every few days. I need to have the table's attributes added to the feature class based on a join. What would be a good interface in ArcMap to let the user map ...
0
votes
0answers
189 views
Missing QGIS python plugin database connectors
I am working with python plugins for QGIS.I developed my plugin and inorder to incooperate the same into QGIS i copied the folder in
C:\Documents and Settings\comp90\.qgis\python\plugins
I opened ...
0
votes
0answers
516 views
Radius of Curvature Python/Arc, how access x,y coordinates
I have a polyline in ArcMap 10 and I am able to script the length of the line in Python using this bit of code:
#Calculate Radius of Curvature
#try:
# Import system modules
import sys, string, os, ...
0
votes
0answers
85 views
Is there a better method to fix empty pixels after classification?
empty pixels occurs after classification - in arcmap you can use Generalization tools such as majority filter. However is there a script you could write to better fix it? for example - some of the ...


