Questions tagged [sorting]

To arrange according to class, kind, or size; classify.

Filter by
Sorted by
Tagged with
4 votes
1 answer
89 views

QGIS 3.22 sorting by attributes does not work in gpkg-files

Since I updated from QGIS 3.16 to 3.22 I have the following problem in attribute tables: in gpkg files the sorting option (alphabetical) does not work - sometimes! I tried it with projects in qgz- or ...
user avatar
  • 309
2 votes
1 answer
54 views

GEE Image Collection to Multiband Image Outputs Gibberish

I'm using Landsat imagery in Google Earth Engine and am attempting to convert an image collection to a multiband image. However, before doing so I do two things: I mosaic the images by date so that ...
user avatar
  • 395
3 votes
1 answer
109 views

Automatically sort table data by specified column when opening attribute table in QGIS

I want the attribute table in QGIS to be automatically sorted by the column I want, so that I don't have to click on the right column every time. At the moment, when I open the attribute table, the ...
user avatar
  • 5,592
7 votes
1 answer
104 views

Sorting layer order in QGIS based on mixed string/numerical layer names

In QGIS, is there a way to automatically order the layers in the Layers Panel? I'm looking to sort 50 layers, output of a Split vector layer operation (see here) in a predefined order that is not ...
user avatar
  • 39.9k
1 vote
1 answer
28 views

GeoServer WFS - Casting a property to Integer for sorting

I have a WFS query string that ends with: &SORTBY=am_subtype%20DESC This works but am_subtype is a string, so it does not sort the way I'd like it to. Can I cast am_subtype to an Integer somehow ...
user avatar
2 votes
2 answers
104 views

Sorting field values within column in table using ArcPy

I have a feature class table named fcwells. It has a bunch of different columns but the column I need sorted is 0Meters. Many fields under 0Meters have multiple values separated by commas and it is ...
user avatar
-1 votes
1 answer
58 views

Creating table from lists in sorted manner in Google Earth Engine

I have calculated the area coverage of landcover types in a region and sort them now I want to export the results as a table to drive in a sorted manner when I combine them in a new dictionary object ...
user avatar
  • 97
0 votes
2 answers
63 views

sort dictionary datasets based on values in ascending order

i want to sort my dataset and use an example dataset to chack the code. that works and here is the code: var b=ee.List([4.5,2.8,7.4]) var c= ee.List(['a','b','c']) print('b',b) var dict=ee.Dictionary....
user avatar
  • 97
1 vote
0 answers
29 views

How does the expression look like to sort route segments of multiple routes using start and end coordinates of segments in qgis?

I do have a line layer containing multiple route segments. Having a route_id (string type; for example A101-1, B207, ...) as attribute for each segments tells me to which route the segment belongs. ...
user avatar
  • 165
1 vote
1 answer
196 views

Sorting dictionary values and getting sorted keys in new dictionary using Google Earth Engine

How can I sort a dictionary's keys in Earth Engine based on their values? For example, I have such a dictionary defined in Earth Engine after some calculations and I want to sort that based on ...
user avatar
  • 97
1 vote
1 answer
365 views

Is there a way to "sort" points in a MultiLineString such that they seem more like a continuous LineString?

Is there a way to "sort" the points of a MultiLineString such that they follow a more sequential order? Let me illustrate what I mean with a graphical example: Input Suppose I have the ...
user avatar
  • 1,687
3 votes
1 answer
119 views

Getting fieldnames with QGIS expressions in same order as in attribute table (not alphabetical order)

Context I want to get a list of field names of a layer using QGIS expressions. The function attributes() returns a key:value map of the attribute names and values. By default, the result is sorted ...
user avatar
  • 39.9k
1 vote
2 answers
56 views

GeoServer 2.20 - view only list of layers in a specified store

Is there any way to view only the layers from a specific store in GeoServer (v 2.20)? I can't find anything online and I don't see any way to do this in the interface. The layer list shows everything ...
user avatar
  • 580
4 votes
1 answer
84 views

Grouping and sorting field values by group in QGIS

I need to sort groups of "Field A" by "Field B" and write the Sort Order to "Field C". All entities of "X" value in "Field A" are ordered amongst ...
user avatar
  • 1,159
1 vote
1 answer
74 views

FME - how to sort data in verses

I have many elements in my layer. In the table, I have measure - distance and curvature. These two data in columns are connected with each other. For example (first verse): 0 - 35; 4420 - 35; 4157 - ...
user avatar
  • 13
1 vote
0 answers
75 views

Sorting columns in attribute tables in ArcGIS Pro 2.8

I have an attribute table whose columns I want to keep in chronological order, but when I try to drag and sort them, they return to their original order. Is there a way to make them keep the order I ...
user avatar
  • 117
