Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [optimization]

Use this tag when referring to improving or optimizing a process such as a script, application or software.

2
votes
1answer
41 views

Non-constant transformation of photogrammetric point clouds in R?

I have a process which attempts to register two forested point clouds using CloudCompare's Iterative Closest Point (ICP) algorithm. Often times, warping (especially in the vertical direction) occurs ...
3
votes
0answers
68 views

Multiprocessing with geopandas

I am learning how to implement the multiprocessing with spatial data using the module multiprocessing. I am trying to implement a spatial intersection between a polygon file and a grid file. I am ...
1
vote
1answer
22 views

Why does rescaling by 1.0 speed up this PostGIS query

To preface, I'm not sure if it matters, but I'm using PostgreSQL 11 with PostGIS 2.5 (through Docker on Windows) and accessing it with Python through PsycoPG2. My raster has the recommended index on ...
-1
votes
2answers
106 views

Network/Routing analysis with open source GIS

I am researching for ways to do network analysis or routing optimization with open source GIS. ArcGIS currently has an extension for this called Network Analyst but would like to keep my analysis with ...
2
votes
1answer
348 views

Calculating NDVI per region, month & year with Google Earth Engine?

I want to calculate the mean NDVI per region (admin level 3, also called woreda), month and year. So my end result would look something like this: regions year month NDVI ------------------...
3
votes
1answer
56 views

Optimum raster tile size

I am wondering if there is an optimum raster tile size when using -t in raster2pgsql. I am setting -t auto and it creates thousands of tiles and takes hours to load. I am working with very large ...
0
votes
2answers
73 views

How to optimize this query for (OpenStreetMap) map tiles rendering?

I'm trying to optimize my OpenStreetMap map tiles rendering. This is one of the queries renderd makes to PostgreSQL: SELECT ST_AsBinary("way") AS geom, "type" FROM (SELECT way, ...
0
votes
1answer
92 views

Optimizing a nearest neighbor search in PostGIS for a large dataset

The below code is working well for smaller datasets, however I want to use this with a 30 GB table. Every time I run it using the larger table I run out of SSD space, the table gets to 127 GB in size! ...
1
vote
1answer
240 views

Improving the speed of a Postgis spatial query

I have a query that is slow on PostgreSQL 9 + PostGIS (running on a Linux computer), despite my efforts to improve its speed. I basically have a table that contains Polygons called polygones_zones. ...
0
votes
0answers
13 views

optimizing an HTML 5 Esri viewer using online check sites?

Check site performance apps like Yslow and Google's PageSpeed Insights give suggested edits and wondering if Esri HTML5 viewers allow the suggested edits to be made? If so, do they make a significant ...
1
vote
1answer
186 views

Most efficient way to check graph edge or node overlap with circle border on euclidean plane (2D space)

Suppose that there is a given graph, in terms of nodes with specific placement on the euclidean plane (2d space) (for ex. node A is at (7,14) 7 is x-axis and 14 is y-axis) and edges that specify which ...
0
votes
2answers
214 views

Optimize Earth Engine cloud cover area calculation for Sentinel-2 [closed]

I am trying to generate cloud free Sentinal 2 images, I have a basic cloud detection code working but it runs very slowly (most likely due to nested map and reduce features). I was wondering if there ...
1
vote
2answers
96 views

Simple homemade route optimization algorithm

I'm trying to do a simple route optimization without any fancy frameworks and insert-science-professor-name-here algorithms. I have a startDepot and 100k waypoints of which I want to find about 25 ...
2
votes
0answers
260 views

Optimize computation distance of million points to lines in Python

I have found questions here of how to compute the distance of a point to a line (manually, with distance method of some libraries...) but my problem is that I need to compute the distance of 4M points ...
1
vote
1answer
263 views

ST_Intersects optimization between lines and points

I'm currently trying to optimize my code and I wanted to know if someone could enlighten me concerning the use of ST_Intersects. Basically, I'm trying to assign some points to each road sections ...
12
votes
2answers
276 views

Aggregate Lines Based on Distance between Segments

I have a VectorTile basemap that I am optimizing, (working on reducing the size of individual tiles), the major chunk of tile size is road data (geometry and attributes). I am working on simplifying ...
4
votes
1answer
119 views

