Python is an open source interpreted programming language used in many GIS programs.
0
votes
1answer
14 views
Using python to do a interpolation on field calculator
I need to increment a row in attribute table:
def func (w,v,pot):
return pot + ((pot+1 - pot)/(v+1 - v))*(w-v)
The "+1" is not the addition of number one to the variable, is the intention to ...
1
vote
0answers
25 views
Use Anaconda's Python distribution within OSGeo4W
I want to use a Python script that executes Grass commands via os.system(). This of course, has to be executed from a running Grass session. However, when I use the OSGeo4W Grass, it does not find all ...
1
vote
0answers
12 views
Mapnik zoom_to_box for shape
I have used the code from Mapnik python tutorial. Now I want to use zoom_to_box to zoom to certain extent. I want to zoom to Box2d(-180.0, 0.0, 0.0, 90.0), however, after appied zoom_to_box, I saw the ...
1
vote
0answers
32 views
Getting current geoposition coordinates in Python? [on hold]
I want to get my current geographical address so that i can extract data from my database using address matching.
I am using django.
I know how to get coordinates in html 5 and address from ...
2
votes
3answers
65 views
Search and concatenate Landsat bands with Python
I have a number of Landsat geotiff (*.TIF) file in a folder. The problem is simple, I need to search certain Landsat bands from that list and make a composite tif image. I am using Orfeo Toolbox's ...
0
votes
1answer
28 views
Export or download feature layer table data from arcgis online using python or Arcpy
How would I export feature edit layers or their table data from arcgis online using Python or Arcpy? I want to download the attributes of a feature edit layer.
1
vote
0answers
18 views
Changes in MOD09A1 quality mask as processed with GDAL
I'm analyzing MOD09A1 spectral data using GDAL/Python. The quality mask is a uint32 dataset and want to pull out the value of the first bit to mask the spectral data (1 == poor data; 0 == good data). ...
-1
votes
0answers
17 views
Append Data, Find Duplicate “key”, Update other values using/search and updatecursor [on hold]
I have a process which uses a JSON web-service to append all data, sometimes data is updated for one service request meaning that if SR-1, OID1 is created at 09:00AM with a quantity of 1 but then ...
1
vote
2answers
28 views
medium resolution Earth coastal outline in tabular form
I'm generating my own images in Python and Blender. What I need is data that I can read directly from a table/file to draw coastlines with 1 to 10 kilometer resolution. I'm not familiar with high ...
4
votes
2answers
118 views
Create large amount of random points in binary raster
I want to create a point vector dataset of 10000 points (or larger) within a binary raster, where the points should be constrained to areas where the raster value is 1.
I tried the following steps.
...
-1
votes
0answers
14 views
parsing of string and put the value in dictionary [on hold]
I have to parse terms like "factor_date" , "config" and take the values of those (after = ) and put that into your dictionary input.
argstring="--config=gn_compare.config --factor_date=20150901"
...
-2
votes
0answers
15 views
Parse the string and put the value in dictionary [on hold]
I want to to parse terms like "factor_date" , "config" and take the values of those (after = ) and put that into your dictionary input.
argstring="--config=gn_compare.config ...
2
votes
0answers
20 views
PyQGIS with Pycharm CE 4.5
I'm able to run PyQGIS on my Mac (OSX 10.10.3) through the Python (2.7) console and through execution of Python files through my terminal. In order to do so, I added the following to my bash_profile:
...
1
vote
0answers
41 views
Reading, modifying and writing a geotiff with GDAL in python
I'm trying the learn the ropes of Remote Sensing image processing using Python GDAL bindings and numpy. As a first attempt, I'm reading a Landsat8 geotiff file, do a simple manipulation and write the ...
4
votes
1answer
31 views
Adding a PyQGIS Plugin to the Database Menu
I am developing a plugin which I would like to add to the Database menu instead of the default Plugins menu.
According to the PyQGIS Developer Cookbook all I have to do is add
category=Database
to ...
1
vote
0answers
10 views
Matplotlib Basemap Coastal Coordinates
Is there a way to query basemap to extract all coastal coordinates? Say user provides lat/lng and the function returns true/false if the coordinates are within 1km from the coast?
Links are more than ...
0
votes
1answer
25 views
Spatial Join Field Mapping
I know there already are posts about this subject, I tried to derive a solution for my own problem but the code for field mapping is very complex to me.
I have a Raster 100x100m and point layers that ...
0
votes
0answers
19 views
Open netcdf with python, using gdal [on hold]
I am trying to open a netCDF file using Gdal library in python 3, under win 7. Couldn't understand why this line of code return None value.
r=gdal.Open('NETCDF:"D:\Fire_codes\hum.nc":elevation')
...
5
votes
1answer
129 views
Python GDAL documentation
Is there an official documentation for the python GDAL module? There are various cookbooks, but scant information on each function or arguments for the most basic functions. halp!?
0
votes
0answers
22 views
how to save a layer file for each of the Raster elevations?
I have a 3mx3m grid raster and the elevation ranges from 0 to 29 ft. I would like to "Save As layer file" for every ft of flood inundation. Let's say I want a flood inundation map for 7 ft depth of ...
0
votes
0answers
19 views
Create new axis and values
I have a LAS dataset which contains points with x and y coordinates. For further analysis I need a new dimension which can be adjusted as the dataset requires. To make it understandable I made this ...
1
vote
1answer
25 views
How to map a point to a polygon label from a shapefile
I have a shapefile that breaks the city of San Francisco up into a number of different districts depending on who your supervisor is.
I need to make a lookup tool that takes a single long lat value ...
0
votes
1answer
15 views
Dividing area by distance to certain nodes?
I am interested in placing several markers/nodes on a map, defining a bounding box and then dividing that bounding box based on closest distance (straight-line) to a node. However, I'm really at a ...
-3
votes
0answers
33 views
How can I decreased polygon Shape in python? [closed]
I am using below code but i want to little bit decrease polygon Shape.
import shapefile
from PIL import Image,ImageDraw, ImageFont
import math
fnt_new = ...
1
vote
2answers
53 views
how to count character in arcpy script
can somebody tell me how can i count character in a field either using field calculator or cursor.
i tried the below code :
import arcpy
inputFeatureClass = arcpy.GetParameterAsText(0)
InputField = ...
2
votes
0answers
26 views
Some layers won't load when running application out of QGIS. “Item has already been added to this scene”?
I'm developing a basic application out of QGIS and am having trouble getting my code to generate all the layers I have set. Currently it only generates two of the four layers: "self.basemap_layer", ...
6
votes
0answers
71 views
Python/arcGIS to create outline around points (isochrone)
I am trying to generate my own iso-chrones using Google and Python and have reached a point where I can produce two data-sets which I would like to combine in the following way:
Points (reachable ...
1
vote
0answers
12 views
Automate new feature creation
I would like to automate digitizing and attributing new features in arcmap. If I have a feature class of GPS points and I want to automatically create new points that will snap to the GPS points. Is ...
1
vote
1answer
66 views
Create polygons from points representing the corner vertices (ArcGIS)?
I am on ArcGIS 10.3.1. I have a point feature class that represents the corner vertices of the polygons. They are located in a regular grid. The labels represent the OBJECTID. The points can be ...
0
votes
2answers
97 views
How can I read MrSID files in Python (using gdal)?
I have to read a large number of MrSID images and process them in Python. I usually access GIS file formats using the gdal application and the gdal Python library. However, the gdal package for Python ...
0
votes
0answers
23 views
PostgreSQL equivalent of ArcGIS “Eliminate” function?
I am looking to eliminate small slivers in a shapefile dataset using PostgreSQL. What would work to dissolve features < 0.1 hectares into the neighbour with the longest shared boundary (1) or the ...
3
votes
1answer
79 views
Problems with nested loops - How to start from 0?
I have :
12 lines feature classes (lineFC)
A polygon feature class (grid)
Another polygon feature class with much bigger polygons (gridDivision)
The process:
Select one lines FC from a list
...
0
votes
2answers
47 views
ArcGIS calculate difference between rows in the same field that is date time format
I'm looking for help tweaking the python code discussed here: Attribute Table Subtract Value From Previous Value
I'm having trouble figuring out how to adjust it for a date field in which I want to ...
1
vote
1answer
31 views
How to see the 'example provider' in processing toolbox of QGIS?
I would like to create my own provider with the processing toolbox. I see the example provider in my folder C:\QgisWien\bin...\algs\ExampleProvider.
It seems to be a good start but unfortunately, I ...
0
votes
0answers
37 views
Converting raster image of floor plan
I'm looking for ways to convert a raster image of a floor plan to workable data in a sense that the program should be able to locate the destination by referring to the co-ordinates of matching ...
1
vote
1answer
43 views
My plugins crashes with “No module named qgsprojectionselectionwidget” in Windows
My Python QGIS plugin works on Ubuntu (at least for me, and all fatal bugs reported so far are solved), but when I run it on QGIS installed from the official 2.10.1 64-bit installer for Windows (on ...
0
votes
1answer
21 views
Executing published geoprocessing service for customized GP tool from Python scripting?
I have published the geoprocessing services for a GP tool.
How can I use this link in python scripting to execute the GP tool?
...
2
votes
3answers
40 views
How to create a Projection from a CRS string using pyproj?
I'm trying to convert between two coordinate systems using pyproj:
import pyproj
p1 = pyproj.Proj("+init=EPSG:4326")
p2 = pyproj.Proj("""PROJCS["NAD27 / California zone ...
1
vote
1answer
39 views
How to edit shapefile name written to attribute table in QGIS?
I have adapted some QGIS pythonscript code from a previous question to assign the filename of a shapefile to that shapefiles attribute table as a prelude to joining multiple shapefiles together (the ...
0
votes
0answers
39 views
get latitude and longitude of each grid point in a grid with squared cells based on a given shapefile
I would like to draw a grid whose cells are all squared on a given shape file.
The shape file has the information of U.S. map at zip code or county level.
I need to create the squared grid (with a ...
1
vote
1answer
15 views
Add Color To GTiff output raster band
I am using GDAL in Python to create a tiff raster of data that is originally from a shapefile. I have an auxillary data channel, which I would like to use to color the pixels of the tif. I have made ...
1
vote
0answers
17 views
How to fix Openlayers Plugin error with proxy.setPort()? [duplicate]
I'm looking for some assistance sorting out an OpenLayer Plugin error I've received since installing it. I immediately receive a Python error with the following text (I apologize for the wall of ...
1
vote
1answer
19 views
Connecting points located in opposite side of international date meridian
Given a list of coordinates, I need to create a line shapefile joining each of the point with a Python GDAL/OGR script.
The procedure described here Convert XY points to a line?
works fine in almost ...
1
vote
0answers
48 views
Tabulate Areas is losing rows [closed]
I've got a feature layer of certain fields (which I converted to raster), and a raster layer of different vegetation types. I now want to compute the area of each vegetation type for each field. For ...
0
votes
0answers
14 views
In Python, How to Encode and Decode Complex Data for a OWSLib WPS call to PyWPS-4?
In Python, how can I encode "complex" (vector) data for a WPS call that just echos back the data, and decode the data from the result. I was planning on using OWSLib on the client side and PyWPS-4 on ...
0
votes
1answer
69 views
Using Python to compute the distance between coordinates (lat/long) using haversine formula and print results within .csv
I have a .csv file with 3 columns. The first column is titled Distance and it is empty. The second and third columns are titled Longitude and Latitude which contain coordinates, for example:
...
0
votes
1answer
61 views
Error 999999 when converting a point feature class to a raster in python
After having converted my xyz-file to a point feature class, I am trying to convert to a grid using a Python snippet. The data represents river bathymetry. However, when executing the script, I get: ...
0
votes
0answers
34 views
stack raster using GDAL and numpy dstack
I am testing Savitzky-Golay filter with my MODIS dataset. Currently I am testing for 10 rasters (but later on will use my whole dataset) only just to test how should I create my script. So my initial ...
0
votes
1answer
37 views
Importing updated CSV values to feature class fields?
Some time back I had a requirement to develop an automated method (Python) to update field values for a spatial points dataset in an Oracle 11g SDE database (exported to GDB for testing). Im Using Win ...
0
votes
0answers
35 views
ArcGIS/ Arcpy: UpdateCursor with only one feature
System: ArcGIS 10.3 with Python 2.7.8 on Windows7 x86
Background:
Build a Python script do get drive times from the Google Maps DistanceMatrix and copy the results to an attribute table. The script ...