4
votes
1answer
149 views

Why is matplotlib installed with ArcGIS?

Today I upgraded to ArcGIS Desktop 10.2.2 as well as the 64-bit background processing tool and noticed that both numpy and matplotlib were installed with Python. In fact, in the "What's New?" section ...
1
vote
1answer
34 views

gdal_proximity distance to meters

I followed the answer given in this topic for searching the distance to the nearest coastline given a lat/lon coordinate. The distance output obtained is in degree (I think) but I need the distance ...
4
votes
1answer
76 views

XYZ Clustering in Python and numpy arrays

I am looking for a method of clustering XYZ data in Python that works on numpy arrays. I know of a few sources, such as clusterpy and Pysal but have had little success with them as they seem to still ...
0
votes
0answers
17 views

Correctly drawing wrapping circles using Basemap

I've been using the functions from here to draw circles on maps using Matplotlib Basemap. This works well, but breaks badly at the map edges: I'm wondering whether there's a general approach for ...
1
vote
1answer
60 views

How to calculate monthly maxium values from daily data in a 365 band grd?

I have a MINT2005.grd file which has 365 bands representing days of year from 2005. Each band is a 32x35 matrix representing the temperature at different latitude and longitude pair. How do I ...
1
vote
0answers
31 views

How to get QGIS to play with pandas (Windows)?

has anybody been successful getting pandas to work with QGIS's Python installation, on Windows? I've used the OSGeo4W installer to install QGIS2.2, which comes with Python 2.7 and Numpy 1.5.1. Any ...
0
votes
1answer
75 views

Iterative raster calculation script using NumPy arrays breaks after ~10 rasters, returns: “TypeError: Cannot create raster for numpy array.”

Here is my code: #Generate Cumulative Thresholds #5/15/14 import os import glob import arcpy import numpy as np #Enable overwriting output data arcpy.env.overwriteOutput = True ...
1
vote
1answer
66 views

Raster calculation in for loop returning exit code -1

I've put together a python script that does some calculations on rasters by converting them to NumPy arrays, doing the math, then converting them back to Raster and applying all the same spatial ...
0
votes
0answers
43 views

Import GRD and count days with temperature below zero, using python

Minimum temperature of a year is given in GRD file. I have to read that file and then calculate the frost day (less than zero degrees celcius) from it in python.
3
votes
2answers
110 views

Memory and Processing Efficient Approach to Read a Timeseries in Python

I am trying to store a timeseries of high resolution raster images containing NDVI values into a dictionary for calculations. I am curious as to which approach may the most efficient when loading ...
0
votes
0answers
71 views

No data appears when using gdal_calc.py but source had data values

I'm in the process of calculating topographic exposure using a mix of GDAL, grass, R and python in Windows. I need to process a very large tiff file using the following calculation: ...
-2
votes
1answer
120 views

QGIS converting to ASCII question

I am attempting to do some analysis on a raster file and I need to convert it to ASCII. In QGIS, I used [Raster -> Conversion -> Translate] with the asc file format, and I suspect it is simply ...
1
vote
1answer
259 views

Convert polygons in shape file to a numpy array?

I have a shape file containing a number of polygons and all attributes being text. I'm trying to import the polygons into numpy as an array where each polygon is represented as unique values. I ...
1
vote
3answers
521 views

Is it possible to open rasters as array in NumPy without using another library?

I know that it is possible to open a raster as an array in NumPy using GDAL, but I want to skip GDAL and use NumPy only, as it is cooler handling rasters with NumPy as matrices. There is a similar ...
10
votes
3answers
285 views

How to convert LAS file to numpy array?

I have begun learning how to manipulate LAS data in python and wanted to see how others handle LAS files. I would like to read the points (I am using a numpy array), and filter out classes 1 and 2 ...
2
votes
0answers
195 views

Finding coordinates from a nested grid as a numpy array

So this is a pretty basic question, but I'm trying to figure it out. I've written a script that allows a user to read in a raster and provide a cell resolution, and outputs the amount of cells ...
1
vote
0answers
92 views

Efficient computation of path profile with Numpy and GDAL