Faster way to find nearest neighbors with LASlib?

I'm using LASlib to find the nearest neighbors of a subset of points in a point cloud. I'm using brute force to find nearest neighbors, which is extremely slow (my code below). Is there a better way,...
2
votes
1answer
344 views

Cesium and Geoserver SRS Optimization

I have a Cesium program that makes WMS calls to geoserver layers loaded from a postgis table. From what I know Cesium can only use ESPG:4326, but my postgis table and thus geoserver layer are in ESPG:...
1
vote
1answer
77 views

Optimize fetching road information from OSM

I am using the following query to fetch road data from planet_osm_line SELECT maxspeed, highway, ref, name, ST_Distance( ST_SetSRID(ST_Point(-98.224861,38.811898),4326), ST_Transform(...
2
votes
0answers
107 views

How to make a proper unification function

Well i make a map with OpenLayers 4 in draw a a brunch of polygons an try to union them if they intersect. i made this code : function unification(){ var parser = new jsts.io.OL3Parser(); ...
5
votes
1answer
445 views

How do I tile raster input to speed up display in R Shiny programs?

Disclaimer: I have very little GIS experience I've been working on a project in R that involves displaying large raster maps in an R Shiny interface. I am using the leaflet package for display. The ...
5
votes
2answers
2k views

How parallelize the extract function for raster files in R?

I´m trying to parallelize a simple "extract" operation like this: UseCores<-detectCores() -1 cl<- makeCluster(UseCores) registerDoParallel(cl) all.test.poly_period.test<-extract(stack.ts, ...
0
votes
1answer
74 views

Combining postal codes into sales territories by value using R and ggplot2?

I have the shapefile for Canadian census subdivisions. For each subdivision I calculated some value (someValue). I want to combine census subdivisions into territories in such a way that territories ...
1
vote
0answers
53 views

Methods to more efficiently generate regularly spaced research points inside of a multipolygon

I'm currently using the tried-and-true, but extremely slow method of: via QGis, generating two (ESRI shapefiles) of a large number of research points over a multipolygon which are generated using a ...
0
votes
0answers
111 views

Select features that do NOT intersect

I used this accepted answer to write my query which gives the correct rows but with incorrect geometries. My solution was to get those rows' gids and embed the query into another one. Do you know an ...
9
votes
4answers
148 views

Limit Rows Through Spatial Function

I'm trying to improve performance for the query below. No matter how I write the query (subquery in FROM clause, subquery in WHERE clause) postgres insists on running all ~570K rows through the ...
6
votes
1answer
2k views

Fast way to convert Polygons to Points in PostGIS

What's the fastest way to convert a polygon to a point in PostGIS? I don't care where the point is in relation to the geometry, but the resulting point does need to be consistent. Using ST_Centroid ...
1
vote
0answers
191 views

Identify Health Centre Location using machine learning ( Optimisation ) [closed]

I am trying to identify locations of where new health centres could be built in the country using Machine Learning (optimisation) and R programming language. I currently have the latitude and ...
1
vote
1answer
389 views

ST_DWithin Optimization Postgis

I've got two datasets - 1) a set of buildings in LA and 2) fiber optic cable maps from a company called Zayo which covers the whole of the US. I'd like to find the buildings within a certain distance ...
2
votes
1answer
733 views

Filling polygons with points or polygons using PyQGIS? [closed]

I am trying to find a method to, as efficiently as possible, fill irregular shape polygons with points (defined spacing) or alternatively, polygons of defined size ( which i can find the point ...
1
vote
0answers
115 views

location-allocation with minimum cost optimization [closed]

I am wondering if it is possible in ArcGIS 10.3 to customize the location-allocation network analyst or use other tools to find the location of a facility which minimize the costs and not the ...
4
votes
1answer
199 views

Mapnik and GeoTIFF tiling optimization

If I am using one extra large GeoTiff as datasource. Does Mapnik take advantage of tiled structure of source file (its a GeoTiff with internal tile structure) when rendering tiles? Which driver/plugin ...
2
votes
1answer
89 views

Position a polygon to maximise number of points within it

I have a data set with over 1 million points. I need to find location for polygons (circle) that will maximise the number of points within it. Requirements: Radius of the circle depends on where ...
0
votes
0answers
70 views

pgrouting - multiple travelling salesmen?

I've trying to solve a routing problem to optomise the use of multiple pieces of machinery. Part A - I have two machines, and thirty distributed sites. Ten sites require machine A, the other ...
7
votes
1answer
999 views

PostGIS / OSM: Faster query to find nearest line of points

Following scenario: I have a table roads, which basically contains the road network of a whole country extracted from the OSM line table and a table points containing millions of GPS tracked points ...
1
vote
0answers
77 views

Optimise raster size

I have a raster that represents a classification, this means each pixel can contain a value in a small set (for instance [0,1,2,3,4,5,6,7,8,9,10]). My file is around 2.4 MB which is pretty small ...
1
vote
1answer
454 views

Speed up spatial query on large table on psql

How to speed up spatial query on large table of bytea. I tried the suggestion from this website to create an index using b-tree GIST but the index is exceed the maximum size of 8191. Any ...
3
votes
2answers
883 views

How to optimize QgsFeatureRequest with filter expression

I have a point PostGIS layer (my_layer) which has more than 66000 features. I am getting the features I want but it takes too long. My code is: resultList = [] req = QgsFeatureRequest()....
4
votes
1answer
476 views

Time Delay in Importing ArcPy

I've got a few on demand scripts via the web that run ArcGIS in the background via Arcpy. Now, every one of these scripts takes a solid 15-30 seconds to run, which I find okay. After doing some trial ...
4
votes
1answer
617 views

How can I optimize layer filtering using setSubsetString or QgsFeatureRequest().setFilterFids(my_indexes)

i'm developping a plugin (under QGis 2.8.1) for traffic assignment where I want to show the results of my simulation at each time step. Right now I'm using Time Manager plugin but it gets very slow ...
0
votes
0answers
335 views

Geoserver Optimization: 64 bit vs 32 bit + JAI?

Since as per my knowledge jai does not support 64 bit, what would be more efficient: a Oracle Corporation: 1.7.0_79 (Java HotSpot(TM) 64-Bit Server VM) Vs Oracle Corporation: 1.7.0_79 (Java ...
1
vote
2answers
121 views

Finding Network Data for Route Optimisation in Saudi Arabia using ArcGIS?

I have to do a route optimisation through ArcGIS vrp solver for 1200 pizza drop points/daily, for a city based in Saudia Arabia. Where can i get the road network dataset?
2
votes
0answers
290 views

Optimize Postgis contour lines DB

I'd like to try to optimize a world-wide 10m contour lines (isohypses) Postgis database(from SRTM). The complete DB takes 504GB on disk, contour lines are already in epsg:3857, and simplified with ...
1
vote
0answers
70 views

Location-Allocation “Like” Problem using Polygon data

I am a political scientist interested in malapportionment. I have a population data which has the municipality-level population and polygon format, so it can show how many people are living in the ...
-2
votes
1answer
59 views

which projection are best for large continents [closed]

which projections are best for large continents and mid-latitudes
7
votes
1answer
682 views

How to group 10k points into closest pairs?

I was first faced with a problem of grouping 1000 pairs into unique pairs to minimise the total distance - since this was a small number I solved it using linear optimisation: Part 1 - Basic/Naive ...
3
votes
1answer
136 views

using a linear solver to get a “centre of gravity” of a set of points

As a programmer, if I have a linear solver available. How can I formulate the following problem as a set of constrains / decisions / goals for the linear solver? I have a matrix of say 10*10, so 100 ...
3
votes
2answers
692 views

Grass GIS: Number of CPU cores to use

E.g. in SAGA GIS it is possible to set with one click the number of CPU cores to use during processing. Is this also possible in Grass GIS?
1
vote
0answers
53 views

What is the quickest way to find in which plots a set of points lie?

I know this sounds easy and lazy to ask, but I'm new to (spatial)database, and I have the feeling my solution is sub-optimal. But for my situation it's important to have good performance. What do I ...
1
vote
1answer
667 views

Suggestions of route optimization algorithms to implement in QGIS [closed]

I need to compute routes on a QGIS project with time and distance associated. Is there any route optimization algorithm to compute routes given the points that one wants to connect?