An arrangement of quantities, symbols or objects in rows and columns; a matrix

learn more… | top users | synonyms

1
vote
0answers
17 views

how to generate a raster with its spatial reference from an array(or matrix) by using pyqgis

I used arcgis to generate rasters from txt files by a certain python api,but i am not familiar with qgis,and now i need generate some rasters from txt files by using pyqgis.The resulting rasters ...
0
votes
0answers
13 views

Arrangement of vectors and matrix in text file?

My ASCII file has a vector of latitudes, and the indices of those latitude values tie latitude values to the data sharing the same index. That is, if given: latitude[x=0,1,2,3] = 10, 20, 30, 40 ...
3
votes
1answer
74 views

Optimizing Python GDAL ReadAsArray

I am using the GDAL ReadAsArray method to work with raster data using numpy (specifically reclassification). As my rasters are large, I process the arrays in blocks, iterating though each block and ...
-1
votes
2answers
55 views

Perform band calc in numpy array

I'd like to perform a band calc in some raster bands. What I am trying to do is import the raster (ENVI format) like array with gdal, then I do the calc but when I try to save the raster I get an ...
3
votes
0answers
31 views

Why does my Validation Script continue to run when adding the result to the map?

I am in the process of developing a python script that creates a list available imagery for our project areas that would then allow the user to choose which imagery source they would like to add to a ...
4
votes
1answer
209 views

On python, how to generate an array of coordinates between two points

