Questions tagged [sorting]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
39 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 ...
0
votes
1answer
38 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 ...
0
votes
1answer
38 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 ...
0
votes
0answers
10 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 ...
0
votes
1answer
40 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 ...
0
votes
0answers
22 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 ...
0
votes
1answer
23 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,...
0
votes
0answers
10 views

Sorting data based on selection queue using ArcMap

I have some polygons which have sequential ID if they are in the same row. I want to select the polygons of one row and to sort them based on the way I selected. They are sorted based on FID. Is there ...
4
votes
1answer
52 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 ...
9
votes
3answers
238 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 ...
1
vote
2answers
103 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 ...
3
votes
2answers
166 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 ...
0
votes
2answers
59 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, ...
2
votes
1answer
154 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 ...
6
votes
2answers
266 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 value, ...
2
votes
0answers
51 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 ...
0
votes
2answers
81 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 ...
1
vote
1answer
48 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 ...
1
vote
0answers
21 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 ...
0
votes
0answers
20 views

Sorting a list of list in Earth Engine

I'm trying to sort this data set lowest to highest. I have a list of 4 elements, each element is comprised of another list of two element pairs.  I need to sort by the first element in each list and ...
0
votes
0answers
36 views

Spatial sorting with grouping

I have been trying to do sorting with ArcGIS Pro, but wasnt able to find any features for grouping then sorting. My data has road information and I'm trying to sort segments in each particular road (...
2
votes
1answer
52 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 ...
2
votes
2answers
74 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 ...
2
votes
0answers
178 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 ...
2
votes
1answer
72 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 ...
2
votes
2answers
86 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 "...
0
votes
0answers
58 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 ...
1
vote
1answer
79 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 ...
4
votes
1answer
309 views

Automatically numbering points East-West & North-south on QGIS?

I have a dataset over with points every 100m over several km. I want to number points so that they follow an 's' shaped path. For example: 1 2 3 4 5 10 9 8 7 6 11 12 13 14 15 20 19 18 ...
4
votes
1answer
101 views

Sequentially number attribute field as the table is currently ordered in QGIS? [duplicate]

At QGIS 3.8.2, I need to populate a field (let's call it field_a) in a sequentially increasing (1, 2, 3,...) order. However, I need the sequence to increase in the order that the table is currently ...
3
votes
1answer
215 views

Labeling features in given order in QGIS?

I want to sort the address numbers where would show only the bigger number and smaller value should be suppressed away. I have used earlier ORDER BY-method when using PostGIS but now it isn't ...
0
votes
1answer
147 views

Sorting Identify feature results by DATE field in ArcMap?

I'm using ArcMap 10.3. When I use the Identify tool, I often have many results and would like to sort those results in the Identify window. If I right-click on the layer name or features in Identify ...
2
votes
1answer
89 views

Sorting join layer based on attribute column?

Im joining dots with a CSV file and map my data with proportional circles. Unfortunately I have some overlapping. How do I sort a join layer based on attribute column called aPOPCLA72 ? Filtering ...
1
vote
1answer
26 views

How to use insert extension for more than one value

I am trying to insert 2 values into the 'extensionsofArcGIS' variable as you can see below, just not sure how to insert more than one at a time? I have tried a few different variations but still no ...
0
votes
1answer
140 views

Using Editor tab Clip function in ArcPy?

I am using ArcGIS Desktop 10.6, basic license, Spatial Analyst, python 2.6, 2019 AD. I have a polygon feature class with representing a lake, with multiple features overlapping (all in the same ...
0
votes
1answer
37 views

ArcGIS Pro Sort based on more then one field?

I want to sort attribute table based on more then one column. Is there a way to do that?
1
vote
1answer
99 views

Attribute Table Sort Disordered in QGIS?

I am using QGIS. I opened my attribute table in Open Office Calc and sorted the table by a column. I believe I had all the columns selected when I sorted. Now when viewing the layer, everything is ...
2
votes
0answers
24 views

Filter pictures in directory

I have a drone project with 50,000 pictures in 50 layers. Each layer has 2 to 5 zones. When I put them all together, we have a lot of overlap and in some places, we have up to 4 pictures of the same ...
2
votes
1answer
408 views

QGIS 3.4.4 sorts numerical values as text, solution?

I'm trying to sort my numerical values in my attribute table but instead of getting 1, 2, 3 I get 1, 10, 100, 100 etc. When searching for a solution here on Stack Exchange, many people with earlier ...
2
votes
0answers
54 views

Sum of values grouped by owner [duplicate]

When I try to use the following expression, the preview shows me the correct sum, but when I click ok I get this notification. This tells me it can't calculate column "Subsidie J" It seems that it ...
1
vote
2answers
90 views

Sort by multiple fields and delete record with highest value

I have some GPS points that I am trying to find the highest precision point for. How would I go about sorting the table by time collected and horizontal precision and then deleting the highest ...
4
votes
2answers
1k views

Sort data in an ascending order based on the geometry of an sf object in R (Sort by Lat/Long)

I am trying to sort my data based on the latitude and longitude. I have an sf object in R, which essentially stores the latitude and longitude as a separate column called geometry. See below: > ...
7
votes
1answer
291 views

Sorting layers in specific group layer with ArcPy?

I have to programmatically sort several layers in an .mxd project that are each placed in the same group layer. I have found a script that partially works by sorting all layers in the TOC (Arc GIS 10....
1
vote
1answer
46 views

Sorting by shape token in ArcPy cursors?

I have a script that uses the sql orderby parameter to sort my arcpy cursors by a user defined field or fields and deletes duplicates, but keeps the duplicate with the highest value. I'd like to be ...
3
votes
0answers
256 views

QGIS Python: sort by attributes <= 0 [closed]

In QGIS 2.18 I'm try to sort features by an integer attribute with a Python script. The problem is, that some of the values of the sorting attribue are <= 0 (for sure they have to be <=0) and ...
4
votes
1answer
207 views

PyQGIS - get spatial/positional order of featurelist

I would like to know if it is possible to sort a list of line features in the exact order in which they appear on the canvas, given the starting feature. In this case the list of linefeatures ...
1
vote
1answer
141 views

Sorting numbers into categories in QGIS?

I need to sort a column of population figures into categories in a new column so that I can split them out and create layers for each one. Something like 0-99, 100-249, 250-500 etc. Struggling to ...
0
votes
1answer
405 views

Why does using next() with an update cursor nested inside a Search cursor yield such weird results

I did this: with arcpy.da.SearchCursor( in_table = in_table, field_names = '*', where_clause = "", sql_clause = (None, "ORDER BY date"))\ as ordered_cursor: with ...
1
vote
1answer
84 views

Sorting based on computed property (NDWI)

I am trying to sort a series of sentinel 2 images based on their average NDWI in the google earth engine. But nothing I do in sorting seems to work. Here I ll show what i tried: 's2_ndwi_mean' is a ...
2
votes
1answer
183 views

Sort PDF Files based on last 7 Characters [closed]

I have a Python script that creates PDF Map Books from pre-existing map PDFs, created in ArcGIS Pro. The PDF file names end with the month abbreviation and year they are associated with (example: ...