Questions tagged [sorting]

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

Filter by
Sorted by
Tagged with
2
votes
1answer
102 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 ...
5
votes
2answers
118 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
38 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
65 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
45 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
19 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
10 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
26 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
38 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
56 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
81 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
46 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
81 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
36 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
55 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 ...
3
votes
1answer
167 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
71 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 ...
2
votes
1answer
144 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
118 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
74 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 ...
0
votes
1answer
25 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
99 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
31 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
78 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
23 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
298 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
53 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
76 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
248 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
44 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
183 views

QGIS Python: sort by attributes <= 0

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 ...
3
votes
1answer
164 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
130 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
324 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
62 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
131 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: ...
1
vote
1answer
754 views

Extract and sort x coordinates in groups from a column to a new one in geopandas?

I am working with geopandas There are these columns:geo,cat and I have to make the new column called rank. rank should contain according to the groups with the similar cat number an increasing ...
0
votes
1answer
2k views

Sorting strings separated by commas within field using Python Parser of ArcGIS Field Calculator?

In ArcGIS 10.4.1, I am using the Python Parser of the Field Calculator. My Python knowledge is limited. I would like to recalculate a field of strings that are separated by commas so that they are ...
1
vote
0answers
298 views

Advanced Sorting in QGIS

Can someone explain how to do advanced sorting of an attribute table using QGIS?. Every time I try to sort by script, it does not give me what I need and I don't know if there is any plugin that can ...
4
votes
1answer
45 views

Reconciling Differences Between Python List Sort and ArcMap Table Sort

I have a feature class being used in Data Driven Pages, which sorts as follows: APPLE LARRY JOHNSON SHIRLEY KENT-STATE-GOODS LLC KENT TIMOTHY KENT VANESSA KENT WAYNE SMITH JEEVES I also have the ...
1
vote
0answers
218 views

Easily convert multiple attribute columns from text to integer?

I uploaded a CSV with WKT polygon coordinates. Each polygon was displayed spatially and I re-saved the file as a shapefile. The problem is most attribute columns are being detected as text, and they ...
1
vote
1answer
131 views

Establishing attribute order in table using ArcPy with ArcGIS Pro?

I have the following piece of code hoping to have a table with a set of fields on a specific order: #Removing the fields we do NOT want to show in the output arcpy.MakeFeatureLayer_management(...
1
vote
1answer
1k views

How to SortBy a GetFeature WFS request by FeatureId (fid) in XML?

This is my XML for a GetFeature request. I want to Sort By FeatureId (fid) but this doesn't work. I can't find an example of how to format this XML correctly: (SEE THE ogc:SortBy SECTION) <?xml ...
3
votes
1answer
92 views

Ordering of bands in ArcCatalog

I have a multi-band GeoTIFF with >10 bands, for example 11. I would have expected these to be shown in an ordered numerical sequence from 1 to 11. However, ArcCatalog 10.3.1 wants to show the string ...
4
votes
3answers
2k views

Sorting line features into route order in attribute table using QGIS?

I have a several line features stored as shapefiles, obviously constructed of several connecting segment. I wish to export the attribute tables of each feature as a CSV to use in a separate ...
1
vote
1answer
546 views

Special sorting of symbols in a layer

I have this feature class I would like it to be : First Second Third Fourth Unsuitable Water No data The only was I know how to sort it in the Symbology tab is alphabetically. I know I can ...
0
votes
1answer
465 views

Determining spatial sort order with ArcPy? [closed]

How do I determine if a varying hypothetical set of lines (example in image) needs to be sorted by X (longitude) rather than Y (latitude) programmatically to ensure they are ordered from 1 to 14 as ...
4
votes
1answer
559 views

How to sort the order of track points?

I have a shapefile, which contains track points of a gpx file. Every track point has a number in its "number" field that tells the numeric name of the track the point belongs to. So points are ...
1
vote
0answers
101 views

Sort a Raster attribute field in ArcGIS

I need to combine several rasters. One of them has an alphanumeric data in the attribute I need to combine. However, when combined the output raster has a 'LONG' attribute type where should be 'STRING'...