jgm_GIS
  • Member for 7 years, 3 months
  • Last seen this week
Do I necessarily need coordinates for spatial prediction?
4 votes

In your example of y ~ x1 + x2, x1 is an independent variable this is perfectly collinear to the lat lon. X2 is also perfectly collinear to the spatial variables used to calculate the amount of ...

View answer
How can I convert PostGIS geography to geometry and split polygons that cross the antimeridian
Accepted answer
4 votes

In the example below, thepolygon table is called poly_coverage and the output table is fixed_polygons. Select the polygons that cross the anti-meridian, cast to geom and shift to 0-360, then split ...

View answer
Can you edit a QGIS layer style file (.qml) to create random colors?
Accepted answer
3 votes

You could open the python console and execute the code below, for QGIS 3.X, to randomly change all the layers' colors. from random import randrange layers = [layer for layer in QgsProject.instance()....

View answer
Unable to find inherited method for function ‘crop’ for signature ‘"numeric" using R
Accepted answer
2 votes

It looks like you are trying to apply a list index to objects that are not lists. In your code you loop over the list of files like this: for (i in 1:length(files)){ r <- raster(files[i]) rq &...

View answer
How to calculate Night Flight time for a given flight between 2 locations?
Accepted answer
2 votes

This Physics stack exchange post contains a link to this page, with an algorithm for calculating day/night with Lat, Lon and time. Using the formulas on this page you could calculate the lat lon, at ...

View answer
Tabulating average value through spatial join in QGIS
Accepted answer
2 votes

This tutorial explains how to summarize attributes when performing a spatial join. QGIS Spatial Join tutorial

View answer
How to make use of indexes with inner join in Postgis?
2 votes

This link to PostGIS documentation recommends the following steps in order to ensure indexes and query planner are optimized: Make sure statistics are gathered about the number and distributions of ...

View answer
OpenLayers3: catch invalid CQL filter exception
2 votes

Adding lyr.getSource().refresh() will redraw with an empty layer when an invalid cql expression is used. var filterParams = { 'FILTER': null, 'CQL_FILTER': null, 'FEATUREID': null }; if (...

View answer
Create points at specified distance from each other in random fishnet's cells while being on linestrings
2 votes

Are you willing to do this in R or python by linking to your PostGIS database? If you used ST_DumpPoints on all the lines in each 1x1 km cell, you should be able to use one of many available ...

View answer
SQL select features in a polygon
1 votes

Remove the ; at the end of where st_contains(ST_asText( ST_Polygon('LINESTRING(5.303 51.629, 5.387 51.626, 5.393 51.588, 5.281 51.592)'::geometry, 4326) ), visvangsten.locatie); You also have to ...

View answer
Converting MultiLinestring to Linestring with PostGIS
1 votes

The query below creates a linestring from the multilinestring provied. select st_astext(st_makeline(geom)) from ST_Dump(ST_GeomFromText('MULTILINESTRING((-3.16420835153456 55.9269166007097,-3.164222 ...

View answer
Handle large point layer on client side using Leaflet/OpenLayers
1 votes

You could store 120,000 points in a PostGIS database and serve them with GeoServer using OpenLayers or Leaflet. To improve performance you could create rules in an SLD to filter which points are ...

View answer
Interpreting Geographically Weighted Regression (GWR)
0 votes

The high negative and positive StdResiduals are areas that the model poorly fits the data. They do not indicate positive or negative association. See the ArcGIS documentation here, where you will see ...

View answer
Error calculating RasterZonalStatistics in Geoserver
Accepted answer
0 votes

According to this post, your problem is here: <wps:Input> <ows:Identifier>classification</ows:Identifier> <wps:Reference mimeType="image/tiff" xlink:href="http:/...

View answer
Convert invalid multilinestring to linestring with recursive ST_Union PostGIS
0 votes

I found a few issues with this question and the data in the answer. First, you said you are using ST_segmentize to split your linestring into 20 meter segments. It doesn't actually create a ...

View answer
Math formula to calculate GPS location for weighted GPS data points
0 votes

You need to decide if the weights are linear, exponential, logarithmic, etc. A simple way to do this, assuming weights are linear, would be to pass a list of points to a function that would use the ...

View answer
I would like to insert lines into a table that I have in my PostgreSQL db from various tables in my computer
0 votes

I would use a python jupyter notebook to import the shapefile, convert to WKT, connect to the PostGIS database, and insert the data. I like this explanation for how to connect to PostGIS with python. ...

View answer
Fetching and displaying spatial data from a database into R
-1 votes

I would try using SF with RPostgreSQL or rpostgis. My understanding of Rgdal, as described here is that is uses SP, which as mentioned here, is usually, but not always, slower than SF. Using ...

View answer