1 vote
1 answer
83 views

Sorting by multiple fields SearchCursor ArcGIS 10.6

I want to define the values of first row in a sorted table with search cursor. My code is working without sorting, but I don't know how can I integrate into sorting. I would like to see only the ...
user avatar
  • 79
1 vote
1 answer
193 views

Sort column by values in ui.Chart.feature.byProperty in Google Earth Engine

I am creating a bar chart of band importance of a random forest classifier in GEE. The default bar order seems to be by name. How can I sort the columns in descending order depending on each column ...
user avatar
  • 485
9 votes
2 answers
426 views

Numbering adjacent points/centroids in sequential order using QGIS

I am using QGIS 3.18. I have, for example, this layer with points or centroids (with x, y coordinates) I want to enumerate the points from right to left (for example) and top to bottom like this: I ...
user avatar
  • 427
0 votes
0 answers
38 views

Deleting the old layer set automatically - after sorting layers of one specific group within the table of contents alphabetically

I'd like to reorder the layers within ONE specific group of the TOC alphabetically by layer name, but without reordering the top level layers or the layers of other groups. @GérmanCarillo helped me to ...
user avatar
  • 427
4 votes
1 answer
373 views

Sorting layers by name in one specific group of QGIS layer tree

I'd like to reorder the layers within ONE specific group of the TOC alphabetically by layer name, but without reordering the top level layers or the layers of other groups. I found the following ...
user avatar
  • 427
10 votes
2 answers
282 views

Sorting records by attribute in shapefile using PyShp

I know how to get records in a shapefile using PyShp, but how to sort records by an attribute (i.e., "NAME" or "POPULATION")? My code: import shapefile file = "c:/data/cities....
user avatar
2 votes
0 answers
47 views

Selecting, sorting, and grouping spatial data (lines) by length and proximity

I'm working on a project where I have a bunch of lines inside of polygonal land parcels. Here's a rough sketch of what I'm talking about: I need to further subdivide these parcels into sections that ...
user avatar
1 vote
1 answer
161 views

How to make a linked-list in Google Earth Engine?

Now, after Noel Gorelick's very helpfull code, i have a sorted list with two-segment: var list = ee.List([ [101, 103], [102, 103], [103, 109], [109, 122], [117, 156], [122, 133], [133, ...
user avatar
1 vote
1 answer
74 views

How put order in multiple raster file in RasterMosaic in FME? [closed]

I have couple of raster files which I want to mosaic in a specific order. How I can do that?
user avatar
1 vote
1 answer
225 views

Sort attribute table in an atlas layout with PyQGIS 3

I wrote a script that automate the production of an atlas layout with PyQGIS 3 that works well but it remains a detail I can't figure out. Each page of my atlas contains a map zoomed on a particular ...
user avatar
0 votes
1 answer
418 views

Using arcpy.da.SearchCursor to sort field in attribute table by ascending order

I am using ArcMap 10.6 with Python 2.7.14 with ArcPy. I want to sort a field named Seq_ID in my attribute table by ascending order using ArcPy. I believe I have to use arcpy.da.SearchCursor. Here is ...
user avatar
0 votes
1 answer
183 views

Sorting GeoJSON features array by property value [closed]

I am looking to sort a GeoJSON file on a property so I can then slice it keeping only the top 5 features. For example, I wish to take this GeoJSON and sort the file in descending order by the ...
user avatar
  • 103
0 votes
1 answer
97 views

Sort Custom Tileset Features in MapBox Studio or GL

I have a large number (hundreds of thousands) of point features uploaded to my account in MapBox studio as a dataset, and have generated a tileset based on that dataset. This tileset is used in a ...
user avatar
  • 101
1 vote
1 answer
120 views

Is there a way to sort the QGIS attribute table by date modified?

I was wondering if there was a way to sort the attribute table in QGIS Pi by date modified. I have been digitizing a large area and I need to delete the last 50-100 features that were digitized. My ...
user avatar
0 votes
0 answers
25 views

Sorting alphanumeric characters [duplicate]

I am new to QGIS. The version I am trying to get used to is v3.6. I have been trying to sort this table in map layout but still ending up as displayed in the table below. Need help to sort in ...
user avatar
  • 1
0 votes
1 answer
102 views

Using Sort tool in ModelBuilder of ArcMap

I am using the model builder in ArcMap to create zonal statistics as table (daily time series-so iterating rasters in the beginning). The tool works fine, it's just that I have another additional step,...
user avatar
4 votes
1 answer
301 views

QGIS Attribute Table on print layout not sorting

