New answers tagged select
You can use the following to grab the OID of selected features within a layer. FIDSet = arcpy.Describe(layer).FIDset records = [int(FID) for FID in FIDSet.split(";")] if FIDSet else  This way, you can make a selection, grab the OIDs, and clear selection. arcpy.SelectLayerByAttribute_management(layer, "CLEAR_SELECTION") It should occur quickly, so the ...
You can always sort your features, first by class, then by area (descending) and, in each class, select the 5 first records. As you say that you have many classes and many shapefiles, you obviously can do it by hand. My approach would be to use the Python API in order to perform this sorting / selecting operation. I don't know though how familiar you are ...
If landlocked means "not connected to the sea", you can first select all countries that intersect the continent formed by dissolving all the countries (new selection , intersect) then you remove those that touch the seas (i.e the boundaries of the continent). (remove from selection, share a line segment).
If you have ArcGIS - you can do the following - use the arcpy.InterpolateShape_3d() tool to get the value of the raster for each point - then use the arcpy.Statistics_analysis() tools to get the mean value for each raster value.
Top 50 recent answers are included