Questions tagged [optimization]

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

Filter by
Sorted by
Tagged with
1
vote
0answers
20 views

Optimizing Google Earth Engine cloud cover for Sentinel 5p

I am trying to generate cloud free Sentinel 5p images, I have a basic cloud detection code working but it runs very slowly (most likely due to nested map and reduce features). Is there a way to do ...
1
vote
0answers
65 views

Optimal site allocation with accumulated cost and total number of sites minimisation [closed]

I am looking to define and solve the following GIS-based optimal location allocation problem. I have: A raster layer with the population living in each cell A friction layer (used to calculate ...
1
vote
1answer
42 views

Optmizing PostGIS minimum distance query

I have the field_1 of my Table_1 that must have the minimum distance between the geometry of my Table_1 and any geometry of my Table_2. To do so, I used a CROSS JOIN (Full Cartesian Product) between ...
1
vote
1answer
73 views

GDAL retile to create near-uniform file sizes?

I have a 60Gb raster vegetation dataset. I need to be able to access single pixels relatively quickly. At the moment, I am retiling at a fixed size, and saving those, indexing them in Python, and ...
2
votes
1answer
108 views

Improving Mapnik render time

I'm adding polylines (elevation curves) to a world map. Said polylines are stored in a PostgreSQL database from gdal_contour tool. The geometry columns (LineString, 3857) has a GIST index and a ...
1
vote
1answer
63 views

GIST index not used by query optimizer on geometry field

I'm trying to add elevation curves on an OpenStreetMap tile server I'm currently building. I created a table in PostgreSQL to store the shapes of the whole world. Structure was defined by gdal_contour ...
2
votes
1answer
62 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
315 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
25 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
167 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
1k 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
154 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
126 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
176 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
392 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. ...
1
vote
1answer
275 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
341 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
116 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
340 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
371 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
294 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
145 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
391 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
92 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
136 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(); ...
7
votes
1answer
584 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 ...
7
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
83 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
58 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 ...
9
votes
4answers
161 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
3k 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
232 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
461 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
930 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
131 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
217 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
94 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
72 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
1k 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
82 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
566 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
1k 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
534 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
761 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
387 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
127 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
309 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
73 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
64 views

which projection are best for large continents [closed]

which projections are best for large continents and mid-latitudes
7
votes
1answer
771 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 ...