99
votes
Accepted
What is the purpose of PostGIS on PostgreSQL?
If you re-wound the universe to early 2001, and not only let the inventors of PostGIS see the future, but also let the PSC of PgSQL see the future, perhaps PostGIS would be a series of patches on ...
61
votes
Accepted
Setting up indexes for PostGIS distance queries
There are two keys to getting good geodetic query performance with large tables with geometry columns using WGS 1984 geographic data (SRID 4326):
Use the ST_DWithin function, which searches using an ...
34
votes
What is the purpose of PostGIS on PostgreSQL?
That's simply not true, PostgreSQL does not support Spatial data types. It supports geometric types. These are perfectly fine for some things, but they're totally separate from real world coordinate ...
15
votes
Accepted
Getting field index from input vector layer in PyQGIS
That method has been deprecated, use this instead to get the field index:
fields = inEdges.fields()
idxEdgeId = fields.indexFromName('fieldName')
8
votes
What is the purpose of PostGIS on PostgreSQL?
PostGIS is a spatial database extender for
PostgreSQL object-relational database. It adds support for
geographic objects allowing location queries to be run in SQL.
SELECT superhero.name
FROM ...
6
votes
Getting field index from input vector layer in PyQGIS
fieldNameIndex function was removed in QGIS3:
Removed fieldNameIndex(), use fields().lookupField() or
fields().indexFromName() instead
You can convert your code as follows:
inEdges = self....
4
votes
Accepted
Solving the problem with the "Indexing data" window while editing
It's caused by snapping. I guess you could disable that.
Upgrading QGIS might be the better option though, I'm quite sure it has been solved in newer versions.
Update: Even when they turned off ...
4
votes
Reclassify raster values continuously instead of assigning them to specific groups
I think you're looking for the Raster Calculator tool. It will let you apply an equation to each raster. What that equation is (i.e. what function defines the curved line in each graph above) you'll ...
4
votes
Indexing USGS Landsat Collection 2 Level 2 datasets into Open Data Cube
You can now index USGS data into the Open Data Cube using the command line tool STAC API to DC
There are some notes on how to achieve indexing USGS Collection 2 data here.
A brief howto is as follows:
...
3
votes
Accepted
Create shapefile from file.csv using python pyshp module
From the comments, it seems the issue was that the file was being output to an unknown location. To remedy this, modify the code as below to specify the output location.
For example, if you want to ...
3
votes
Determining best neighbourhood search radius for Topographic Position Index (TPI) for predictive soil mapping?
There really is no expected for this unitless metric. The TPI is the delta of the focal pixel from the mean of the focal window. Obviously, the metric is sensitive to outliers and the larger the focal ...
3
votes
Accepted
Subset raster stack with logical indeces R
Easiest way to do would be to convert the logical vector into which indices of it are true using... which:
> s[[which(c(TRUE,TRUE,FALSE))]]
class : RasterStack
dimensions : 100, 100, 10000,...
3
votes
Accepted
How to draw and index "trial plots"
Create Grid, point type
Rectangles, ovals, diamonds. Create rectangles smaller than the grid spacing
Add a field new id field, adjust first two lines and execute this in python console:
layername = '...
3
votes
GeoServer using read only database
That will be fine, if the indexes are missing it will just be even slower than Oracle usually is.
3
votes
Spatial index creation in GeoServer when adding PostGIS store
No, it is not, you have to create the spatial index when you import your data in PostgreSQL/PostGIS.
See: http://postgis.net/workshops/postgis-intro/indexing.html
2
votes
Solving the problem with the "Indexing data" window while editing
Just to confirm that in QGIS 3.14, this still persists (from a snapping-indexing perspective at least anyways).
2
votes
Solving the problem with the "Indexing data" window while editing
It can also be caused by Show Feature Count in the Layers Panel. Uncheck it, if it is checked.
2
votes
Determining best neighbourhood search radius for Topographic Position Index (TPI) for predictive soil mapping?
I would think that there are a number of factors to consider:
Point Data Density
Size of area to be mapped
Intervening feature size to be ignored
Available computing power vs available time
Degree of ...
2
votes
How would I determine my search radius when conducting a Topographic Position Index in SAGA GIS?
It is good you started to work with TPI on SAGA, since it is rare software which cares TPI's scale-dependent nature.
In the poster linked below you will find answers.
Andrew D. Weiss Topographic ...
2
votes
Accepted
Build a polygon raster as indexing grid with SQL
There are some posts around that mention functions for so-called fishnets. For instance: How to create a regular polygon grid in PostGIS?
With that function you could do something like:
SELECT name, ...
2
votes
indexes to optimize ST_Contains and ST_Overlaps for geoms in two tables
The issue was that a SEQuential search was being done through child, I added a subquery to trigger an index search instead of sequential search and now the query is 0.6s on average. Wow!
My advice to ...
2
votes
Changing The coverage Atlas layer
The scale of your map items is controlled by the size of your coverage polygons. Figure out what size polygon will give the desired scale on the size page you'll be printing. You can find this by ...
2
votes
Rebuilding indexes in file geodatabase using ArcPy
That method cannot be used on a file geodatabase, from the tool help document, see usage statement below:
Data must be from a database or an enterprise, workgroup, or desktop
geodatabase. This ...
2
votes
Reclassify raster values continuously instead of assigning them to specific groups
I didn't find how to put conditions with equations in the qgis raster calculator, so I wrote a tutorial to help you in ArcGIS. ArcGIS has free 21-day trial, he just needs your sign up (ArcGIS trial). ...
2
votes
How to draw and index "trial plots"
The solution
You can use a QGIS expression to number the polygons from 1 to N with a simple (well - a single, even if scary looking, but rather easy) expression that creates a new attribute with field ...
2
votes
Accepted
Indexing Multi-Band images in OpenDataCube
This was not supported yet, as none of our own datasets came with multiple bands. I've added it in eodatasets>=0.23.
An index param is now available for reading measurements:
p.write_measurement(&...
2
votes
Accepted
Indexing Copernicus Global Land Service data into ODC
You may use the eodatasets3 library to index data hosted remotely, I've done it by indexing official Copernicus Global Land Cover data you can find in this S3 bucket (data access is documented here).
...
2
votes
Accepted
Extract the raster values for geometry using Python
I think the error is probably due to the fact you are using coordinates as indices. You need to calculate the correct indices using origin and pixel size.
It is easier to use rasterstats:
import ...
2
votes
Accepted
GeoPandas geodataframe.cx() coordinate indexing not working for multipolygon
.cx doesnt clip the input geometry, it selects all rows/geometries that intersects the limits. So if one small polygon part of a multipolygon intersects, the entire multipolygon will be selected.
You ...
1
vote
Accepted
R: Annual composite based on the median: How to get the index of the original layer for each pixel?
In a median, if the number of cases in consideration is even, then the result is the mean of two middle results. As such, your which() will always return two values, hence you get two layers, one with ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
indexing × 74postgis × 16
postgresql × 14
open-data-cube × 10
qgis × 9
spatial-index × 8
python × 6
arcpy × 5
raster × 5
geoserver × 5
arcgis-desktop × 4
oracle-dbms × 4
pyqgis × 3
geoprocessing × 3
performance × 3
saga × 3
topography × 3
tools × 3
shapefile × 2
r × 2
qgis-3 × 2
google-earth-engine × 2
attribute-table × 2
fields-attributes × 2
enterprise-geodatabase × 2