Perhaps I'm looking to a solved question, but while searching I didn't find any solution. I need to build a matrix of lat, lon values, based on two points, and a sampling rate (distance between ...
2
votes
1answer
75 views

Python script: “points to polygons” skipped fourth vertex

Using ArcGis 10.2 I have a script converting the nodes of a net into polygons. The polygons should be either triangles or rectangles but the script doesn't build polygon as rectangle, skipping the ...
2
votes
1answer
54 views

Determining proportion of raster cells containing each value from list for many rasters in raster stack?

I wrote a function to determine the proportion of raster pixels that contain each of a list of values that I would be interested in. I then wrote a function to apply the previous function to a 3d ...
2
votes
1answer
1k views

How to fetch polygons from PostGIS into a PHP array?

Currently I fetch polygons from a database table using ST_AsText(). The results are in text format, like this: POLYGON((84 104,212 48,321 122,243 179,275 238,131 240,84 104)) I am not quite sure if ...
3
votes
3answers
659 views

Convert cursor output to list of geometries

I want to convert all the geometries returned by search cursor to a list. import math import arcpy from arcpy import env env.workspace = r"C:\GIS Data\GIS data_for Maeenul vai" desc = ...
0
votes
1answer
2k views

Create polylines from point array Python

I am working on building polylines from an array of points I have created from a csv file and am completely lost in building the lines. My code works as follows: I have the point array working, I need ...
0
votes
1answer
50 views

Dojo Promise/All Array Not Populating InfoTemplate in ArcGIS Javascript

Using dojo/promise/all I'm attempting to populate an infoTemplate with results from a queryTask which runs later in the script. Our app returns an XY value from a geocoded address search and queries ...
1
vote
0answers
66 views

Open Layers 3 Dynamically or Batch Add Layers from user folder

I would like to dynamically load all layers (kml, for instance) from a user's folder to a group map. ...This likely requires an iteration that searches the folder and adds the layers to the users' ...
0
votes
0answers
67 views

reading raster without making QGIS apply the scale factor to the raster

Since QGIS multiplies the image with the scale factor when reading, it messes up the image if the scale factor is not properly defined to the data as QGIS expected. For example, I am reading MODIS ...
2
votes
1answer
103 views

What is the purpose of arcpy.Array()?

I am wondering what the purpose of arcpy.Array() is. It seems an intermediate step between creating a list of objects and performing some sort of conversion, for example, such as in the sample code ...
0
votes
0answers
33 views

Identify task on multiple layers into a pop up window with the arcgis javascript api

I am trying to create a pop up window when I click on a feature included in my map that displays their attributes. I want it to apply to all visible layers. So far this is a working section of code I ...
2
votes
0answers
81 views

Load Multiple WFS layers from array with OpenLayers

looking for some help here. I have a layer on my Geoserver that contains a few dozen pipeline alignments in a single layer. My goal is to get those into the map frame as individual layers by ...
0
votes
2answers
37 views

Arcpy array TypeError: Abstract Class

I am using arc 10.2. Every time I add an array both python 2.7 and as a tool in Arc I am getting a "TypeError: Abstract Class". I have also tried changing my script multiple times to make the array ...
0
votes
1answer
38 views

How to use an array for buffer

I want to to use an array to create 3 buffer files with different buffer distances. The code should produce 3 buffer files in one step. Additionally, the code below runs already after using an ArcGIS ...
1
vote
1answer
1k views

AttributeError: 'module' object has no attribute 'TabletoNumPyArray'

I am trying to create a Python array using data from an ArcGIS attribute table. Here's the code I've written so far: import arcpy import numpy input = "c:/data/from/arcgis" arr = ...
1
vote
2answers
96 views

Editing .tiff rasters in Python

I am triying to edit .tif rasters in python, but I have some issues regarding the tiff to array converstion. I read there are multiple options for opening rasters (gdal, PIL, matplotlib), but which ...
10
votes
3answers
3k 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, ...
0
votes
0answers
59 views

Adding Array of strings in File geodatabase feature-class' field

I need to include array type in file geodatabase/shapefile field's content so that when i expose it as a map service, i can get array instead of string or integer. e.g., i got fields: OBJECTID, ...
0
votes
1answer
475 views

Loading GeoJSON data into an array with OpenLayers 3?

First off I'm using OL 3.6 with no additional plugins. Pretty simple question that I thought would have been asked already/would have been much more readily available, is there a way to store points ...
1
vote
2answers
275 views

Create an array from field values in ArcPy

I have a feature class that has a field of unique ID numbers. I would like to create an array of these numbers so I can loop over them in ArcPy. Any ideas?
3
votes
1answer
196 views

Methods for converting a regular polygon grid to a numpy array

I have a regularly spaced model grid, 5000 by 5000 feet (517,300 cells), which I need to convert to a numpy array. I am investigation a couple of different methods, using arcpy, by which I can convert ...
0
votes
0answers
95 views

Python error in array declaration

I am getting a error as follows File "C:\Program Files (x86)\ArcGIS\Desktop10.3\ArcPy\arcpy__init__.py", line 2292, in NumPyArrayToRaster return _NumPyArrayToRaster(*args, **kwargs) ValueError: ...
0
votes
0answers
73 views

Create RasterDataSet from 2d array

How i can create RasterDataset using a 2D double array : double[][] pixels OR float[][] i tried tow ways using IRasterDataset 1- IPixelBlock outBlock = outRawPixel.createPixelBlock(pnt); ...
3
votes
3answers
299 views

Creating polygon from 2 txt files (Parent ID + Coordinates)

Here is what I am trying to do: I want to create polygons based on two separate text files: the first one (as parents) lists the Polygon ID (ID_el) and three to four Points ID (IDpt1, IDpt2, IDpt3..) ...
0
votes
0answers
73 views

Routes through centroids and array functions

I have a table stopcentroids4 like in figure with the following fields: gid, routes, geom and i want to draw a line for each route that runs through centroids. In my code there is a mistake. ...
0
votes
0answers
155 views

Array to Feature Class and XYZ to Table Issues

I am trying export vertices of a line to a point feature class using the code below. I am using ArcGIS 10.2.2 and do not have access to Spatial, 3D, or Network analyst. I used ET GeoWizards to export ...
1
vote
0answers
136 views

Using gdal ReadAsArray or Arcpy.RasterToNumPyArray on python 2.6 32bit without it crashing

I am trying to run ReadAsArray on an entire raster and on a single band, python will crash without an error message when trying to do either. Is there a way I can create a 3d array without having to ...
1
vote
0answers
118 views

How to count the number of coordinates within x meters grouping by distinct ids?

I have a table "items" of about 1 million rows and 40.000 distinct ids like the following: idx | id | point | lat | lon | the_geom 1 | 1 | 76 | 51.463388 | -0.16869856 | 0101000020E... 2 | 1 | 53 | ...
0
votes
1answer
761 views

Print last digit in Numpy Array [closed]

I'm sure this is pretty basic, but is there a way to print a certain indexed portion of each segment in an array? For example, if I have the numpy array: ([1,2,3], [4,5,6], [7,8,9]) I'd like to ...
0
votes
0answers
145 views

finding length of a custom type array in mapbasic

Hello I am just getting started with MapBasic and I have run in to some trouble trying to count the items in a custom type i have tried accomplishing this by running a loop until an error occur. ...
0
votes
1answer
190 views

Filter on a array of value in OpenLayers

I'm running into an issue. I have an array of value coming from a JSON POST. After retrieving these values and storing them into a var, I need to filter an OpenLayers layer with this values. I'm ...
11
votes
3answers
995 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
2answers
925 views

How do I sort a geoJSON feature collection alphabetically by a property value?

I am trying to sort the objects in a geoJSON FeatureCollection alphabetically by the values of one of their properties. How do I get to the nested object properties with JavaScript? I have tried using ...
2
votes
3answers
3k 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 ...
0
votes
1answer
169 views

Server Object Extension MultiPoint Input [closed]

I have soe which accepts {x:-112,y:35} as input parameter. how can I modify the soe code so that I can pass more than one point as my input parameters like {x:-112,y:35},{x:-113,36},{x:-113.5,y:34} ...
0
votes
0answers
459 views

OpenLayers LineString: Not displaying the line (array of points)

I'm perplexed as to why tail_path is not drawing the line (can't see anything on the map) but the alert seems to be returning the correct data. var path_travelled = new Array(); var path = ...
2
votes
0answers
490 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
1answer
2k views

Refresh map after removing marker from array

I have a map an arrays of markers. This code: function RemoveRedMarker(siteID) { for (var x in arrRedMarkers) { if (arrRedMarkers[x].SiteID == siteID) { ...
1
vote
2answers
212 views

Is it possible to export a GeoJSON with an array field from a joined layer?

I'm using QGIS to 1) load a shapefile, 2) join the shapefile data with a CSV-file and finally 3) exporting the layer as GeoJSON. Hence, I end up with something like this, where the properties object ...
0
votes
1answer
185 views

Can I view a Postgis Geometry Array in QGIS?

I have got an array of geometry as a column in postgis database. Is it possible to view the data (even the nth element?) in qgis?
0
votes
1answer
94 views

trying to create array reader for feature fields

I am trying to create a functionality that creates array data for any layer that user selects. Now I am able to get all the data in the feature layer that the user selects but I am having some trouble ...
3
votes
1answer
243 views

Create Array From Selected Features Based on the Order in Which They Were Selected

I need to create an array of features from a selection based on the order in which they were selected. As in: I select feature 5,2,3,4. I need to have an array so I can apply attributes (with python) ...