I've added in an attribute table to a print layout and am trying to sort numerically ascending using Plot Order For some reason it doesn't change order whatever field I use to sort the items in the ...
user avatar
9 votes
3 answers
360 views

Sorting text column by numbers with letters

I have a text column. It's made up of the numbers 1, 2, 3 up to 1650, which are currently not in increasing order. However, it also includes text such as 520a, 639a, 639b, 639c. Sorting on increasing ...
user avatar
2 votes
2 answers
499 views

Sorting raster stack by dates in R

I need suggestion on how to sort a raster stack by dates. A reproducible example is in the following: library(raster) Create a reproducible rasterstack; set.seed(123) r1 <- raster(nrows = 6, ncols ...
user avatar
  • 187
3 votes
2 answers
403 views

Adding consecutive unique ID for distinct value sets and sorting by date [closed]

I have a layer with features, which have a unique ID, called "Object_id". A second column is "Date", a third called "info" (see below). What I need is to fill the fourth ...
user avatar
  • 263
0 votes
2 answers
69 views

Script to sort attribute table (create new columns and fill them) [closed]

Starting situation: I have the following element/file: A shapefile that contains polygons that are parcels and their boundaries: The parcels are inside a big polygon () Each parcel has a unique id, ...
user avatar
2 votes
1 answer
225 views

QGIS 3.14: new attribute sorting feature

The 3.14 Changelog includes this new feature: "Allow sorting attribute table by field not listed in the table" The description states: "Instead of using the same data model for the ...
user avatar
  • 6,973
8 votes
3 answers
874 views

Adding consecutive unique ID starting from 1 for each distinct set of values

I need to add a unique ID (using $ID or @row_number) but the problem is that I need to start from 1 to "...n" considering identical values from other field, then, when there is a different ...
user avatar
2 votes
0 answers
229 views

QGIS: attribute table in print-composer, format numbers and sort according to same field

In the print layout of QGIS (I use 3.12.2 on Win) you can add an attribute table. I have a list of towns I want to display ordered according to their size (population). That's quite easy: in the ...
user avatar
  • 39.9k
0 votes
2 answers
287 views

How to sort a list with dictionaries into ascending order

I used reduceRegion to get statistics of certain provinces in Germany. I get a list with dictionaries (province ID, histogram and median) and would like to sort the list by the median values. I have ...
user avatar
1 vote
1 answer
82 views

Numbering of objects based on several fields in ArcGIS with ArcPy

I have a feature layer. I need to number objects within the numbering of houses on each street. The first field is the city code, the second field is the street code, the third - house number. A ...
user avatar
  • 45
1 vote
0 answers
27 views

Plugin eVis false sorting

I have a csv-file and want to load it in the eVis plugin. The csv-file has a column cid and is sorted ascending. sorting in csv-file: I have pictures of a road and this pictures should be shown in ...
user avatar
2 votes
1 answer
126 views

Merging polygons and having them appear in specific drawing order in ArcMap

This is in ArcMap 10.6.1. I have four polygons that I would like to merge into a single shapefile and have the order of polygons shown on the map from smallest to largest (see first screenshot ...
user avatar
2 votes
2 answers
170 views

Getting top 1 record from shapefile by descending order using ArcPy SearchCursor

I have a shapefile from the date field in it. I'm looking to get top 1 record date value by descending order. readRows = arcpy.SearchCursor(shapefile, "", "", "Last_Updated" ,"Descending") Is ...
user avatar
  • 103
2 votes
0 answers
457 views

More stable spatial sort using Shapely's within?

I was trying to use a modified version of the spatial sorting method illustrated in shapely's documentation, using only polygons exteriors (so that I can detect if a polygon lies inside another ...
user avatar
2 votes
1 answer
207 views

Sorting polygons into a n x n spatial array

I have a square group of contiguous polygons: By using the centroid coordinates of each polygon, I want to assign each polygon's spatial sequence in a row by row fashion: I have tried this ...
user avatar
2 votes
2 answers
127 views

Sorting a table based on if-then statement

I have a large table with two attribute fields "layers" and "Meas" both contain numbers, I would like to sort "Meas" in the odd numbered "layers" in ascending order, and "Meas" in the even numbered "...
user avatar
0 votes
0 answers
181 views

Selecting lowest values in from attribute table in ModelBuilder? [duplicate]

I am trying to select the lowest value from an attribute table within model builder. I have used the Sort tool to sort the values in ascending order but when I add the Select tool and go to enter an ...
user avatar
1 vote
1 answer
152 views

Ordering FeatureGroups

I'm using Leaflet right now and I have issues on ordering a list of FeatureGroups. Each feature group is either an imageOverlay or a list of Features I tried using bringToFront / bringToBack and it's ...
user avatar
  • 111