I have numpy array with SRTM elevation data and I need calculate path profiles - vectors with elevation data from one point (transmitter) to every points of my map. Here's my current solution: def ...
2
votes
0answers
182 views

Buffering a Raster with GDAL and Numpy

I am using GDAL to convert a raster dataset into a numpy.array and then using numpy to buffer the data in the raster. For example, I need to know all the regions within 100ft of a school point ...
0
votes
1answer
162 views

Problem with converting rasters to arrays and adding them to main array, then converting to raster via NumPyArrayToRaster : output is NoData values

I have a process that aims to loop through a list of rasters (testing with only 3) covert each raster to an array, add the array to an existing 'template' array, then save the final array back to a ...
1
vote
0answers
132 views

How to create multi-image single band single file geotiff?

I have a geotiff file that is single band but contains multiple subdatasets. I use gdal with numpy to open a specific subdataset and mask some of its values. Example: $ gdalinfo sample.tif ... ...
0
votes
1answer
914 views

Display a georeferenced DEM surface in 3D matplotlib

I want to use a DEM file to generate a simulated terrain surface using matplotlib. But I do not know how to georeference the raster coordinates to a given CRS. Nor do I know how to express the ...
5
votes
1answer
455 views

Subsetting GeoTIFF with Python

I'm sub-setting a GeoTIFF with the GDAL Python binding and numpy. Essentially, I am providing a central location (coordinates of a flux tower) from which I produce a subsetted image. I then want to ...
3
votes
1answer
752 views

Iterating through an numpy array and index to a value in another numpy array

I am struggling to get this code to work I want to iterate through an numpy array and based on the result, index to a value in another numpy array and then save that in a new position based on that ...
4
votes
1answer
456 views

Does anyone use both ArcGIS and Python(x,y)?

I'm trying to get ArcGIS 10.1 and Python(x,y) to peacefully co-exist with a unified installation of Python. Surely someone else is using both these tools... right? Pointers would be much appreciated. ...
1
vote
0answers
145 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 ...
13
votes
1answer
733 views

How can I utilize NumPy arrays to optimize big data geoprocessing?

I'm interested in learning how to utilize NumPy arrays to optimize geoprocessing. Much of my work involves "big data", where geoprocessing often takes days to accomplish certain tasks. Needless to ...
10
votes
3answers
1k views

Gdal Dataset.ReadAsArray() crashes Python

I am using Python 2.6.5 (32bit) with Numpy 1.3 and Gdal 1.9.1 installed on Windows 7 64bit. I am trying to read an 800 MB Imagine (.img) raster dataset into a Numpy array to do some raster algebra, ...
1
vote
1answer
104 views

keeping the coordinate system of raster files in the resulting raster file after operation with numpy

I'm trying to read as array two raster files using ReadAsArray in GDAL/python, perform some map algebra operation on it using numpy and then write the resulting raster file in GTiff format using ...
11
votes
3answers
3k views

Writing numpy array to raster file

I'm new to GIS, and I'm lost with something I feel ought to be relatively simple. I have some code that converts infrared images of Mars into thermal inertia maps, which are then stored as 2D numpy ...
7
votes
2answers
3k views

How to fully load a raster into a numpy array?

I have been trying to check my filters on DEM raster for pattern recognition and it is always resulting in missing last rows and columns(like..20). I have tried with PIL library, image load. Then with ...
4
votes
1answer
404 views

raster algebra in python with rasters of different extents

I am trying to find out how to use GDAL & numpy modules to average a set of rasters....which are Sigma0 values from satellite passes at different times within a year. Each raster has been ...
2
votes
1answer
418 views

Calculating beta-diversity w raster data [renamed]

Using ArcGIS 10, it is not possible to generate a raster attribute table for 32-bit float values. Instead, I have tried the RasterToNumPyArray method, which crashes since the file input raster is so ...
3
votes
2answers
498 views

PostGIS + pgRouting: Adding dummy links to a road network and performing routing analysis

I'm a beginner when it comes to postgis and pgrouting development. For a project I'm working on and a bit of the algorithm: I have a polygon layer that represents zones I have a line layer that ...